Repository navigation
Conversation
…n link On narrow viewports an unfocused composer collapses to a one-line row that rendered the raw prompt, so assistant quotes, context chips and @-mentioned files appeared as their serialized markdown links. The row now reads the prompt through the editor's own segment parser and shows what each chip shows: quoted text, context labels and file names. Fixes pingdotgg#22076 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…composer preview Also reword the preview comment: it renders readable text, not the chips' labels. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a small, self-contained web bug fix that replaces serialized citation, context, and file-mention markup with readable text only in the existing collapsed mobile composer preview. Prompt processing and persistence remain unchanged, and focused tests cover the new formatter. You can add or adjust custom eligibility rules. Learn more. |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the
Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
The collapsed mobile composer row now draws quotes, file mentions, context references and provider skills as the same chips the editor shows, rendered inert so the row stays one tap target that expands the composer. Replaces the plain-text preview helper. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Problem
Below 640 CSS px, the unfocused composer collapses to one line. With a quote in the draft, it shows the raw
[Assistant quote](t3-citation://v1/…)link instead of the quote chip. Context references (t3-context://) and@-file mentions leak the same way.Fixes #22076
Root cause
The collapsed row (
showCollapsedMobilePromptRow,ChatComposer.tsx:2812) renders the serialized prompt as-is atChatComposer.tsx:6610({prompt.trim() || …}), never through the editor that turns links into chips. The desktop resting composer still uses the editor: the same draft shows raw links at 639 px and chips at 641 px.Change
New
CollapsedComposerPromptPreviewsplits the draft with the editor's own parser,splitPromptIntoComposerSegments, and draws each segment with the composer's existing chips: quotes (labelled with the comment if there is one, else the quoted text),@-file mentions, context references by kind, and skills the provider offers (SkillChip, now exported). Everything else stays text. The chips are inert; the row is still oneExpand composerbutton.Chips, not plain text, because the issue asks for them, and reusing the editor's parser and chips keeps this row in step with the editor.
Scope and approval
Triaged issue #22076. 4 files, +210/−3, of which 89 lines are the browser test.
Verification
Real app at 639 px, composer unfocused, same saved draft on
main(67c0fc0cda) and this branch (b4e6db6634).main)@-file + terminal context + quoteMore: 641 px control, dark theme, image attachment
A5, 641 px: the full editor shows the A4 draft with the same chips.
main)AFTER: row stays 50 CSS px tall, A1–A4 show 1, 1, 2, 3 chips, no
t3-citation://,t3-context://or](markup is visible.Checks five chip kinds render with icons and no focusable children, and an unknown
$skillstays text.AssertionError: expected [] to deeply equal [ 'Cache the parsed config.', …(4) ](1 failed | 1 passed).Tests 2 passed (2).vp lintandvpr typecheck(apps/web) exit 0.Known limits:
@-mentions always get a file icon, even folders.@-mention keeps the mention as text, as the editor does onmain.Related PRs
#22136 by @fixfon fixes the same issue by converting citation links to plain text; context references and
@-file mentions still show as links there. This PR renders chips for all of them, as the issue asks.Process
Loop-record: implementer=claude/claude-opus-5-5 reviewer=codex/gpt-6.1-sol rounds=3/0 defects=0 role=worker
Implemented by Claude Opus 5.5 (Claude Code in T3 Code). Code review by GPT-6.1-Sol (Codex): 3 rounds, 0 blocking defects. Visual review of the images by a separate Claude Opus 5.5 session: PASS.
Model and harness: Claude Opus 5.5 · Claude Code
🤖 Generated with Claude Code
— EtanHey's t3codeClaude (worker) · claude-code/claude-opus-5-5