Skip to content

Question card: the off decision tag reads as off; the eyebrow pills align - #1816

Merged
backnotprop merged 2 commits into
mainfrom
fix/question-card-eyebrow
Oct 10, 2026
Merged

backnotprop merged 2 commits into
mainfrom
fix/question-card-eyebrow

Conversation

@backnotprop

Copy link
Copy Markdown
Owner

The owner's screenshot of a question card in the Inbox showed two problems in the card's eyebrow row. This PR fixes both in packages/ui/components/blocks/QuestionBlock.tsx, so the plan editor, annotate and the Inbox all get the fix. It changes styling only. No prop, attribute or markup changes.

1. The off decision tag now reads as off

Off was drawn in --muted-foreground, which is exactly the color of the "Open" tag next to it. Measured against the card in the default theme, both were 8.98:1 (light) and 7.37:1 (dark), so an off tag looked almost the same as an on one.

The off color is now color-mix(in oklab, var(--muted-foreground) 55%, transparent). The text, the diamond and the dotted outline all use currentColor, so they fade together, the same as opacity: 0.55 would. Measured against the card, the off tag is now 2.76:1 (light) and 3.06:1 (dark). It does not use opacity, because that would also fade the ring-primary focus ring, which stays at full strength (see the *-focused-* PNGs). The tag is still a focusable button: the words open the decision card and the diamond is the switch.

2. The eyebrow pills now align

Before, "Open" was 19.22 px tall and the decision tag was 17.22 px, because only "Open" had a border. The split tag (diamond switch + words) also sat 1.6 px higher than "Open" and "Skipped": its inline-flex baseline came from the icon-only switch.

Now every pill in the row is the same box: 18 px tall (h-[18px], leading-4) with a 1 px border, transparent on every tag except "Open". This covers Open, Answered, Settled, Skipped, "Decision", and all three forms of "Records a decision" (split, toggle, static). The pill group is an inline-flex items-center gap-1 row. Measured in Chromium in the Inbox, each pair in every state now has the same height (18 px) and the same center.

guides.show viewer: unchanged

The viewer's stylesheet scans packages/ui/components. Removing align-[1px] changed the viewer CSS, because this file was its only use. I kept that class (it has no effect inside the flex row) and used only classes the viewer already ships. build:viewer + check:manifest report "in sync", and check:budgets passes. No guides.show deploy is needed. The viewer JS does not include QuestionBlock.

Proof (real Inbox window, compiled binary, temp data dir, Chromium at 3x)

Before and after binaries were built from origin/main and from this branch. Each binary ran plannotator inbox --background under a temp PLANNOTATOR_DATA_DIR. An agent sent DEMO_MESSAGES.stopped plus a second message through plannotator inbox mcp. In the window, one question was picked (Answered) and one was skipped. The screenshot is the eyebrow row of each card:

  • /tmp/qcard-proof/{before,after}-{light,dark}-2-off-open.png: off tag beside "Open" (the owner's case)
  • /tmp/qcard-proof/{before,after}-{light,dark}-1-on-open.png: on tag beside "Open"
  • /tmp/qcard-proof/{before,after}-{light,dark}-3-decision-settled.png: "Decision" + "Settled"
  • /tmp/qcard-proof/{before,after}-{light,dark}-4-plain-answered.png: off tag + "Answered"
  • /tmp/qcard-proof/{before,after}-{light,dark}-5-on-skipped.png: on tag + "Skipped"
  • /tmp/qcard-proof/{before,after}-{light,dark}-2-off-open-focused-{words,switch}.png: keyboard focus on the off tag; the ring stays at full strength
  • /tmp/qcard-proof/{before,after}-metrics.json: per-pill height, center and color, and the contrast figures above

Tests

DOM_TESTS=1 bun test packages/ui/components/blocks/ packages/ui/components/Viewer passes (161), as does packages/inbox. In the two decision-toggle tests, the old color: var(--muted-foreground) assertions are replaced with data-question-decision-recording="off", and the tests check that opacity stays unset. happy-dom drops color-mix(), so the color itself is checked in Chromium (above), not in the DOM tests.

Docs: packages/ui/HANDOFF.md has a new section, "Question card eyebrow", and the two older statements about the off look are corrected. The packages/ui/README.md line is updated.

…height on one line

Measures every question card's eyebrow pills in Chromium (top, bottom and
height within 0.5 px) with the on and off tag beside Open, and the on tag
beside Answered. Fails against main (Open 19.22 px tall and 2.6 px lower
than the 17.22 px decision tag), passes with the shared pill box.
@backnotprop
backnotprop force-pushed the fix/question-card-eyebrow branch from a10cc0c to c5f06d6 Compare October 10, 2026 22:25
@backnotprop
backnotprop merged commit 2ab3163 into main Oct 10, 2026
18 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