Skip to content

fix(ui): size localized sidebar Send controls without overlap - #18474

Merged
nwparker merged 6 commits into
stablyai:mainfrom
hwantage:fix/sidebar-agent-send-label-overflow
Oct 24, 2026
Merged

nwparker merged 6 commits into
stablyai:mainfrom
hwantage:fix/sidebar-agent-send-label-overflow

Conversation

@hwantage

@hwantage hwantage commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

Localized sidebar Send labels can wrap into two lines inside the 20px control. This was reproduced on current main with Korean at both the minimum 220px and default 280px sidebar widths.

Keep the label on one line and let its existing flex slot reserve the actual button width. Reuse the normal-flow layout already used by rows with child controls. The model badge keeps its prior natural width (max 96px); during send-target selection it may shrink only when the in-flow Send button would otherwise overflow the row (220px sidebar with a long model id or a long label such as French). Existing event handlers, disabled state, colors and row/button heights remain.

Based on @hwantage’s original fix in #18474; original commit b288aec0e06080051a79481b03ef4193861f0d32 is preserved in branch ancestry. The nowrap-only patch leaves the button outside its fixed 48px reservation and overlaps the neighboring label by 2.4375px; this refinement restores a 6px gap.

Fixes #18473.

Validation:

  • 39/39 tests passed across DashboardAgentRow, WorktreeCardAgents send-target, and existing subagent row pixel snapshots.
  • Hidden Electron/CDP checks passed for 224 rendered states: all seven shipped locales, dark/light themes, 220/280px widths, and eligible/sending/disabled/normal/child/expander/model cases. Labels stay on one line; buttons remain 20px high, rows 30px high, and adjacent labels retain room.
  • Pointer, Enter and Space sends, disabled sends, child disclosure, detail expansion and row activation passed.
  • Changed-code quality gate, targeted formatting and diff checks passed. Independent review found no blockers; merge risk LOW.

The renderer fixture uses the real row, controls, translations, CSS and fonts, with synthetic row props/callbacks and conversation-title lookup stubbed. It does not exercise backend sends or the full diff-note workflow. Native Windows/Linux font rendering, physical mobile and the full web typecheck were not run. No wire, backend or workspace-model changes.

Before and after (Korean, 220px and 280px):

Before After
Before: Korean Send label wraps After: Korean Send label stays on one line with room for the task

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

  • whitespace-nowrap on the send-target button — adds whitespace-nowrap to the button class list so CJK labels (e.g. 보내기, 发送, 送信) render on one line instead of breaking per-character inside the fixed h-5 control.
  • Regression assertion — extends the existing "eligible send-target" test to assert the whitespace-nowrap token is present.

The change is minimal, idiomatic Tailwind, and correctly scoped to the single absolutely-positioned button. The new assertion is meaningful rather than tautological: for this render path DashboardAgentRowMessage emits no whitespace-nowrap token, so the assertion genuinely pins the button's class and will fail if the class is dropped.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@coderabbitai

coderabbitai Bot commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

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: fa5dde7c-8aa4-4bcb-88d1-699aa8c23525
Commits

Reviewing files that changed from the base of the PR and between 28b2653 and 655a1cf.

Files selected for processing: 1
  • src/renderer/src/components/dashboard/DashboardAgentRow.tsx
Files skipped from review as they are similar to previous changes: 1
  • src/renderer/src/components/dashboard/DashboardAgentRow.tsx

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

Walkthrough

The dashboard send-target button now uses the trailing-controls flex layout and keeps its label on one line. The container adjusts its width and gap based on the presence of an eligible or sending button and a child disclosure. The model label can shrink for eligible or sending statuses. The eligible-row test no longer expects absolute positioning or a fixed width.

Priority: Normal

Severity of issue fixed: Medium

Merge Risk: Minimal · up to 655a1

No merge-blocking issue is established for the sidebar Send layout change; it is ready for normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title "fix(ui): size localized sidebar Send controls without overlap" matches the main change. The diff sizes the localized Send button and label in the sidebar agent rows so the label stays on on…
Description check Passed The description is thorough and mostly complete against the template. It covers the user-facing problem (Korean Send label wrapping in the 20px control), the mechanism (keep the label on one line, res…
Linked Issues check Passed Issue #18473 requires localized sidebar Send target labels to stay on one line and avoid vertical or horizontal overflow at minimum and default sidebar widths. At head 655a1cf, DashboardAgentRowTraili…
Out of Scope Changes check Passed All changed code supports the send-target sizing objective of #18473. The trailing-controls file changes the send-target button class list and the trailing slot width rules. It removes absolute positi…
Full details: Title check

Explanation

The title "fix(ui): size localized sidebar Send controls without overlap" matches the main change. The diff sizes the localized Send button and label in the sidebar agent rows so the label stays on one line and does not overlap neighboring content. The title is specific and describes the primary fix, so it passes.

Full details: Description check

Explanation

The description is thorough and mostly complete against the template. It covers the user-facing problem (Korean Send label wrapping in the 20px control), the mechanism (keep the label on one line, reserve the button width through the existing flex slot, and reuse the normal-flow layout), and the reason for the refinement over the nowrap-only patch. It includes a Testing section with validation details and a Before/After visual table. It has a linked issue (Fixes #18473) and states that no backend or wire changes were made. Gaps: the Testing checklist boxes are unchecked, the AI Disclosure section is left blank (it applies only to non-team contributors), and the Agent skill upstream boundary checkbox is unchecked. The Review and Notes sections are not filled in. These are non-critical gaps, so the description passes.

Full details: Linked Issues check

Explanation

Issue #18473 requires localized sidebar Send target labels to stay on one line and avoid vertical or horizontal overflow at minimum and default sidebar widths. At head 655a1cf, DashboardAgentRowTrailingControls.tsx gives the send-target button whitespace-nowrap and h-5. The label cannot break between CJK characters or between words. The button no longer uses absolute positioning. It is now in normal flow inside the trailing-controls flex span. When a child disclosure exists, the span keeps gap-1. When no disclosure exists and a send target is active, the span uses min-w-12, so the slot grows to at least the button width. This removes the overlap with the neighboring label described in the issue. DashboardAgentRow.tsx applies min-w-0 to the model badge only when sendTargetStatus is eligible or sending. Outside send mode the badge keeps max-w-24 shrink-0, and its rendered class order matches main. The test change in DashboardAgentRow.test.tsx removes the absolute and w-12 expectations and keeps the h-5 expectation. The author reports rendered checks at 220px and 280px across seven locales. I did not re-run those checks. The code evidence supports the requirement.

Full details: Out of Scope Changes check

Explanation

All changed code supports the send-target sizing objective of #18473. The trailing-controls file changes the send-target button class list and the trailing slot width rules. It removes absolute positioning and the disclosure-only static override, and it adds whitespace-nowrap. The row file changes the model badge shrink class only when a send target is active. The follow-up commits restored the badge's non-send class order to match main. The test file changes only the expected classes for the eligible send-target button. Event handlers, disabled state, colors, and locale catalogs are not changed in the reviewed diff. The PR reports no wire, backend, or workspace-model changes, and the reviewed diff for the three files shows none. No unrelated change is present.

  • 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

Comment @coderabbitai help to get the list of available commands.

- Keep localized send-target labels on one line inside the fixed-height sidebar control. Add a regression assertion for the nowrap utility.
@hwantage
hwantage force-pushed the fix/sidebar-agent-send-label-overflow branch from 035a03c to b288aec Compare September 29, 2026 10:44
@greptile-apps

greptile-apps Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Low risk] Adds text wrapping prevention to a sidebar button.

The PR appears safe to merge.

Summary

The PR adds whitespace-nowrap to the sidebar agent send-target button and asserts that the class appears in the existing row test.

  • No actionable regression was identified in the changed code.

Reviews (1) · Last reviewed commit: "fix(ui): prevent sidebar agent send labe..."

nwparker and others added 2 commits October 23, 2026 04:17
Keep Send labels on one line and size their flex slot to the button. Share remaining task/model space while selecting a send target so longer translations cannot obscure the primary label.

Co-authored-by: hwantage <[email protected]>
@nwparker nwparker changed the title fix(ui): prevent sidebar agent send labels from wrapping fix(ui): size localized sidebar Send controls without overlap Oct 23, 2026
The badge keeps its natural width and only shrinks when the in-flow Send
button would otherwise overflow the row, instead of splitting the row with
the task label.
@nwparker

Copy link
Copy Markdown
Contributor

Maintainer follow-up (28b2653): merged current main and reverted the model badge's send-mode min-w-0 flex-1, which gave it an equal share of the row. The badge keeps its prior natural width (max-w-24). In send-target mode it is allowed to shrink only when the in-flow Send button would otherwise overflow the row. Hidden-Electron fixture checks across en/ko/zh/ja/es/fr/pt at 220px and 280px, including short and long model ids: Send stays on one line, the button stays inside the row with a 6px gap, and row and button heights are unchanged. The badge width differs from main only in the 8 cases where main overlapped or overflowed. Dashboard/WorktreeCardAgents tests pass (524), and oxlint/oxfmt are clean.

@nwparker

Copy link
Copy Markdown
Contributor

Follow-up 655a1cf: kept the badge's class order identical to main outside send mode. CI flagged an exact-markup snapshot in subagent-child-row-fallback-pixels.test.tsx, and outside send mode the rendered markup now matches main byte for byte. Sidebar and dashboard suites pass locally (439 files).

@nwparker
nwparker merged commit 1af3a3f into stablyai:main Oct 24, 2026
33 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.

[Bug]: Sidebar agent Send target labels wrap and overflow in localized UIs

2 participants