Repository navigation
feat(chat): styled tool-row hover with one shell pipeline stage per line - #18532
Conversation
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Check that the other [DESIGN-REVIEWED] e5614e5 Description read[DESCRIPTION-READ] 8a4b45004fbfa8869a51c1d1ac23fff16287432d3f45d7e25f5576809ac87372 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS
What this change shipsInventory (9 items) — 9 justifiedIntent: when someone hovers a folded tool row, they can read the command it ran quickly and clearly, without expanding the row. ADDITION (Closes #18522).
[FIRST-PRINCIPLES-REVIEWED] e5614e5 Description read[DESCRIPTION-READ] 74734b46153bbaccd4319df539e294a6a68331476226136b30ae1f6da1400f44 That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Opus 5.5) — 🟡 CONCERNSUX-level review of UX-Verdict: CONCERNS The cut-off note "… Open the step to see the rest" names an action the reader couldn't find; they asked "Do I click the step name?" Watch
Suggestions
[UX-REVIEWED] e5614e5 Description read[DESCRIPTION-READ] c6505e15d1af8d0bb28f4f146d7a6f3573488bdfa973d158ef259ee090494bb5 That sha256 names everything this verdict read: the PR description, plus the 13 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5.5 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: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 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: |
bb7fa61 to
92e7d7b
Compare
|
|
|
|
E2E (stub ACP backend, offline) is red on 92e7d7b only because session-tags-e2e.spec.ts 17b passed on a retry (ceiling 0). That is the known flake in #17941, seen on many unrelated PRs; this diff touches no sidebar, tag or context-menu code. Recorded the sighting on #17941. #18529 makes 17b retry-safe; this PR waits for it to merge, then rebases onto it rather than rerunning a test already reported more than twice this fortnight. |
92e7d7b to
641f0f4
Compare
|
Rebased: main moved in website/src/pages/chat/ToolCallLine.tsx (#18500 Tool calls start expanded) and GitHub marked this PR conflicting (d4c3a73 -> c241d6b). The only conflict was the import block; range-diff shows the patch otherwise unchanged. tsc, eslint and the 27 related frontend test files (755 tests) pass on 641f0f4; CI re-running. |
641f0f4 to
b9ca7e5
Compare
|
|
|
|
|
main went red on src/test/focusRingContrast.test.ts (AskAnswersCard.tsx kept an accent-only focus ring when #15250 and #17705 crossed): #18577, fix in #18581. This PR also conflicts with #17705 in ToolCallLine.tsx; the rebase that resolves it (pill keeps focus-ring-accent plus the open-row classes) is ready locally and goes out once #18581 merges, so it is not pushed onto a red base. |
b9ca7e5 to
a6f4c4a
Compare
|
Rebased onto aee520e, which carries the red-main fix #18581 and #17705's focus-ring migration (b9ca7e5 -> a6f4c4a). The only conflict was the pill's className: it keeps focus-ring-accent plus the open-row classes. tsc, the 37 related frontend test files (1007 tests, incl. focusRingContrast), the i18n suites and i18n:check, and the feature-map check pass; local GPT and Opus reviews found nothing. CI re-running. |
a6f4c4a to
e5614e5
Compare
|
Rebased onto main to pick up #18644, which fixed the session-tags 17b flake (#17941) that was the only red on a6f4c4a (a6f4c4a -> e5614e5). range-diff shows the patch unchanged; tsc, the 37 related frontend test files (1007 tests), the i18n suites, i18n:check and the feature-map check pass. CI re-running. |
|
|
|
iamwhatever
left a comment
There was a problem hiding this comment.
This PR swaps the folded tool row's native title for the app's InstantTip, with a shell command laid out one pipeline stage per line (utils/shellTipFormat.ts, pages/chat/ToolCommandTip.tsx). The slow, mid-word-wrapping OS tooltip is fixed at its source. I read the production diff. The tokenizer is display-only and keeps quotes, $(...), backticks, 2>&1 and >| (the earlier Opus finding, fixed with a regression test) from splitting a line. Screen readers get the verbatim command, and output is capped at 1200 characters or 12 lines. The shared InstantTip change only affects an above bubble that would leave the viewport top: it now flips below when there is more room. Bubbles that fit are unchanged. All three UX CONCERNS items on head e5614e5 have per-span dispositions, and the rebuttals are reasonable (the row itself is the click target, and an arrow would change shared InstantTip placement). Design and First Principles PASS, checks are green, base is main, and no change request is open. — crew-pr-reviewer
Problem / Motivation
Goal: Hovering a tool-call row in chat shows its command in a readable, styled tooltip, with a shell pipeline laid out one stage per line.
The collapsed tool row carried its command in a native
title. The OS tooltip appears after about a second, uses the proportional UI font, cannot be styled, and wraps a long pipeline mid-token, socd website && npx tsc ... && npx vitest run ...reads as one undifferentiated block.Why it matters
Agents run long chained shell commands constantly, and the hover is the quickest way to see what a row actually ran without expanding it. A tooltip that is slow and hard to parse defeats that.
Not a goal
What changed (motivation → approach → change)
Hovering or focusing a folded tool row opens the app's
InstantTipinstead of the nativetitle, so it appears after about 100ms, follows the theme, and the row it belongs to is marked while it is open (the hover fill plus a thin inset outline in the muted theme colour, visible in light and dark).website/src/utils/shellTipFormat.tswebsite/src/pages/chat/ToolCommandTip.tsx&&/ `website/src/pages/chat/ToolCallLine.tsxtitleand marks the pill while it is open. The reflowed grid isaria-hidden; the tooltip carries the exact raw command in a screen-reader-only span. An expanded row shows no tooltip.website/src/utils/toolCallTitle.tsderiveToolCallTitlereportsshellalongside the icon kind, so a command shown as a read or search (cat, `rg …website/src/components/InstantTip.tsxdocs/feature-map/README.mdgains a "Tool row hover bubble" row. Awebsite/scripts/capture-tool-pill-hover.mjsharness hovers rows in the built SPA, asserts the styled bubble (and that no nativetitleremains), and shoots dark and light frames.Backwards compatibility
Compatible: the row still exposes the same command text on hover and focus, in a tooltip instead of a
title; no API, setting or stored data changes.InstantTipconsumers whose bubble fits above keep their exact position.Removes nothing: the hover content is the same command, presented in a different component.
Tests
website/src/test/ToolCommandTip.test.tsx(new): one stage per line led by its operator; no split inside quotes or substitutions;>|and2>|read as one redirect; a leading env assignment is not the program; a trailing;leaves no empty line; multi-line commands shown as written; no character lost; the raw command reaches assistive tech while the reflow is hidden; the length caps and the cut hint (line, character and prose cuts, absent when nothing is cut); pipes and sequencing operators get distinct gutter classes; the row shows the bubble instead of atitle, wears the open-row classes only while it is open, and shows none once opened; a purpose-labelledrg … | headrow gets the shell grid.website/src/test/InstantTip.test.tsx: an above bubble that would cross the viewport top flips below; one that fits stays above; when neither side fits the top edge stays inside the viewport.website/src/utils/toolCallTitle.test.ts:shellis true for classified shell reads/searches and liveRunning:titles, false for native and MCP calls.website/src/test/ToolCallLine.test.tsx: the two checks that read the oldtitleread the tooltip's verbatim text.--sequence.shuffleand random seeds. The 37 related frontend test files pass (1007 tests, including thefocusRingContrastratchet the pill'sfocus-ring-accentis held to); the i18n suites (745 tests) andnpm run i18n:checkpass.Manual verification
Built the SPA on this head and ran
website/scripts/capture-tool-pill-hover.mjs: the styled bubble appears on hover for a pipeline, an&&chain, a recognisedrg … | headsearch, a 14-stage command cut at 12 lines, and a file-read row's prose title, in dark and light themes, with the hovered row outlined and no native tooltip left.Screenshots / video
Long pipeline, dark theme:
&&chain, light theme:A shell search the row labels as a search, dark theme:
A non-shell row (file read) shows its title as prose, dark theme:
A 14-stage command cut at 12 lines, light theme:
Other theme variants
Related Issues
Closes #18522
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)