Repository navigation
fix(cli-mode): keep steer badges on their own line above the message - #9756
Conversation
First Principles Review (Fable 5) — ✅ PASSPremise-level review of Everything checks out. The ratchet in First-Principles-Verdict: PASS The only behavioral proof is manual: the test pins the rule's source text, not the rendered cascade — confirm the after-screenshot on a live CLI-mode dashboard. What this change shipsInventory (3 items) — 2 justified, 1 harm-free riderIntent: make steer status badges sit on their own line above the message in CLI UI mode, instead of fusing with the message text — a FIX.
Verification notes: root cause chain in the description matches the code ( [FIRST-PRINCIPLES-REVIEWED] 22cf03a |
Opus 4.8 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
Design Review (Fable 5) — ✅ PASSDesign-level review of Design-Verdict: PASS Correct ownership — CLI mode caused the flattening, so repairing its consequence in cli-mode.css, tightly scoped, is the right shape. Suggestions
[DESIGN-REVIEWED] 22cf03a |
GPT 5.6 Review — ✅ no blocking findingsGPT 5.6 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
UX Review (Fable 5) — ✅ PASSUX-level review of Both screenshots match the PR's claims: shot-02 (before) shows the "Steering…" badge fused inline with the message text, shot-01 (after) shows it stacked on its own line. The diff is a single CLI-scoped CSS rule plus a source-level regression test — no new strings, controls, or states; it restores the pre-existing steer-badge layout (from #8069/#9037) in CLI mode. The blind reader correctly identified the badge as a label attached to the message and the UX-Verdict: PASS Layout-only repair of an existing badge; the after screenshot reads exactly as intended — status label on its own line above the message. [UX-REVIEWED] 22cf03a |
CLI mode flattens the UserMessage root to display:block and the bubble's
.msg-content to inline-block, so the steer badges ("Steering…" pending,
"Steered into the running turn" confirmed, requeued) — inline-flex boxes
that stack above the bubble in the normal theme's flex-col root — flowed
onto the SAME line as the message text. Promote direct-child .inline-flex
badges to block-level flex inside the CLI user-root scope; the hover
footer uses flex (not inline-flex) so it never matches, and the edit-mode
root has no .msg-content child so it is excluded by the existing guard.
Source-level regression test: jsdom cannot compute the attribute-scoped
cascade, so the test guards the rule's presence in cli-mode.css.
167c302 to
22cf03a
Compare
dwu96
left a comment
There was a problem hiding this comment.
Tier 1 auto-approve: fix (4 files). Criteria: no conflict, no requested changes, security path denylist clean, design-doc gate clean, SAST annotations clean, security checklist all-NO, AI reviewers green. Category: CLI-mode CSS cascade fix — the flattened display:block root let inline-flex steer badges share a line with the message text; a direct-child display:flex rule restores their own line, guarded by a source-level CSS test.
NicholasRBowers
left a comment
There was a problem hiding this comment.
Tier 1 auto-approve: fix (4 files). Criteria: no conflict, no requested changes, security path denylist clean, design-doc gate clean, SAST annotations clean, security checklist all-NO, AI reviewers green. Category: CSS-only steer-badge layout fix with test — clear root cause (badge inline instead of own line in CLI mode), well under the 5-file fix limit.
…irodotdev#9756) CLI mode flattens the UserMessage root to display:block and the bubble's .msg-content to inline-block, so the steer badges ("Steering…" pending, "Steered into the running turn" confirmed, requeued) — inline-flex boxes that stack above the bubble in the normal theme's flex-col root — flowed onto the SAME line as the message text. Promote direct-child .inline-flex badges to block-level flex inside the CLI user-root scope; the hover footer uses flex (not inline-flex) so it never matches, and the edit-mode root has no .msg-content child so it is excluded by the existing guard. Source-level regression test: jsdom cannot compute the attribute-scoped cascade, so the test guards the rule's presence in cli-mode.css. Co-authored-by: Patrick Gao <patrigao@amazon.com>
Problem / Motivation
In CLI UI mode (
data-ui="cli"), the steer badges render on the SAME line as the message text instead of above it. A pending steer shows as◎ Steering… ? <message text>in one row — the badge reads as a prefix of the message rather than a status indicator.no linked issue: user-reported directly against a live dashboard running CLI mode; screenshots below.
Why it matters
Anyone using CLI mode who steers a running turn gets a visually broken transcript row for all three steer lifecycle states (pending "Steering…", confirmed "Steered into the running turn", requeued). The badge/InfoTip and the message fuse into one line, which misreads as message content and breaks the indicator-family layout the steer UX (#8069/#9037) established.
What changed (motivation → approach → change)
UserMessage's root isflex flex-col items-end, and the badges areinline-flexboxes that stack because of the column flex.cli-mode.cssflattens that root todisplay: block !importantand makes the bubble's.msg-contentdisplay: inline-block. Under block layout, aninline-flexbadge is an inline-level box, so it flows onto the same line as the inline-block bubble.website/src/styles/cli-mode.csspromoting direct-child.inline-flexbadges of the user-message root to block-levelflex, so each keeps its own line. Direct-child scoping (>) leaves the badge's inneranimate-pulsespan and the InfoTip untouched; the hover footer usesflex(notinline-flex) so it never matches; the edit-mode root has no.msg-contentchild so the existing:has(.msg-content)guard excludes it. This follows the file's own precedent (the.relativesteer-wrapper cap-lift) of repairing CLI-mode layout in the CLI stylesheet rather than adding mode-conditional classes to the component.Tests
website/src/test/cliModeSteerBadge.test.ts(new): guards the rule's presence incli-mode.css— the CLI user-root scope selecting direct.inline-flexchildren withdisplay: flex !important. Source-level because jsdom cannot compute the attribute +:has()cascade.src/test/UserMessage.test.tsx(55 tests) andsrc/test/composerFocus.test.ts(23 tests, includes the cli-mode.css selector ratchet) pass unchanged.Manual verification
Verified on a live dashboard in CLI mode: before the fix, a pending steer rendered
◎ Steering… ?inline with the message text; after rebuilding with the rule, the badge sits on its own line above the message. Screenshots below are those live captures.Screenshots / video
Before — badge, InfoTip and message fused on one line:
After — badge on its own line above the message:
Pattern harvest
Not generalizable: no lint/semgrep shape fits — the defect is a layout-mode interaction — a mode stylesheet flattening a flex column to block turns inline-level children into same-line flow. No grep/semgrep shape distinguishes a legitimate
inline-flexfrom one that depends on a parent flex column. The regression test added here guards the one known instance.