Skip to content

fix(native-chat): space the queued row's icons evenly - #48564

Merged
AmethystLiang merged 1 commit into
mainfrom
AmethystLiang/queued-row-icon-gaps
Nov 24, 2026
Merged

AmethystLiang merged 1 commit into
mainfrom
AmethystLiang/queued-row-icon-gaps

Conversation

@AmethystLiang

@AmethystLiang AmethystLiang commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

The small icons on a queued message row (edit, delete, image count, expand, Retry/Steer) sat at uneven distances from each other. Now they are evenly spaced.

Files Added Deleted Net
Test 0 0 0 0
Prod 5 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​123 $\color{#cf222e}{\Huge{\mathbf{−}}}$​5 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​118

What Changed

  • The row's right-hand cluster no longer adds its own 4px gap. Every control's own padding now sets the spacing, the same way the hover-revealed Edit/Delete buttons (which sit outside that flow) were already spaced.
  • The image count, when shown in a queued row, gets the same 24px height and 5px side padding as the icon buttons. Its icon-to-number spacing is unchanged. The editing header still shows it unpadded.
  • The expand chevron's button is 20px wide instead of 24px. The chevron glyph is thinner than the other icons, so a full-width box left extra space on both sides of it.
  • The waiting agent-mail actions (Steer, Edit, Delete) drop their 2px gap so they use the same spacing as the queued row.
  • New fixtures: rows with images (failed, queued, not editable, no image), with the tools shown and at rest, and the waiting agent-mail actions.

Measured space between visible glyphs (CSS px, 380px pane):

Pair (failed row with an image) Before After
pencil → trash 11.5 11.5
trash → image 7.0 12.0
image count → chevron 13.5 12.5
chevron → Retry icon 18.5 12.5

Across every row variant, icon-to-icon gaps went from 7.0–19.5 to 11.5–14.0. The remaining difference on the Steer side comes from the ↳ glyph's own inset inside the unchanged Steer button.

Why

Edit and Delete are positioned absolutely, so the cluster's gap-1 never applied to them. The image count was a bare span with no padding. Together those made the trash-to-image gap tight and the chevron-to-Retry gap wide. Letting each control's box carry the spacing makes the gaps uniform without moving or resizing the hover tools, so the text fade mask under them stays the same width.

Linked Issue

N/A (internal design fix)

Visual Proof

Component fixtures with invented data, at the narrowest pane width (380px). At rest, with each row hovered, and the waiting agent-mail actions.

Light:
queued-row-gaps-light.png

Dark:
queued-row-gaps-dark.png

Testing

  • Rendered the queued-row fixtures before and after, light and dark, hovered and at rest, and measured gaps from pixel captures.
  • Existing queue tests pass (NativeChatQueuedMessageList.test.tsx). Web and node typecheck, oxlint and format pass locally. CI covers the full gate.
  • No new unit test: this is a spacing-only change, and asserting class names would not catch a visual regression. The fixtures cover it.

Performance

None, because this only changes static CSS classes on existing elements. It adds no renders, effects or listeners.

Risk

Level: Low. Spacing only, in the queued message rows and the waiting agent-mail actions. The chevron's hit area is 4px narrower (20×24). To back out, revert this commit.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I stated the risk
  • Screenshots attached
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (renderer CSS only)

@coderabbitai

coderabbitai Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Queued-message controls now use updated spacing and sizing classes. The image-count component accepts an optional className. New fixtures cover narrow queued-message rows with different attachment and tool states, and waiting-agent mail action rows with different editability.

Merge Risk: Minimal · up to 64ece

This is a spacing-only adjustment to queued message rows and waiting agent-mail actions. It does not change behavior, and no concrete risk was found. It is ready to merge after the normal CI checks.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "fix(native-chat): space the queued row's icons evenly" names the primary change. The PR removes the row cluster's gap and moves spacing into each control's padding, so icon spacing in queue…
Description check Passed The description follows the repository template. It includes ELI5, What Changed, Why, Linked Issue (marked N/A with a reason), Visual Proof with before/after images for light and dark themes, Testing,…
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 "fix(native-chat): space the queued row's icons evenly" names the primary change. The PR removes the row cluster's gap and moves spacing into each control's padding, so icon spacing in queued rows and waiting agent-mail actions becomes even. The title is specific and concise, and it follows a conventional-commit style.

Full details: Description check

Explanation

The description follows the repository template. It includes ELI5, What Changed, Why, Linked Issue (marked N/A with a reason), Visual Proof with before/after images for light and dark themes, Testing, Performance, Risk with a level, and a completed checklist. The AI Disclosure and Agent skill upstream boundary sections are not filled in. The AI Disclosure section is conditional for internal contributors, and the upstream boundary checkbox is unchecked. The Review section is empty.

  • 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: a27bf540-e71c-4b0c-b61d-098b66b7c12f
Commits

Reviewing files that changed from the base of the PR and between 4624954 and 64eceed.

Files selected for processing: 5

  • src/renderer/src/components/native-chat/queue/NativeChatQueuedMessageCard.tsx
  • src/renderer/src/components/native-chat/queue/NativeChatQueuedMessageImageCount.tsx
  • src/renderer/src/components/native-chat/queue/NativeChatQueuedMessageRowTools.fixture.tsx
  • src/renderer/src/components/native-chat/queue/NativeChatWaitingAgentMailActions.fixture.tsx
  • src/renderer/src/components/native-chat/queue/NativeChatWaitingAgentMailActions.tsx

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

@AmethystLiang
AmethystLiang merged commit 64b0b4a into main Nov 24, 2026
54 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