fix(artifacts): stop blaming a search the user never made - #975
Open
philmerrell wants to merge 1 commit into
Open
fix(artifacts): stop blaming a search the user never made#975philmerrell wants to merge 1 commit into
philmerrell wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found on dev the moment the inbox flag went live. Opening "Shared with you" with nothing shared showed:
…with an empty search box.
Cause
isFilteredEmptygated 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
isEmptyisTabEmptyisFilteredEmptyisEmptystill 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