Skip to content

fix(artifacts): stop blaming a search the user never made - #975

Open
philmerrell wants to merge 1 commit into
developfrom
fix/artifact-empty-tab-message
Open

fix(artifacts): stop blaming a search the user never made#975
philmerrell wants to merge 1 commit into
developfrom
fix/artifact-empty-tab-message

Conversation

@philmerrell

Copy link
Copy Markdown
Contributor

Found on dev the moment the inbox flag went live. Opening "Shared with you" with nothing shared showed:

No artifacts match your search.

…with an empty search box.

Cause

isFilteredEmpty gated on the library total, so any non-empty library made an empty tab look like a failed search. It needed the selected tab's count.

The comment directly above it already warned about this conflation — "'Nothing matches' is a different message from 'you have nothing'". Tabs introduced a third state, "nothing here", and the old gate quietly folded it into the wrong one.

Three states now, in priority order

when message
isEmpty nothing anywhere "No artifacts yet" + CTA
isTabEmpty nothing in this tab names the tab — "Nothing has been shared with you yet…"
isFilteredEmpty tab has rows, filter excluded them "No artifacts match your search."

isEmpty still wins outright when the library is empty: a per-tab message would bury the one statement that actually matters.

Why the tests missed it

Every empty-state spec asserted which rows rendered — never which sentence appeared when none did. The three new tests assert the sentence, including the case where blaming the search is correct, and the precedence of the empty-library state.

SPA suite: 2431 passed.

🤖 Generated with Claude Code

Opening "Shared with you" with nothing shared showed "No artifacts match
your search" — with an empty search box. Found on dev the moment the
inbox flag went live.

`isFilteredEmpty` gated on the LIBRARY total, so any non-empty library
made an empty tab look like a failed search. It needed the SELECTED
TAB's count instead. The irony is that the comment above it already
warned about exactly this conflation ("'Nothing matches' is a different
message from 'you have nothing'") — tabs added a third state, "nothing
*here*", and the old gate quietly folded it into the wrong one.

So there are now three, in priority order:

  isEmpty         nothing anywhere        "No artifacts yet" + CTA
  isTabEmpty      nothing in this tab     names the tab
  isFilteredEmpty filtered to nothing     "No artifacts match your search"

`isEmpty` still wins when the library is empty outright: a per-tab
message would bury the one statement that actually matters.

Why the tests missed it: every empty-state spec asserted which ROWS
rendered, never which SENTENCE appeared when none did. The three added
here assert the sentence, including the case where blaming the search
is correct.

SPA suite: 2431 passed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant