Skip to content

fix(native-chat): seat the queued-message editor inside its queue row - #52002

Merged
nwparker merged 1 commit into
stablyai:mainfrom
luisgonzaleznf:fix/queued-edit-inline-composer
Nov 28, 2026
Merged

nwparker merged 1 commit into
stablyai:mainfrom
luisgonzaleznf:fix/queued-edit-inline-composer

Conversation

@luisgonzaleznf

@luisgonzaleznf luisgonzaleznf commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

When you edit a message that's waiting in the queue, the edit box looked like the big chat box at the bottom of the screen. It sat in a darker band with extra padding and square corners, indented away from the other queued messages. Now it sits inside the queued message's own row, lined up with the rows around it. It starts one line tall and grows as you type.

What Changed

  • Before: the inline editor showed inside a darker, square-cornered band, with 8px of padding above it and 16px below, set in from the queue rows inside the rounded queue card.
  • After: the editor card sits flush in the row. Its left edge is on the rows' icon column, its corners match the queue card, and it starts one line tall.
  • Mechanism: NativeChatQueuedMessageComposer mounts the full chat composer with an editSession. NativeChatComposerField painted the dock's chrome on every composer that was not a launch prompt: the bg-chat-pane strip, the native-chat-composer-gutter pt-2 pb-4 padding and the centred mx-auto max-w-(--chat-content-max-width) column. A new docked = !launch && !editSession flag now limits that chrome to the docked composer. An edit session keeps data-composer-field and @container/composer-field, because the toolbar writes --composer-atomic-width onto that host and .native-chat-composer-card clamps its padding against it.
  • In an edit session, the card uses rounded-lg (the queue card's radius) instead of rounded-xl. The editor uses min-h-7 (pointer-coarse:min-h-11, 44px) instead of min-h-12. It still grows to eight lines and then scrolls.
  • The Pencil icon gets -mr-0.5 shrink-0, so "Editing message" starts on the rows' text column. The gaps after the label (sender, image count) stay at 6px, as on main.
  • A new dev fixture, native-chat/queue/editing/NativeChatQueuedMessageComposer (wide, narrowFromAgent), covers a state that otherwise only appears in a live agent session.
  • The docked composer and the launch prompt render the same layout as on main.

Why

The editor reuses the real composer on purpose, so it gets the same input, menus, attachments and dictation. Only the outer chrome belongs to the dock, so this change ties that chrome to where the composer is hosted. A separate inline composer would duplicate the field. Styling around the band from the queue side would leave the dock padding in place.

Linked Issue

None. No existing issue tracks this; it was found while using the queue.

Visual Proof

Component fixture shots on main (left) and this branch (right).

Wide, dark:

Before (left): the editor sits in a darker square-cornered band. After (right): it sits flush in the queue row

Narrow, light, an agent's card with its sender:

Before and after, narrow light theme with an agent sender

Edge case, 300px wide with a 10-line message (it grows to eight lines, then scrolls; the overflow menu and Save still fit):

Before and after, tiny width with a long message

Testing

  • Reproduced headlessly with pnpm fixtures:shot (scale 2, both themes) on macOS. For the before shots, the two source files were taken from main and the new fixture was kept. On main the band, the uneven padding and the inset card are visible. On this branch the editor is flush in the row.

  • Regression sweep: 312 fixture shots (queue list including onRealComposer/withRealComposer, NativeChatWorkerDock, NativeChatEmptyState, AgentLaunchPicker, and all native-chat/composer/*, in both themes). 308 are byte-identical to main. The 4 that differ are the editing fixture's own shots. A main-vs-main re-shoot was also byte-identical, so the comparison is deterministic.

  • Unit tests: vitest on native-chat/queue and native-chat/composer (6 files, 25 tests) pass. An earlier full native-chat run (68 files, 319 tests) also passed.

  • oxlint, oxfmt --check, the anti-slop and code-quality oxlint configs, ast-grep, and check-changed-code-quality.mjs are all clean on the touched files.

  • Not checked: the live Electron app, and the visual touch sizing (pointer-coarse).

  • No unit test was added. This is a class-name and layout change, and the fixture is the visual regression check (see test anti-patterns).

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

  • Every added test fails without this change and avoids the test anti-patterns

Performance

None that matters, because this only changes class names. NativeChatComposerField re-renders on each keystroke in the docked composer, and its host class now goes through cn(). A Node microbenchmark (200k iterations, real clsx and tailwind-merge) measured that at about 0.1 µs per render, roughly 1/160000 of a 16 ms frame. There are no new effects, stores, selectors, memos, measurements, I/O or polling. Nothing scales with the number of tabs or rows: at N=200, a single update does the same work as on main.

Risk

Level: Low

Class names in two renderer files, plus a dev-only fixture. Only the inline queued-message editor changes, because it is the only host that passes editSession. The riskiest part is that the dock-fit measurement now sees a shorter editor, without the 24px of dock padding. That only gives the queue more room. One trade-off: the editor starts at 28px instead of 48px (44px on touch), so the empty click target on desktop is smaller. A plain revert undoes the change.

Review

  • Cross-platform: Tailwind classes only. No platform branches, shortcuts or paths.
  • SSH/remote: renderer only. Nothing crosses IPC or the runtime.
  • Agents: the editor is shared by every agent that supports queued-message edits. Save, cancel and dictation behave as before.

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • I stated the risk: what could break, for whom, and how to back it out
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

Original fix by @luisgonzaleznf in #52002.

@greptile-apps

greptile-apps Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

Confidence Score: 5/5 · The PR appears safe to merge.RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge.

Summary

The queued-message editor now sits directly inside its queue row.

  • Queued-message edits now sit directly inside their queue rows.

No actionable issues found. Tests and visual capture were not run; dependencies are not installed in this checkout.

Reviews (3) · Last reviewed commit: "fix(native-chat): seat the queued-messag..." · Reviewed by Greptile

@coderabbitai

coderabbitai Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Queued-message edits now use an undocked composer layout, edit-specific corner rounding, and conditional minimum and maximum heights. The editing-status icon has a negative right margin. New wide and narrow fixtures render queued cards with an editable card and a stub transport.

Merge Risk: Minimal · up to 3693a

This change fixes the layout of the inline queued-message editor so it sits cleanly inside its queue row. It is renderer-only and presentational, and no concrete risk was found, so it looks safe to merge.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the fix and its scope: the queued-message editor's placement inside its queue row, under the native-chat area. The summary and objectives describe the same change: dock chrome is now a…
Description check Passed The description follows the repository template closely. It has ELI5, What Changed, Why, Linked Issue, Visual Proof with before and after images, Testing, Performance, Risk with level, AI Disclosure, …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the fix and its scope: the queued-message editor's placement inside its queue row, under the native-chat area. The summary and objectives describe the same change: dock chrome is now applied only to docked composers, and the editor is aligned with the queue row. The title is specific and matches the main change.

Full details: Description check

Explanation

The description follows the repository template closely. It has ELI5, What Changed, Why, Linked Issue, Visual Proof with before and after images, Testing, Performance, Risk with level, AI Disclosure, Review, the upstream boundary checkbox, Notes, and Checklist. The root cause, fix, and rationale are explained in detail. The Linked Issue section states 'None' and gives no issue number. The template says an issue should always exist for outside contributors, so this may fail a repository rule, but the author marks the change as an internal fix found while using the queue. The Visual Proof section includes before and after images as required. The Testing section lists macOS only and states that the live Electron app was not tested.

Resolution

Optional: confirm whether the Linked Issue requirement applies to this author. The section states 'None', and the template asks for an issue for outside contributors.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: cd6286b0-55d3-4feb-985b-b0e4e5339286
Commits

Reviewing files that changed from the base of the PR and between 776a09c and 3693a89.

Files selected for processing: 3

  • src/renderer/src/components/native-chat/composer/editor/NativeChatComposerField.tsx
  • src/renderer/src/components/native-chat/queue/editing/NativeChatQueuedMessageComposer.fixture.tsx
  • src/renderer/src/components/native-chat/queue/editing/NativeChatQueuedMessageComposer.tsx
Files skipped from review as they are similar to previous changes: 1

  • src/renderer/src/components/native-chat/queue/editing/NativeChatQueuedMessageComposer.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

The inline queued-message editor mounts the full chat composer with an
editSession, and NativeChatComposerField painted the dock's chrome (the
bg-chat-pane strip, the gutter padding and the centred max-width column)
for every non-launch composer. Inside the queue card that showed up as a
darker, square-cornered band with uneven padding.

Draw that chrome only when docked (!launch && !editSession). The edit
session keeps data-composer-field and @container/composer-field so the
toolbar measurement and card padding clamp still work. The edit card
uses rounded-lg to match the queue card and starts one line tall
(min-h-7, pointer-coarse:min-h-11). The pencil icon's -mr-0.5 puts the
"Editing message" label on the rows' text column while keeping the other
header gaps at 6px. Adds a component fixture for the editing state.

Co-authored-by: Neil <[email protected]>
@nwparker
nwparker force-pushed the fix/queued-edit-inline-composer branch from 776a09c to 3693a89 Compare November 28, 2026 21:27
@nwparker
nwparker merged commit 7907644 into stablyai:main Nov 28, 2026
56 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.

2 participants