Skip to content

fix(bots): wrap the Runs on line in Import so a long computer name stays inside the dialog - #48454

Merged
nwparker merged 1 commit into
stablyai:mainfrom
akira-fukue:fix/bot-import-runs-on-long-computer
Nov 24, 2026
Merged

nwparker merged 1 commit into
stablyai:mainfrom
akira-fukue:fix/bot-import-runs-on-long-computer

Conversation

@akira-fukue

@akira-fukue akira-fukue commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

In Import from another app, the dialog shows a line like "Runs on (your computer) with (your agent)". If the computer has a long name, that line could not wrap, so the agent's name slid under the Change button and out of the dialog. Now the line wraps like a normal sentence, and a very long name breaks inside the box. A short name looks exactly the same as before.

What Changed

src/renderer/src/components/bots/BotRunsOnPicker.tsx: class names only, on two spans of the folded row variant (only ImportBotDialog renders it).

  • Before: the summary row was a no-wrap flex row (flex min-w-0 items-center gap-1.5), and the computer-name span (inline-flex, no break rule) could not shrink below its longest word. With a long, unbroken name the row overflowed its column, so "with " was drawn under the shrink-0 Change button and past the dialog's right edge (a 64-character name made the dialog scroll sideways). Mid-length names squeezed "Runs on" and the agent into stacked words.
  • After: the row gets flex-wrap and gap-x-1.5 (column gap only, so wrapped lines keep normal line height), so the sentence breaks between its parts. The name span gets max-w-full wrap-anywhere, so a name wider than the whole row breaks inside the row instead of overflowing.

Why

A computer's name has no length limit (Rename host, or a paired server's own name), and with a long one "with" and the agent were unreadable under Change. The account span in the same row already breaks (min-w-0 break-all); the name had nothing. Alternatives that only add min-w-0 wrap-anywhere to the name split 12 to 20 character names mid-word where main shows them whole; flex-shrink tricks still overflowed or needed a pseudo-element and a magic number. Letting the row wrap is the smallest change that never hides a name main showed whole.

Linked Issue

Fixes #48453

Visual Proof

Component fixture of ImportBotDialog, dark theme, computer name set through hostSettingOverrides.local.displayLabel.

448px dialog, build_server_production_eu_west_01 (33 characters)

Before After
Before: with and Claude Code overlap Change and run past the dialog edge After: the sentence wraps and stays inside the row

328px dialog (narrow window), 64-character name with no break point

Before After
Before: the name runs under Change and out of the dialog After: the name breaks over three lines inside the row

448px dialog, default Local Mac (unchanged)

Before After
Before: Local Mac on one line After: identical single line

Testing

  • Reproduced on main with a scratch component fixture (not committed) rendering ImportBotDialog in 448px and 328px dialogs with default, spaced, hyphenated, CJK, URL-like, 11/17/22/33/64-character names, folded and expanded. Shots taken with pnpm fixtures:shot (headless fixture server). On main 6 of 8 measured cases overflowed (33 characters at 448px overflowed by 27px and overlapped Change; 64 characters overflowed by 380px). With the fix all cases have zero overflow, no overlap with Change, and no sideways scroll; the default Local Mac row is identical to main (one 36px line).

  • The contributor's dev-build sweep (1,446 states across 1280/620/360px windows) found every row that fit on one line on main pixel-identical, and all 461 overflowing states fixed.

  • vitest on NewBotDialog.test.tsx and bot-presentation.test.ts (the fields variant of the same picker) pass; oxlint, oxfmt --check, the anti-slop and code-quality oxlint configs, ast-grep, and the changed-code quality gate are clean.

  • Platforms: macOS (fixture rendering). Class names only, 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: this is layout only, which jsdom cannot measure and the test anti-patterns guide says not to unit test.

Performance

None, because this only changes Tailwind class names on two spans in one row of a modal dialog that renders while Import is open: no JS, effects, I/O, IPC or polling, and the component tree is unchanged.

Risk

Level: Low

One file, class names only. The riskiest part is mid-length names (about 12 to 20 characters) where main already stacked words: "with " now moves to a second line instead, so the row can be 20 to 40px taller. Connectors like "with" or ", as" can start a wrapped line, and a multi-line name's icon is vertically centered on the block. A row that fits on one line is unchanged. A plain revert backs it out.

Review

  • Scope: runsOn renders only in the row variant used by ImportBotDialog; NewBotDialog uses variant="fields" and is unaffected. The account span is untouched.
  • wrap-anywhere is already used elsewhere in the renderer (Tailwind 4).
  • Cross-platform / SSH / mobile: class names only; the mobile import sheet is a separate component.

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

Fix by @akira-fukue; this branch was rebased as a single commit on current main with their authorship kept. Pre-existing and out of scope: the imported before as <long name> subtitle in ImportBotSourceList can still overflow (noted in #48308).

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)

Ran targeted vitest, oxlint, oxfmt and CI's static gates on the touched file; full typecheck/test/build left to CI.

@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

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: d5cf318e-bcb9-499e-8574-7446b0afffa8
Commits

Reviewing files that changed from the base of the PR and between dd11f49 and e836ef4.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

The host label can now wrap and break long text anywhere within its available width. The folded “Runs on … with …” summary can also wrap its items and uses horizontal spacing.

Severity of issue fixed: Medium

Merge Risk: Minimal · previous review dd11f

This change makes the Import dialog's "Runs on" line wrap so long computer names stay inside the dialog. It is a layout-only change with no data or logic impact and is low risk to merge.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the fix and the component area: the Import dialog's Runs on line now wraps so a long computer name stays inside the dialog. The raw summary confirms the change is limited to class name…
Description check Passed The description follows the repository template closely. It includes ELI5, What Changed, Why, Linked Issue (Fixes #48453), Visual Proof with before and after images, Testing with the checklist, Perfor…
Linked Issues check Passed Issue #48453 requires the "Runs on {computer} with {agent}" row in the Import from another app dialog to wrap between its parts, so that long computer names do not push the agent under "Change" or pas…
Out of Scope Changes check Passed The PR changes class names in a single file, BotRunsOnPicker.tsx: the row wrapper and the host span. Each change maps directly to the issue's wrapping requirement. The PR does not touch the `otherAcco…
Full details: Title check

Explanation

The title names the fix and the component area: the Import dialog's Runs on line now wraps so a long computer name stays inside the dialog. The raw summary confirms the change is limited to class names in BotRunsOnPicker.tsx that enable wrapping of the host text and the folded summary. The title is specific and matches the main change. It is long at 90 characters, but it remains a single clear sentence.

Full details: Description check

Explanation

The description follows the repository template closely. It includes ELI5, What Changed, Why, Linked Issue (Fixes #48453), Visual Proof with before and after images, Testing with the checklist, Performance, Risk with level, AI Disclosure, Review, Agent skill upstream boundary, Notes, and Checklist. The before and after evidence is thorough and the risk and rollback are stated. The Linked Issue number differs from the issue number in the objectives summary (#48453 for the issue, #48454 for the PR), which is consistent. The description is detailed and somewhat long, but it is complete.

Full details: Linked Issues check

Explanation

Issue #48453 requires the "Runs on {computer} with {agent}" row in the Import from another app dialog to wrap between its parts, so that long computer names do not push the agent under "Change" or past the dialog edge. At head, BotRunsOnPicker.tsx sets the row wrapper to min-w-0 flex-wrap items-center gap-x-1.5, which lets the sentence break between its parts. The host span is inline-flex max-w-full items-center gap-1 font-medium wrap-anywhere, which lets a name wider than the row break inside itself. Both changes apply to the row variant, which only ImportBotDialog renders. The PR description reports dev-build and component-fixture measurements showing no overflow for the reproduction cases (33 characters, 64 characters, 360px and 1280px widths). I did not re-run these measurements. The issue states no automated test requirement, so the absence of a unit test does not fail this check. The paired-server variant is not implemented in this change, and the issue does not require it.

Full details: Out of Scope Changes check

Explanation

The PR changes class names in a single file, BotRunsOnPicker.tsx: the row wrapper and the host span. Each change maps directly to the issue's wrapping requirement. The PR does not touch the otherAccount span, the fields variant, the agent picker, or unrelated files. The PR description lists the untouched runsOnAs account span as a known non-tested variant, not as a changed area. No unrelated changes are visible in the reviewed scope.

  • 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: cd078270-3ed9-4d8e-8a62-ed2220b919cb
Commits

Reviewing files that changed from the base of the PR and between d7bd9c6 and dd11f49.

Files selected for processing: 1

  • src/renderer/src/components/bots/BotRunsOnPicker.tsx

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

…ays inside the dialog

The folded "Runs on <computer> with <agent>" row in Import from another
app was a no-wrap flex row, and the computer name span could not shrink
below its longest word. A long name pushed "with <agent>" under the
Change button and past the dialog edge.

Let the row wrap between its parts (flex-wrap, gap-x-1.5 so wrapped
lines keep normal line height) and cap the name at the row width with
wrap-anywhere so a name wider than the row breaks inside it.

Fixes stablyai#48453
@nwparker
nwparker force-pushed the fix/bot-import-runs-on-long-computer branch from dd11f49 to e836ef4 Compare November 24, 2026 21:22
@nwparker
nwparker merged commit 5115b3d into stablyai:main Nov 24, 2026
55 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 computer name runs under "Change" in Import from another app

2 participants