fix(ui): composed empty-state copy shadowed by inherited board type - #7
Merged
Conversation
A composed grid board inherits type "inspiration" for its card chrome, and
emptyVoice() checked `type === 'inspiration'` BEFORE the descriptor.empty_state
branch — so a board like 'Wish List' showed the seeded Inspiration copy
('Nothing pinned yet.') instead of its own composer-written copy.
Move the empty_state check to the top of emptyVoice so composer-written copy
wins for any board that carries it; the seeded boards have no empty_state and
keep their hardcoded, AI-aware voice. Regression test uses type:'inspiration'
+ empty_state to lock the ordering.
Co-Authored-By: Claude Opus 4.8 (1M context) <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.
A user created a "Wish List" board; the composer wrote a great empty state for it (
empty_state: { head: "Nothing wanted yet.", body: "Drop the first product or service you've got your eye on, …" }), but the board showed the seeded Inspiration copy ("Nothing pinned yet.") instead.Cause: a composed grid board inherits
type: "inspiration"for its card chrome.emptyVoice()matchedtype === "inspiration"before thedescriptor.empty_statebranch, shadowing the bespoke copy.Fix: move the
empty_statecheck to the top ofemptyVoice()so composer-written copy wins for any board that carries it. Seeded boards have noempty_state, so they still fall through to their hardcoded, AI-aware voice. Added a regression test (type: "inspiration"+empty_state→ must render the composed copy).Follow-up to the empty-states feature in #5. Verified in-browser against real data: the Wish List board now renders its own copy.
tscclean; 524 tests pass.🤖 Generated with Claude Code