feat(cards): UserCard gets CardBox accent + drop dead approval-card type#143
Merged
feat(cards): UserCard gets CardBox accent + drop dead approval-card type#143
Conversation
UserCard was the only Markdown-rendering card without a CardBox bar —
long pasted prompts wrapped without a continuing accent, breaking the
visual rhythm against the now-accented streaming/reasoning cards.
Audit also turned up the `approval` card kind in cards.ts: declared
in the Card union but with zero producers in src/ or tests/. The
CardRenderer case for it just routed to FallbackCard ("not yet
migrated"). Removed the interface, the union member, and the orphan
case — default branch already catches anything unexpected.
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.
Summary
Two small, related card-stream cleanups discovered while auditing visual consistency after #140.
1. UserCard → CardBox
Of the cards that render
<Markdown>(variable-length, wrap-prone content),StreamingCardandReasoningCarduseCardBoxso the▎left bar continues across wrap continuations. UserCard was the odd one out — long pasted prompts wrapped without an accent and lost rhythm against the now-accented model output. Bringing it in line usesCARD.user.color(FG.meta/ dim slate) — deliberately quieter than the brand-toned streaming bar so user prompts don't compete visually with model replies.The other 13 cards already get a per-line
▎viaBarRow/CardHeader; they pre-clip withclipToCellsso wrap-continuation isn't a concern. They stay as-is.2. Drop dead
approvalcard kindsrc/cli/ui/state/cards.ts:160declared anApprovalCardinterface withkind: "approval"and routed it through theCardunion. Audit:src/ortests/FallbackCard("approval card · not yet migrated")ApprovalCard.tsxmodal HOC — name collision, but no wire-upPer CLAUDE.md ("certain something is unused → delete it completely"). Removed: the interface, the union member, the orphan
case "approval". CardRenderer'sdefaultbranch still catches any future card kind safely.Test plan
npm run verify— 1829/1829 tests pass (PR fix(code): normalize edit replacements to target line endings #142's 5 new ones included)▎accent against model reply's brand barOut of scope
<Text backgroundColor>wrapping; separate RFC if pursuedRefs