Skip to content

fix(bots): truncate long names and subtitles in bot pick lists instead of overflowing - #49261

Merged
nwparker merged 1 commit into
stablyai:mainfrom
dbsghdz1:fix/import-bot-imported-as-overflow
Nov 25, 2026
Merged

nwparker merged 1 commit into
stablyai:mainfrom
dbsghdz1:fix/import-bot-imported-as-overflow

Conversation

@dbsghdz1

@dbsghdz1 dbsghdz1 commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

When you import a bot from another app, a bot you imported before says "imported before as" and its Orca name. A long name pushed that row past the edge of the list, so the words were cut off and the list slid sideways. The Hand to bot list did the same with a long bot purpose. Now every row stays inside the list and long text ends in "…". Hovering the name or subtitle shows the full text.

What Changed

  • Before: in Import from another app (and Hand to bot's bot list), a row whose name or subtitle was wider than the list grew past it. The text was cut off mid-word with no ellipsis, the selected row lost its right border, trailing labels such as "Has it now" were pushed off-screen, and the list scrolled sideways.
  • After: rows end at the list's edge and a long name or subtitle ends in an ellipsis, as BotPickRow's truncate intended. Rows that already fit look exactly the same.
  • How: RadioGroup's rows layout gets grid-cols-1 (repeat(1, minmax(0, 1fr))). Its one implicit column was auto, and a grid item's minimum width is its content's; BotPickRow's name and subtitle are truncate (nowrap), so that minimum was the whole line and the column grew to it. With a minmax(0, 1fr) column a row is exactly as wide as the list, and the existing truncate applies.
  • Hover text: BotPickRow's truncated name and subtitle spans get title={name} / title={detail}, so cut-off text stays readable on hover (on main it could only be read by scrolling the list sideways). This follows the bots folder's existing truncate + title pattern (bot-access-confirm.tsx, BotAccessReach.tsx) and also applies to the group member rows, which already truncated.

Why

#48308 (the footer) and #48454 (the Runs on line) both noted this subtitle overflow as pre-existing and out of scope. Hand to bot hits it more often: each row's subtitle is the bot's purpose, up to 120 characters (BOT_SPECIALTY_MAX_LENGTH).

Only the rows layout changes. Its only users are the two bot pickers (ImportBotSourceList and HandToBotFlow), whose rows are full-width and meant to truncate; default and cards have other users and are left alone. min-w-0 on BotPickRow's button would also fix these two lists, but a rows group's rows should never be wider than the group, and the repo already sizes grids this way (DialogContent uses grid-cols-[minmax(0,1fr)], AgentChoiceControls uses grid min-w-0 grid-cols-1). A native title was chosen over a Radix Tooltip because it needs no extra component, state or portal per row and leaves the RadioGroup's focus behavior unchanged.

Linked Issue

Fixes #49259

Visual Proof

Headless fixture shots of the real ImportBotSourceList plus a Hand to bot style RadioGroup layout="rows" + BotPickRow list (64-character imported name, long purpose, an unbroken disabled row with "Has it now"). The text under each shot is the measured scroller/row widths.

List width 410, before (main) / after:

before 410 after 410

List width 280, before (main) / after:

before 280 after 280

Short text only (no overflow), before / after: byte-identical PNGs:

before short after short

The contributor's original shot of the full Import from another app dialog:

import-list-compare

Testing

  • 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 (no tests added)

Reproduced with throwaway component fixtures (not committed), rendered and measured in headless Chromium on macOS via pnpm fixtures:shot, on main and on this branch:

  • Width 410, main: rows were 517px and 726px inside a 366px group, and the scroller's scrollWidth was 523/732 against clientWidth 378. Text was clipped with no ellipsis and the "Has it now" label was pushed off-screen.
  • Width 410, this branch: rows equal the group width (366px), scrollWidth equals clientWidth (378), text ends in an ellipsis, and "Has it now" stays visible. Same result at width 280 (rows 236px).
  • Short-text control: PNGs are byte-identical before and after, in light and dark themes.
  • The contributor also swept imported-name lengths 0 to 64 at list widths 398px and 278px: every length that fit on main is pixel-identical here, and every length that overflowed now truncates with no sideways scroll.
  • No unit test: this is CSS grid sizing plus a static attribute, and jsdom does no layout, so a test could only assert the class name.
  • Static gates on both files: oxlint, oxfmt, anti-slop oxlint, code-quality native plugins, ast-grep, and the changed-code quality gate all pass.

Performance

None, because this is one static CSS class on the rows grid plus two static title attributes per row; nothing renders more often or does more work, and these lists render only when the bot dialogs open (no JS logic, effects, I/O, IPC or polling). A fixed minmax(0,1fr) track also skips intrinsic content sizing. Measured BotPickRow render old vs new (renderToStaticMarkup, median of 60 after warm-up): 10 rows of 20 characters 0.45 ms vs 0.10 ms (warm-up ordering noise), 500 rows of 120 characters 3.83 ms vs 3.98 ms (within noise). Nothing approaches 16 ms.

Risk

Level: Low

Only RadioGroups with layout="rows" change, which today means the Import from another app and Hand to bot lists; the title change applies to every BotPickRow (including group member rows). A row that fits looks the same; a row wider than the list now truncates instead of widening the list, and hovering shows the full text. The native tooltip also shows when the text is not truncated, which matches the other bots UI that uses truncate + title. A plain revert backs it out.

Review

  • Cross-platform: CSS and a DOM attribute only, no platform branch.
  • SSH/remote: not affected; only layout changes.
  • Mobile: not touched.
  • Security: nothing changes.

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 @dbsghdz1 in #49261; landed on their branch as one squashed commit with their authorship kept.

@dbsghdz1

Copy link
Copy Markdown
Contributor Author

Before (main) and after (this branch): the list part of Import from another app, with an OpenClaw agent imported before as a 64-character bot name. Headless fixture shots of the real ImportBotDialog.

import-list-compare

@coderabbitai

coderabbitai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Walkthrough

The rows layout now uses a single grid column instead of automatic column sizing. The existing gap remains unchanged. The accompanying comment states that the fixed column allows rows to truncate nowrap text. Bot name and detail text spans also receive title attributes. Displayed text and detail rendering conditions remain unchanged.

Severity of issue fixed: Medium

Merge Risk: Low · up to 6bfcc

Long bot names and purposes now truncate with an ellipsis instead of overflowing the list. Mouse users see the full text on hover. Sighted keyboard-only users have no way to read the truncated part, which is a minor accessibility gap that can be followed up after merge.

Pre-merge checks: Passed 4

Check name Status Explanation
Linked Issues check Passed Directly linked issue #49259 requires that a long "imported before as" subtitle in Import from another app truncate with an ellipsis inside the list, with no clipping and no sideways scroll. It also c…
Out of Scope Changes check Passed The whole-PR changes are the rows grid class in radio-group.tsx with its Why: comment, and the BotPickRow change in src/renderer/src/components/bots/BotPickList.tsx. The BotPickList.tsx di…
Title check Passed The title names the fix (truncating long names and subtitles in bot pick lists instead of overflowing), which matches the layout change to the RadioGroup rows grid and the BotPickRow truncate behavior…
Description check Passed The description follows the template closely. It has an ELI5, a before/after account of What Changed, a Why section with alternatives considered, a linked issue (Fixes #49259), visual proof with befor…
Full details: Linked Issues check

Explanation

Directly linked issue #49259 requires that a long "imported before as" subtitle in Import from another app truncate with an ellipsis inside the list, with no clipping and no sideways scroll. It also covers the same overflow in Hand to bot, which uses the same RadioGroup layout="rows" and BotPickRow. The whole-PR diff against the merge base changes radioGroupVariants.layout.rows in src/renderer/src/components/ui/radio-group.tsx from grid gap-0.5 to grid grid-cols-1 gap-0.5. The column becomes repeat(1, minmax(0, 1fr)), so a grid item's automatic minimum no longer sets the column width. The existing truncate in BotPickRow then applies. This addresses the mechanism in the issue. The default and cards layouts are unchanged. The issue does not require an automated test. The visual results come from the author's headless Chromium measurements, which I did not re-run. The current head also adds title attributes in BotPickRow (BotPickList.tsx). These do not affect the layout requirement. No coding requirement from #49259 is unmet.

Full details: Out of Scope Changes check

Explanation

The whole-PR changes are the rows grid class in radio-group.tsx with its Why: comment, and the BotPickRow change in src/renderer/src/components/bots/BotPickList.tsx. The BotPickList.tsx diff against the merge base adds title={name} to the name span and title={detail} to the detail span. It does not change displayed text or rendering conditions. The title attributes show the full text on hover for the same truncated spans that this PR fixes, so they relate to the truncation work in #49259. They are not unrelated. The PR description says "I left a tooltip out to keep this to the layout," and the commit message says the change adds title attributes. This contradiction is a description accuracy issue, not a scope failure. The title attributes are set even when text is not truncated, which is a minor UX side effect. I did not audit the full file list, so changes outside these two files are not covered by direct evidence.

Full details: Title check

Explanation

The title names the fix (truncating long names and subtitles in bot pick lists instead of overflowing), which matches the layout change to the RadioGroup rows grid and the BotPickRow truncate behavior. It follows the conventional-commit style and is specific enough for a teammate scanning history. It does not mention the added hover title attributes, which is a secondary change.

Full details: Description check

Explanation

The description follows the template closely. It has an ELI5, a before/after account of What Changed, a Why section with alternatives considered, a linked issue (Fixes #49259), visual proof with before/after images, detailed testing notes, a Performance line, a Risk section with level and revert path, and a completed checklist. Two gaps remain. The Testing section checks the automated-tests box while stating that no test was added, and the 'manually tested' box is unchecked. The Why section says a tooltip was left out, but the change adds native title attributes, which the Hover text bullet describes. The PR objectives note this same inconsistency. The author should reconcile the Why wording with the hover change.

Resolution

Reconcile the Why section, which says a tooltip was left out, with the What Changed and Hover text bullets, which describe added title attributes. Also clarify the Testing checkboxes: the manual-test box is unchecked while the automated-test box is checked with no tests added.

  • 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

…d of overflowing

RadioGroup's rows layout was a grid with one implicit auto column, and a
grid item's minimum width is its content's. BotPickRow's name and
subtitle are truncate (nowrap), so a long "imported before as <name>" in
Import from another app, or a long purpose in Hand to bot, widened the
row past the list: the text was cut mid-word with no ellipsis and the
list scrolled sideways.

Give the rows layout one minmax(0, 1fr) column (grid-cols-1) so a row is
as wide as the list and its text truncates, and add title attributes to
BotPickRow's truncated name and subtitle so the full text shows on hover.

Fixes stablyai#49259

Co-authored-by: Neil <[email protected]>
@nwparker
nwparker force-pushed the fix/import-bot-imported-as-overflow branch from 915a811 to 6bfcc2b Compare November 25, 2026 21:18
@nwparker nwparker changed the title fix(bots): truncate long subtitles in bot pick lists instead of overflowing fix(bots): truncate long names and subtitles in bot pick lists instead of overflowing Nov 25, 2026

@coderabbitai coderabbitai 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.

Minor comments: 1

src/renderer/src/components/bots/BotPickList.tsx: 1

154-154: Minor · Functional Correctness · Poor tradeoff

Keyboard-only users cannot read truncated bot names or purposes.

With the rows layout, long names and details truncate with an ellipsis. The full text appears only in a title tooltip, which is not reliably exposed to keyboard users (MDN). A sighted keyboard-only user therefore cannot tell apart two entries whose names or purposes differ only after the truncated prefix.

Screen-reader users still receive the full text through the button's content. Before this change, horizontal scrolling exposed the full text. This change removes that route, so the gap is a limitation of the truncation design rather than a broken workflow.

Provide a way for keyboard-only users to read the full name and detail, such as a focus-triggered reveal. Keep the title attributes for pointer users. Choose the reveal mechanism when implementing this change.

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: f940ae31-07e9-4e62-80c8-56049558ebe8
Commits

Reviewing files that changed from the base of the PR and between 915a811 and 6bfcc2b.

Files selected for processing: 1

  • src/renderer/src/components/bots/BotPickList.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.

@nwparker
nwparker merged commit a0af8c2 into stablyai:main Nov 25, 2026
55 of 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.

[Bug]: A long "imported before as" name runs past the Import from another app list

2 participants