Skip to content

feat(cards): UserCard gets CardBox accent + drop dead approval-card type#143

Merged
esengine merged 1 commit intomainfrom
feat/cardbox-all-cards
May 3, 2026
Merged

feat(cards): UserCard gets CardBox accent + drop dead approval-card type#143
esengine merged 1 commit intomainfrom
feat/cardbox-all-cards

Conversation

@esengine
Copy link
Copy Markdown
Owner

@esengine esengine commented May 3, 2026

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), StreamingCard and ReasoningCard use CardBox so 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 uses CARD.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 via BarRow/CardHeader; they pre-clip with clipToCells so wrap-continuation isn't a concern. They stay as-is.

2. Drop dead approval card kind

src/cli/ui/state/cards.ts:160 declared an ApprovalCard interface with kind: "approval" and routed it through the Card union. Audit:

  • Zero producers in src/ or tests/
  • The CardRenderer case routed to FallbackCard ("approval card · not yet migrated")
  • The actual approval UI (EditConfirm / ShellConfirm / PlanConfirm) is built on the unrelated ApprovalCard.tsx modal HOC — name collision, but no wire-up

Per CLAUDE.md ("certain something is unused → delete it completely"). Removed: the interface, the union member, the orphan case "approval". CardRenderer's default branch still catches any future card kind safely.

Test plan

Out of scope

Refs

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.
@esengine esengine merged commit 4a3f5f0 into main May 3, 2026
1 check passed
@esengine esengine deleted the feat/cardbox-all-cards branch May 3, 2026 02:45
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