Skip to content

fix(ui): composed empty-state copy shadowed by inherited board type - #7

Merged
Seanathon merged 1 commit into
mainfrom
fix/composed-empty-state-copy
Jun 27, 2026
Merged

fix(ui): composed empty-state copy shadowed by inherited board type#7
Seanathon merged 1 commit into
mainfrom
fix/composed-empty-state-copy

Conversation

@Seanathon

Copy link
Copy Markdown
Owner

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() matched type === "inspiration" before the descriptor.empty_state branch, shadowing the bespoke copy.

Fix: move the empty_state check to the top of emptyVoice() so composer-written copy wins for any board that carries it. Seeded boards have no empty_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. tsc clean; 524 tests pass.

🤖 Generated with Claude Code

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>
@Seanathon
Seanathon merged commit 8c451fc into main Jun 27, 2026
2 checks passed
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