You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(bots): keep Cancel inside the Import dialog when the bot name is long - #48308
When you import a bot with a long name, the big "Create " button grew so wide that it pushed the Cancel button off the side of the dialog, so you could not back out. Now the button shortens its label with "…" when space runs out, and Cancel always stays visible. Short names look exactly the same as before.
What Changed
src/renderer/src/components/bots/ImportBotDialog.tsx, class names only.
Before: in Bots > New bot > Import from another app, the primary button reads Create {name} or Update {bot}. Button is shrink-0 whitespace-nowrap, and the footer is a right-aligned flex row in a 448px dialog. With a name of about 30+ characters (the field allows 64), the button got wider than the footer, and the hint and Cancel ended up off the dialog's left edge. Below the 640px sm breakpoint (the footer stacks), a wide 64-character CJK name overflowed both sides.
After: both primary buttons get max-w-full min-w-0 shrink, with the label in a truncate span, so the label ends in an ellipsis instead of overflowing. max-w-full also clamps the button in the stacked layout. The two hint spans (Add its folder / remote-host hint, and Keys and logins stay behind) get max-w-max flex-1: when the row fits they fill exactly the space main gave them, so the layout matches main to the pixel; when main would overflow, the hint stops at its min-content and only the button shrinks.
Why
With a long name there was no Cancel to click. Truncating keeps the name in the button (it is deliberate here) and the full name is still visible in the Name input right above it; the button's accessible name is unchanged since truncation is CSS only. A width floor on the hint (for example min-w-1/3 wrap-anywhere) was measured and rejected: it truncated Create {name} for 18 to 34 character names that main shows whole.
Headless component fixture of the dialog (1280px viewport unless noted). Name: Customer Support Escalation Assistant for the Billing Team 2026.
Long name, no bots found
Before
After
Update for a long-named bot imported before
Before
After
Stacked footer (620px), 64-character CJK name
Before
After
Short name Molty (unchanged)
Before
After
Testing
Reproduced on main with a scratch component fixture (not committed) rendered headlessly and measured with Playwright against the dialog bounds (dialog x 152..600 at 1280px, 32..620 stacked):
state
main
this PR
short name Molty
hint 177..253, Cancel 386..457, button 465..575
identical (footer pixel-identical)
long name, no bots
hint -53..-20, Cancel -12..59 (off dialog)
hint 177..210, Cancel 218..289, button 297..575 truncated
long CJK name
Cancel -86..-15
Cancel 218..289, button 297..575 truncated
Hermes bot picked, long name
Cancel -12..59
Cancel 223..294, button 302..575 truncated
Update, long bot name
Cancel -15..55
Cancel 177..248, button 256..575 truncated
stacked 620px, 64-char CJK
button -128..780
button 57..595 truncated
A wider sweep (names of 0 to 63 characters, the remote-host hint, 1280/620/360px) matched main to the pixel wherever main fit, and kept every footer item inside the dialog where main overflowed. Tested on macOS (headless Chromium); the change is CSS only with no platform branch.
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 unit test: layout-only change, which the test anti-patterns guide says not to unit test. NewBotDialog.test.tsx passes; oxlint, oxfmt, anti-slop, native code-quality, ast-grep and the changed-code quality gate are clean.
Performance
None, because this only changes Tailwind classes on four elements of a modal dialog footer: no JS, effects, I/O or polling. Measured forced reflow of the footer stays within noise (about 0.02 ms on main vs 0.023 to 0.034 ms here).
Risk
Level: Low
One file, class names only. The riskiest part is the hint: with a long name it is squeezed to its longest word (the same width main squeezed it to). A host label with no break point wider than about 313px still overflows, exactly as on main. A plain revert backs it out.
Review
Cross-platform: class names only, no platform branch, shortcut or path.
SSH/remote: no host code touched; the remote-host hint state was measured.
Mobile: mobile/src/bots/MobileBotImportSheet.tsx is a separate sheet and is unaffected.
DialogFooter and Button are unchanged, so other dialogs are unaffected.
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
Original fix by @akira-fukue in #48308; the button truncation is theirs, and the hint sizing and stacked-layout clamp were adjusted in review. Pre-existing and out of scope: the imported before as <long name> subtitle in ImportBotSourceList can overflow the dialog's right edge.
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)
No actionable comments were generated in the recent review.
Walkthrough
The import dialog footer now constrains the width of its notices and allows the Update and Create button labels to truncate. Button enablement and click actions remain unchanged.
Severity of issue fixed: Low
Merge Risk: Minimal · up to 5f707
This change keeps Cancel and the hint visible in the Import dialog when a bot name is long, by truncating the primary button label. It is a layout-only change with no behavioral logic changes, so merge risk is minimal.
Pre-merge checks: 4
Check name
Status
Explanation
Linked Issues check
Issue #48307 requires that a long name cut the Create {name} label with an ellipsis, while Cancel and the hint stay visible. At the reviewed head, src/renderer/src/components/bots/ImportBotDialog.tsx …
Out of Scope Changes check
The changes at the reviewed head are limited to class names on the footer's hint spans and the two primary buttons in ImportBotDialog.tsx. Every changed element belongs to the footer of the dialog nam…
Title check
The title names the fix and its scope: keeping the Cancel button inside the Import dialog when the bot name is long. The raw summary confirms the change to the footer and primary button classes in Imp…
Description check
The description follows the template closely. It has ELI5, What Changed, Why, Linked Issue (Fixes #48307), Visual Proof with before/after images, Testing with a measurement table and checkboxes, Perfo…
Full details: Linked Issues check
Explanation
Issue #48307 requires that a long name cut the Create {name} label with an ellipsis, while Cancel and the hint stay visible. At the reviewed head, src/renderer/src/components/bots/ImportBotDialog.tsx sets both primary buttons (Update {{bot}} and Create {{name}}) to max-w-full min-w-0 shrink, and wraps each label in a <span className="truncate">. The span has overflow hidden, so it can shrink below its text width and show an ellipsis. Cancel keeps the Button base shrink-0 whitespace-nowrap, so it is not compressed. The hint spans use mr-auto max-w-max flex-1 and can shrink, but they remain in the footer and wrap instead of leaving the dialog. The PR text describes a different hint class set (shrink-0 with max-w-3/5). That description does not match the code at head, so the code is the basis for this verdict. The rendered layout was not independently measured. The author's macOS measurements support the mechanism but were not re-run here. No automated test covers the layout; the issue does not require one.
Full details: Out of Scope Changes check
Explanation
The changes at the reviewed head are limited to class names on the footer's hint spans and the two primary buttons in ImportBotDialog.tsx. Every changed element belongs to the footer of the dialog named in #48307. No unrelated logic changed: button enablement, click handlers, and create/update behavior are unchanged in the file. The PR description's claim of a max-w-3/5 hint cap and shrink-0 on the hint does not appear in the code at head. This is a description accuracy issue, not an out-of-scope change.
Full details: Title check
Explanation
The title names the fix and its scope: keeping the Cancel button inside the Import dialog when the bot name is long. The raw summary confirms the change to the footer and primary button classes in ImportBotDialog.tsx, so the title matches the main change. It is 73 characters, a little long but within normal range.
Full details: Description check
Explanation
The description follows the template closely. It has ELI5, What Changed, Why, Linked Issue (Fixes #48307), Visual Proof with before/after images, Testing with a measurement table and checkboxes, Performance, Risk with level, Review, Agent skill upstream boundary, Notes, and Checklist. The AI Disclosure section is left blank, which the template allows for internal contributors, and the author does not say whether they are internal. The Performance line is complete. The main gap is that the Visual Proof section relies on headless fixture images rather than a live-app capture, but it is still a before/after comparison as the template asks.
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.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
…long
The Import dialog's primary button reads "Create {name}" or "Update {bot}".
Button is shrink-0 and whitespace-nowrap, so with a name of about 30+
characters it grew wider than the footer and pushed the hint and Cancel off
the dialog's left edge.
Both primary buttons now get max-w-full min-w-0 shrink with the label in a
truncate span, so the label ends in an ellipsis instead of overflowing, and
max-w-full keeps the button inside the stacked footer below 640px. The hint
spans get max-w-max flex-1, so when the row fits the layout matches main
exactly and only the button shrinks once it would overflow.
Fixesstablyai#48307
Co-authored-by: Neil <[email protected]>
nwparker
changed the title
fix(bots): keep Cancel in the Import dialog when the bot name is long
fix(bots): keep Cancel inside the Import dialog when the bot name is long
Nov 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
When you import a bot with a long name, the big "Create " button grew so wide that it pushed the Cancel button off the side of the dialog, so you could not back out. Now the button shortens its label with "…" when space runs out, and Cancel always stays visible. Short names look exactly the same as before.
What Changed
src/renderer/src/components/bots/ImportBotDialog.tsx, class names only.Create {name}orUpdate {bot}.Buttonisshrink-0 whitespace-nowrap, and the footer is a right-aligned flex row in a 448px dialog. With a name of about 30+ characters (the field allows 64), the button got wider than the footer, and the hint and Cancel ended up off the dialog's left edge. Below the 640pxsmbreakpoint (the footer stacks), a wide 64-character CJK name overflowed both sides.max-w-full min-w-0 shrink, with the label in atruncatespan, so the label ends in an ellipsis instead of overflowing.max-w-fullalso clamps the button in the stacked layout. The two hint spans (Add its folder/ remote-host hint, andKeys and logins stay behind) getmax-w-max flex-1: when the row fits they fill exactly the space main gave them, so the layout matches main to the pixel; when main would overflow, the hint stops at its min-content and only the button shrinks.Why
With a long name there was no Cancel to click. Truncating keeps the name in the button (it is deliberate here) and the full name is still visible in the Name input right above it; the button's accessible name is unchanged since truncation is CSS only. A width floor on the hint (for example
min-w-1/3 wrap-anywhere) was measured and rejected: it truncatedCreate {name}for 18 to 34 character names that main shows whole.Linked Issue
Fixes #48307
Visual Proof
Headless component fixture of the dialog (1280px viewport unless noted). Name:
Customer Support Escalation Assistant for the Billing Team 2026.Long name, no bots found
Update for a long-named bot imported before
Stacked footer (620px), 64-character CJK name
Short name
Molty(unchanged)Testing
Reproduced on main with a scratch component fixture (not committed) rendered headlessly and measured with Playwright against the dialog bounds (dialog x 152..600 at 1280px, 32..620 stacked):
MoltyA wider sweep (names of 0 to 63 characters, the remote-host hint, 1280/620/360px) matched main to the pixel wherever main fit, and kept every footer item inside the dialog where main overflowed. Tested on macOS (headless Chromium); the change is CSS only with no platform branch.
No unit test: layout-only change, which the test anti-patterns guide says not to unit test.
NewBotDialog.test.tsxpasses; oxlint, oxfmt, anti-slop, native code-quality, ast-grep and the changed-code quality gate are clean.Performance
None, because this only changes Tailwind classes on four elements of a modal dialog footer: no JS, effects, I/O or polling. Measured forced reflow of the footer stays within noise (about 0.02 ms on main vs 0.023 to 0.034 ms here).
Risk
Level: Low
One file, class names only. The riskiest part is the hint: with a long name it is squeezed to its longest word (the same width main squeezed it to). A host label with no break point wider than about 313px still overflows, exactly as on main. A plain revert backs it out.
Review
mobile/src/bots/MobileBotImportSheet.tsxis a separate sheet and is unaffected.DialogFooterandButtonare unchanged, so other dialogs are unaffected.Agent skill upstream boundary
Notes
Original fix by @akira-fukue in #48308; the button truncation is theirs, and the hint sizing and stacked-layout clamp were adjusted in review. Pre-existing and out of scope: the
imported before as <long name>subtitle inImportBotSourceListcan overflow the dialog's right edge.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)