Skip to content

Rename edits inline or in the palette, never in an alert - #14986

Merged
teamleaderleo merged 4 commits into
mainfrom
one-rename-flow
Sep 27, 2026
Merged

teamleaderleo merged 4 commits into
mainfrom
one-rename-flow

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Sep 27, 2026 •

Copy link
Copy Markdown
Collaborator

Rename used to have three UIs: inline editing on sidebar rows, the command palette editor, and four near-identical app-modal NSAlert dialogs (two for workspaces, two for tabs, one for groups). Now every context-menu "Rename" edits in one of the first two places.

Entry point Before After
Sidebar workspace row, "Rename Workspace…" (AppKit list and SwiftUI list) Alert Inline editor on that row. Unlike double-click, it leaves selection alone (no workspace switch, multi-selection kept) and starts editing after the menu closes, so the field keeps focus
Pane tab bar, "Rename Tab" Alert Palette rename editor for that tab (it doesn't need to be focused)
Dock tab bar, "Rename Tab", and the Rename Tab shortcut while the Dock has focus Alert Palette rename editor for that Dock tab
Group header, "Rename Group..." Alert Palette rename editor for the group
Rename Workspace / Rename Tab shortcuts and palette commands Palette Unchanged

How it works:

  • CommandPaletteRequestKind.rename is a new palette request whose notification carries a CommandPaletteRenameTarget in userInfo. AppDelegate.requestCommandPaletteRename(_:preferredWindow:source:) posts it, and the palette opens its existing rename editor on that target.
  • The palette's tab-rename apply step now finds the Dock by owner id and panel containment (TabManager.dockSplitStore(ownerID:containingPanel:)). Before, it only handled a Dock browser that was focused when the palette opened, so explicit Dock targets (terminals included) now work.
  • The custom workspace color dialog has no inline or palette equivalent, so it stays an alert. Its two copies (SwiftUI row and AppKit row) are now one WorkspaceCustomColorPrompt, which also shows the Invalid Color alert.
  • AppDelegate.promptRenameSelectedWorkspace had no callers and is deleted.
  • These strings are no longer used and are removed from every locale: alert.renameWorkspace.*, dialog.renameWorkspace.*, alert.renameTab.*, workspaceGroup.rename.confirm, alert.cancel.

Socket, CLI and AppleScript renames (workspace.rename, tab and group rename methods) call the model setters directly and never touched these alerts, so they're unaffected.

Tests:

  • CommandPaletteRenameTargetUserInfoTests (new) checks that each target kind round-trips through the request payload and that a request without a target is ignored. CommandPaletteRequestKindTests now covers the new notification name. I ran these locally with swift test in Packages/macOS/CmuxCommandPalette, along with the existing workspace rename target suite: 8 tests passed.
  • SidebarWorkspaceRowInlineRenameTests.contextMenuRenameStartsInlineEditInsteadOfDialog opens the AppKit row's context menu, runs "Rename Workspace…", and asserts that the inline field editor takes focus with the current title and that no title gets written. This test hasn't run yet; it's for CI.
  • scripts/verify-local.py passed: Swift syntax, xcstrings, localization parity, project normalization, test wiring. I didn't build the app locally, so CI's build is the first native compile.

Not done here: the other text-field alerts (saved layouts, fork conversation, browser prompts, Cloud machine rename) aren't rename-of-a-visible-sidebar-object flows and are unchanged. Nobody has dogfooded the SwiftUI sidebar path yet (context menu dismissal, then inline field focus). That path has no automated test: driving a SwiftUI .contextMenu from a unit test isn't practical here.

Changelog

Changed: Rename from a context menu no longer opens a dialog: workspace rows edit their name in place, and tabs, Dock tabs and groups open the command palette's rename field.

🤖 Generated with Claude Code


Summary by cubic

Rename now edits inline on sidebar workspace rows and in the command palette for tabs, Dock tabs, and groups, replacing four near-identical rename alert dialogs. Context-menu rename on the SwiftUI sidebar no longer switches selection first, so renaming an unselected row keeps focus on the new field and preserves multi-selection.

  • New CommandPaletteRequestKind.rename carries the rename target in the notification payload, so one palette editor serves explicit targets.
  • Dock tab renames now resolve by owner id, so targeted tabs work even when not focused.
  • Renaming from the SwiftUI row menu skips re-selection and starts editing after the menu dismisses; double-click still selects first.
  • The custom workspace color dialog stays an alert and is now a single shared helper for both sidebar implementations.
  • Unused rename localization strings and promptRenameSelectedWorkspace are removed.

Written for commit 272bdd9. Summary will update on new commits.

Review in cubic

teamleaderleo and others added 2 commits September 27, 2026 07:55
Workspace rows' "Rename Workspace…" now starts the row's inline title
editor (AppKit and SwiftUI sidebars). Tab, Dock tab and group "Rename"
open the palette rename editor for that exact object through a new
explicit-target palette request; the palette resolves Dock tabs by
their owner id. The four rename alerts, the unused
promptRenameSelectedWorkspace, and their localized strings are gone.
The two copies of the custom workspace color dialog are now one helper.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 1 minute.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: manaflow-ai/cmux/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 6a88b62d-e6fc-4a9d-bbc8-5c9232affae9

📥 Commits

Reviewing files that changed from the base of the PR and between 90773c7 and 272bdd9.

📒 Files selected for processing (19)
  • Packages/macOS/CmuxCommandPalette/Sources/CmuxCommandPalette/Request/CommandPaletteRequestKind.swift
  • Packages/macOS/CmuxCommandPalette/Sources/CmuxCommandPalette/Values/CommandPaletteRenameTarget.swift
  • Packages/macOS/CmuxCommandPalette/Tests/CmuxCommandPaletteTests/CommandPaletteRenameTargetUserInfoTests.swift
  • Packages/macOS/CmuxCommandPalette/Tests/CmuxCommandPaletteTests/CommandPaletteRequestKindTests.swift
  • Resources/Localizable.xcstrings
  • Sources/AppDelegate.swift
  • Sources/ContentView.swift
  • Sources/DockSplitStore+ShortcutCommands.swift
  • Sources/DockSplitStore+TabContextActions.swift
  • Sources/Sidebar/AppKitList/Cells/SidebarWorkspaceRowCellView.swift
  • Sources/Sidebar/AppKitList/Cells/SidebarWorkspaceRowCommands.swift
  • Sources/SidebarWorkspaceGroupDialogs.swift
  • Sources/TabItemView+WorkspaceContextMenu.swift
  • Sources/TabManager.swift
  • Sources/VerticalTabsSidebar+WorkspaceGroups.swift
  • Sources/Workspace.swift
  • Sources/WorkspaceCustomColorPrompt.swift
  • cmux.xcodeproj/project.pbxproj
  • cmuxTests/SidebarWorkspaceRowInlineRenameTests.swift

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.

@github-actions

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@cursor

cursor Bot commented Sep 27, 2026

Copy link
Copy Markdown

Bugbot is paused — on-demand spend limit reached

Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

teamleaderleo and others added 2 commits September 27, 2026 08:05
Context-menu Rename called updateSelection() before starting the inline
editor. On an unselected row that switched workspaces (which can move
focus to the terminal and blur, so commit, the new field) and collapsed
a multi-selection. The menu path now skips selection and starts editing
on the next run-loop turn, after the menu has dismissed. Double-click
still selects first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@teamleaderleo
teamleaderleo merged commit 8c744df into main Sep 27, 2026
67 of 68 checks passed
@teamleaderleo
teamleaderleo deleted the one-rename-flow branch September 27, 2026 12:54
@github-actions

Copy link
Copy Markdown
Contributor

Merge receipt for 272bdd9055: every check was green at merge (22 verified; 16 skipped by policy). Full suite runs on main after merge.

rustybret pushed a commit to rustybret/bmux that referenced this pull request Sep 27, 2026
f5c179f iOS: fix the test failures that keep iOS CI red on main (manaflow-ai#14803)
8685bf5 Hold update relaunch while agents are mid-turn (manaflow-ai#14969)
dc90332 Keep CLI socket-discovery tests off the host's real cmux (manaflow-ai#14919)
dd3c91b docs: shorten root agent instructions and link existing procedures (manaflow-ai#14998)
8c744df Rename edits inline or in the palette, never in an alert (manaflow-ai#14986)
9ae4383 Calmer chrome motion: appear instantly, fade out only, no overshoot (manaflow-ai#14984)
6510f56 Write opencode config JSON without escaping slashes (cmux 7140) (manaflow-ai#14805)
ab5e7da ci: stop catch-up merges from failing the CLA check (manaflow-ai#14913)
52c8f41 Add cmux session move for Claude sessions (manaflow-ai#14959)
36785b1 Hide decorative Settings sidebar icons from VoiceOver (manaflow-ai#14989)
4c7158c Label the sound preview button and fix mistranslated action verbs (manaflow-ai#14983)
e704a77 Bound untracked paths stored in last-turn diff baselines (manaflow-ai#14980)
f073df1 Fix remote Files sidebar for names that change under NFD (manaflow-ai#14978)
5c68499 Bump bonsplit: mouse wheel scrolls the overflowed tab strip (manaflow-ai#14985)
9466dcb Keep agent resume bindings through the update-relaunch save (manaflow-ai#14971)
ef8b037 docs: take release notes from a Changelog section in each PR instead of CHANGELOG.md edits (manaflow-ai#14934)
6eddfd7 ci: skip the delta diff when main moved further than the pull request (manaflow-ai#14987)
fefcec7 ci: attribute red PR runs to the machine or the code, re-run machine failures once (manaflow-ai#14977)
c185deb Accept file drops on remote tmux mirror panes (manaflow-ai#14981)
90773c7 test: make CmuxSidebarGit probe waits event-driven (manaflow-ai#14973)
1f2dbfe ci: skip the scheduled Blacksmith cache warmers while owned pools serve PRs (manaflow-ai#14827)
2850651 docs: add a guide to customizing cmux's look (manaflow-ai#14850)
b66e365 Resolve a separate sidebar's content against its own backdrop (manaflow-ai#14841)
88a9360 UI tests: one labelled frame per action, built in CI; scripts/ui-test (manaflow-ai#14966)
20cfa78 fix(omo): resolve relative file refs in the shadow config without double-loading OpenCode config (manaflow-ai#14935)
f0e964c ci: make the aggregate app-host product the default, layers opt-in (manaflow-ai#14975)
52dce98 ci: run and register the machine-failure test (manaflow-ai#14972)
7bf48bc ci: route compile admission by kept-build distance across minis (manaflow-ai#14949)
44fa3f5 Offer cmux in Open With for Markdown, source, and text files (manaflow-ai#14968)
45c2d66 Replay the Claude session id of agents in cmux ssh (cmux-tui) panes (manaflow-ai#14906)
b4c1b31 Label icon-only chrome buttons and localize project panel text (manaflow-ai#14926)
14a6909 seed prefetch: keep the seed adopt would pick, of any seeded width (manaflow-ai#14944)
19e73d2 ci: self-calibrating warm-distance compile estimates (manaflow-ai#14932)
fa98d86 ci: redispatch focused runs the Mac failed before any test started (manaflow-ai#14963)
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.

1 participant