Skip to content

fix(native-chat): tighten response controls and the gap above orchestration updates - #44857

Merged
brennanb2025 merged 3 commits into
mainfrom
brennanb2025/chat-update-row-gap
Nov 20, 2026
Merged

brennanb2025 merged 3 commits into
mainfrom
brennanb2025/chat-update-row-gap

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Problem

In chat, every "Update from " row had ~56px of empty space above it, much more than between other turns. A response's copy / fork / time row also sat 12px under its own text but flush against the next message (0px above the person's bubble), so it read as belonging to whatever came next.

Root cause

Two spacing sources, both in the response controls:

  • NativeChatAgentControls puts mt-3 (12px) between the text and the controls.
  • markNativeChatResponseActionsHang lets the 24px controls row hang -mb-5 (20px), the whole row gap, but only above the person's bubble. Above an agent's update card it kept its full height, even though on older responses it is hidden until hover: 12 + 24 + 20 = 56px of mostly empty space.

Goal

A response's actions should sit close under its own text, with a clearly larger gap before the next message, so the actions read as part of the response they act on.

Fix

  • Controls sit 4px under their text (mt-1).
  • Above the row opening the next turn, the person's bubble or an agent's message card, they hang 4px (-mb-1), leaving 16px before it. With that clearance the same rule holds whether the controls are shown or hover-only, on touch devices too, and nothing shifts when a newer response arrives.
  • Elsewhere (a notice, tool run, the turn's bar) they keep their height, as before: 4px above, 20px below.
  • The row-height estimate charges the new 4px overhang.
Gap (px) text → controls controls → next text → next
Before, above an update card 12 20 56
Before, above the person's bubble 12 0 36
After, above an update card (hovered or not, latest or older) 4 16 44
After, above the person's bubble 4 16 44
After, latest response at the end 4 n/a n/a

Measured in a dev build with real worker updates.

Before / after

Before After After, hovered
(screenshot removed: contained real product data) (screenshot removed: contained real product data) (screenshot removed: contained real product data)

Above the person's bubble, hovered:

(screenshot removed: contained real product data)

Files Added Deleted Net
Test 0 0 0 0
Prod 6 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​42 $\color{#cf222e}{\Huge{\mathbf{−}}}$​26 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​16

A response's copy/fork/time row is hover-only on every response but the
latest, yet it kept its full height above an agent's update card, leaving
~56px of empty space before each "Update from" row. Let hover-only
controls hang into the gap above an agent's card that opens the next turn,
as they already do above the person's bubble; shown controls still keep
clear of it (#40639).
…t from the next turn

Controls now sit 4px under their response (was 12px) and hang only 4px
into the gap above the row opening the next turn (was 20px), leaving 16px
before the person's bubble or an agent's update card. With that clearance
they can hang above an update card whether shown or hover-only, so both
openers get the same 44px gap and nothing shifts when a newer response
arrives.
@brennanb2025 brennanb2025 changed the title fix(native-chat): drop the extra gap above orchestration update rows fix(native-chat): tighten response controls and the gap above orchestration updates Nov 19, 2026
@brennanb2025

brennanb2025 commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor Author

Review status

Problem: about 56px of empty space above each "Update from" orchestration row, and response controls that sat 12px under their text but flush against the person's next bubble.

User-facing change: controls now sit 4px under their response and 16px clear of the next turn's opening row, whether that's the person's bubble or an update card. Both openers get the same 44px gap (was 56px above update cards, 36px above bubbles). The spacing is the same whether controls are shown, hover-only, on touch devices, focused, or have a fork pending.

Fixed during review: the first revision hung controls 20px above update cards only on older responses. On touch devices, with keyboard focus or with a fork pending, those controls touched the card, whose click area reached 2px into them. It also caused a 20px jump when a newer response arrived. Both are gone with the 4px hang.

Deferred (P3):

  • The text-to-controls gap is 4px after a paragraph and 8 to 12px after a list, code block or table, because the larger margin wins.
  • Each response with controls is now estimated 24px short instead of 16px. Rows correct themselves once measured.

Verified:

  • Dev build with real worker updates, every gap measured (table and screenshots in the description).
  • Native-chat unit tests: 98 files pass.
  • remote-check passed (31 checks) on 36d4a4c.
  • Two fresh review passes. The second pass (Claude and Codex) found no P0 to P2 issues.

@brennanb2025
brennanb2025 marked this pull request as ready for review November 19, 2026 19:54
@coderabbitai

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The slot predicate now includes qualifying user-role rows with agent-authored input. The response controls use this predicate when determining whether to hang above the next turn’s opening row. The controls’ top margin changes from mt-3 to mt-1, and their hanging margin changes from -mb-5 to -mb-1. The row-height overhang estimate decreases from 20px to 4px. The transcript fixture adds a case showing the latest response’s controls above a newly arrived worker card.

Merge Risk: Minimal · up to 00cc0

This is a small spacing adjustment to chat response controls. It carries no apparent functional or performance risk and is ready to merge.

Pre-merge checks: Passed 3 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Description check Warning The description states the problem, root cause, goal, fix, and a before/after spacing table, so the author explains the mechanism and the user-visible change. It also includes before/after images and … Add the following: (1) an ELI5 section in plain language; (2) a real issue reference under Linked Issue, replacing the blank "Fixes #", or confirm the author is a maintainer who attaches only pre-existing issues; (3) testing steps a reviewe…
Passed Passed checks: 3 passed

Check name Status Explanation
Title check Passed The title names the native-chat area and the two changes in the diff: tighter response controls (mt-3 to mt-1, -mb-5 to -mb-1, overhang constant 20px to 4px) and the gap above orchestration/worker upd…
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 native-chat area and the two changes in the diff: tighter response controls (mt-3 to mt-1, -mb-5 to -mb-1, overhang constant 20px to 4px) and the gap above orchestration/worker update rows. It is specific and accurate, though long at 83 characters.

Full details: Description check

Explanation

The description states the problem, root cause, goal, fix, and a before/after spacing table, so the author explains the mechanism and the user-visible change. It also includes before/after images and the author's measurements, which covers the template's Visual Proof requirement. Several template sections are missing or left as placeholders: the ELI5 section, the Linked Issue section ("Fixes #" is blank), the Testing checklist (no test steps or platforms listed beyond unit-test counts and the remote-check run), the Risk section (no Level and no revert note), the Review and Agent skill upstream boundary sections, and the Checklist. The AI Disclosure section is also absent, though the author may be a StablyAI team member, which would make it optional.

Resolution

Add the following: (1) an ELI5 section in plain language; (2) a real issue reference under Linked Issue, replacing the blank "Fixes #", or confirm the author is a maintainer who attaches only pre-existing issues; (3) testing steps a reviewer can follow, the platforms actually tested (macOS, Linux, Windows, or SSH), and the status of the checkboxes; (4) a Risk level (Low, Medium, or High), the riskiest part of the change, what users would see if it failed, and how to back it out; (5) the Agent skill upstream boundary checkbox, or an explicit statement that it does not apply; (6) the AI Disclosure section, or confirmation that the author is a StablyAI team member; (7) a completed Checklist with the lint, typecheck, test, and build status.

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

Warning

The configuration directory could not be loaded. This review used the available YAML and UI settings; directory instructions and checks were not evaluated.

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: a3f99085-4f90-4e7f-87ca-dafe5e44bdaa
Commits

Reviewing files that changed from the base of the PR and between 36d4a4c and 00cc0d4.

Files selected for processing: 1

  • src/renderer/src/components/native-chat/messages/rows/NativeChatTranscriptRow.fixture.tsx

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

@brennanb2025

brennanb2025 commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor Author

Review status update: added the component fixture NativeChatTranscriptRow:latestResponseActionsAboveUpdate. It shows the latest response, whose controls are always shown, above a worker's update card that just arrived. Its screenshot shows the controls 4px under their text and clear of the card. A fresh Codex review of this fixture-only commit found nothing. No shipped code changed since the last status comment.

native-chat__messages__rows__NativeChatTranscriptRow--latestResponseActionsAboveUpdate dark

@brennanb2025
brennanb2025 merged commit 1c554b4 into main Nov 20, 2026
40 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