Repository navigation
Fix rename dialogs on coarse-pointer devices - #6119
Merged
ymichael merged 3 commits intoOct 22, 2026
Merged
Conversation
ymichael
deleted the
bb/fix-issue-6110-in-bb-repository-thr_7nthnnqtrb
branch
October 22, 2026 18:16
Contributor
|
Thanks! |
ymichael
added a commit
that referenced
this pull request
Nov 2, 2026
## Human comments ## What was wrong Thread rename had three implementations: core's `ThreadRenameDialog`, the thread header's own inline-or-dialog choice, and the thread-list plugin's `SidebarRenameDialog`. Fixes such as #6119, #6364 and #5042 each landed in only some of them, so behaviour drifted. The default dialog showed save errors as a toast, but the sidebar's showed them inline. The empty-name messages differed. On narrow windows the sidebar's Rename row button edited inline while its menu and the header shortcut opened a dialog. ## What changed - The plugin's dialog moves to shared-ui as `RenameSessionDialog` and is published as a component registry item, so the forkable thread-list plugin can keep importing it. - `ThreadActionsProvider` owns one rename controller and renders that dialog, replacing `ThreadRenameDialog`. Menus that have no editor of their own use it. - The thread header uses `useInlineRename`'s menu, shortcut and double-click methods through that controller instead of reimplementing the policy. - `useInlineRename`'s `startEditing` follows the menu rule: a dialog on a compact viewport or coarse pointer. User-visible changes, all from removing the drift: - The default dialog shows save errors in place instead of as a toast, and says "Name cannot be empty." for an empty name. - On narrow windows with a mouse, the sidebar Rename row button opens the dialog. No plugin SDK or host-daemon protocol changes. #5023 (`requestRename` in the SDK) stays open. ## How you verified - One presentation table (`inline-rename-presentation-cases`) runs against both the thread header and the sidebar thread row. Reverting `startEditing` to the old rule fails both. - A new `ThreadActionsProvider` test covers the default dialog: a failed save keeps it open with the error, and a retry saves and closes it. - `turbo run typecheck lint test` passes for `@bb/app`, `@bb/shared-ui`, `bb-plugin-thread-list` and `@bb/plugin-registry`. `node scripts/check-plugin-forks.mjs plugins/thread-list` passes. - I checked this in an isolated `pnpm dev` app in headless Chromium, comparing the branch with origin/main on the same data: | Entry point | Wide, mouse | Narrow, mouse | Narrow, touch | | --- | --- | --- | --- | | Header menu | inline | dialog | dialog | | Header shortcut / command palette | inline | dialog | dialog | | Header double-click | inline | inline | no rename | | Sidebar menu (long-press on touch) | inline | dialog | dialog | | Sidebar Rename row button | inline | dialog (inline on main) | hidden | | Sidebar double-click | inline | inline | navigates | Everything matched main except the narrow-width row button. With a forced 500 response, inline editing and both dialogs showed "Could not save the name. Try again." and kept the draft (main's header dialog showed a toast). An empty name showed "Name cannot be empty.". Saves from the header dialog and the sidebar dialog persisted. A wide touch screen gave dialog for the menu and shortcut, and no rename on double-tap. > AGENT GENERATED Co-authored-by: Claude Opus 5.5 <[email protected]>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Human comments
What was wrong
Thread rename used viewport width to choose between the dialog and inline editor, so wide touch devices such as landscape iPads received the inline editor. Its deferred focus could select the title without opening the software keyboard. Header double-click always started inline editing, including on coarse-pointer devices.
What changed
Header menu and shortcut rename now use the dialog when the viewport is compact or the primary pointer is coarse. Title double-click uses the dialog for coarse pointers and stays inline for fine pointers at either width. The shared sidebar rename hook follows the same pointer policy, including quick actions.
The plugin registry entry is regenerated from the shared component. The dialog retains its existing tap-to-focus behavior on touch devices. No server/daemon wire, CLI, or SDK changes.
How you verified
pnpm exec turbo run test typecheck --filter=@bb/plugin-registrypassed.pnpm exec turbo run lint typecheck --filter=@bb/app --filter=@bb/shared-ui --filter=bb-plugin-thread-listpassed with existing lint warnings.pnpm start:worktree --dryrunbuilt successfully; the production-style worktree server renders the verification thread.Fixes #6110