Commit graph

166 commits

Author SHA1 Message Date
Lawrence Chen
29054dc709
Add sidebar help menu to footer (#958)
* Add sidebar help menu

* Fix help menu test wiring

* Fix help menu accessibility

* Use native popup for help menu

* Use icon button for sidebar help

* Add feedback composer and feedback API

* Allow preview builds without feedback env

* Tighten feedback upload limits

* Adjust sidebar footer padding

* Tighten sidebar footer spacing

* Add link affordances to help menu

* Polish sidebar feedback composer

* Move feedback icon to trailing edge

* Normalize help menu trailing icon sizes

* Enlarge help menu trailing icons

* Reduce help menu link icon size

* Shrink help menu link arrow

* Reduce help menu link arrow again

* Fix feedback message editor focus

* Add send feedback keyboard shortcut

* Polish feedback launch and delivery
2026-03-05 21:00:42 -08:00
Lawrence Chen
6347571b7c
Fix Dvorak Cmd+C colliding with notifications shortcut (#762)
* Fix layout-safe command shortcut matching

* Fix unshifted symbol shortcut coercion

* Fix layout handling for hardcoded Cmd shortcuts

* Support Cmd/Ctrl modifier hold shortcut hints

* Address PR shortcut review feedback

* Handle Caps Lock in command shortcut matching

* Address remaining PR shortcut review comments

* Handle Cmd+Ctrl+F control-character fallback

* Tighten shortcut hint hold-delay test

* Expose shortcut hint visibility in settings

* Restore Cmd+digit fallback on symbol-first layouts

* Stabilize shortcut regression coverage

* Align shortcut hint toggle with Cmd/Ctrl behavior

* Restore Claude workflow file

* Match Claude workflow file to main

* Keep shortcut hint hold behavior command-only

* Restore command shortcut fallback when layout data is unavailable

* Preserve command-aware shortcut translation
2026-03-05 18:32:42 -08:00
Austin Wang
9b215eddab
Fix browser portal pane drag routing and uploads (#961) 2026-03-05 15:27:17 -08:00
Lawrence Chen
102931d975
Reduce typing lag by hiding invisible views from accessibility tree (#862)
Profiling shows the main thread spends ~24% of time in
AccessibilityViewGraph.needsUpdate walking invisible SwiftUI views
during every layout pass, blocking key event dequeue.

- Add .accessibilityHidden on inactive workspaces in the ZStack
  (opacity-0 but still walked by the accessibility subsystem)
- Add .accessibilityHidden on NotificationsPage and the tabs
  container when their respective selection is not active
- Mark GhosttyTerminalView's HostContainerView (empty portal
  placeholder) as non-accessible since the terminal surface
  lives in the AppKit portal layer above SwiftUI
2026-03-04 15:40:57 -08:00
atani
2c330efb8a
feat: add Japanese localization with String Catalog (#819)
* Add i18n infrastructure with String Catalog and Japanese translations

Introduce String Catalog (.xcstrings) for localization support:
- Localizable.xcstrings: 195 UI string entries with en and ja translations
- InfoPlist.xcstrings: Info.plist strings (microphone usage, Finder menu items)
- project.pbxproj: add xcstrings to build phase and ja to knownRegions

* Replace hardcoded UI strings with String(localized:defaultValue:)

Migrate all user-facing strings across 11 source files to use
String(localized:defaultValue:) API (macOS 13+). Each string references
a key in Localizable.xcstrings, with the English text preserved as
defaultValue for fallback.

Files modified:
- KeyboardShortcutSettings: 28 shortcut labels
- SocketControlSettings: mode names and descriptions
- TabManager: placement labels, color names, close dialogs
- BrowserPanel/BrowserPanelView: error pages, context menus, tooltips
- UpdateViewModel/UpdatePopoverView/UpdatePill: update UI states
- NotificationsPage: notification panel labels
- SurfaceSearchOverlay: search bar placeholder and tooltips
- AppDelegate: menus, dialogs, command palette items

* Fix localization gaps from review feedback

Address review comments from CodeRabbit, Greptile, and Cubic Dev AI:
- Use interpolated String(localized:) instead of concatenation for
  version/progress strings in UpdateViewModel
- Localize remaining hardcoded strings in AppDelegate: window labels,
  rename dialog, status menu items, unread notification count
- Localize insecure HTTP alert body in BrowserPanel
- Add 12 new entries to Localizable.xcstrings with Japanese translations

* Fix String(localized:defaultValue:) keys to use StaticString

The localized: parameter requires StaticString when defaultValue: is
used. Move string interpolation from the key to defaultValue only,
and revert maxWidthText to plain strings since they are only used for
layout width calculation.

* Localize remaining UI strings across all source files

Add String(localized:defaultValue:) to all user-facing strings in:
- cmuxApp.swift: settings screen, menus, about panel, dialogs (~180 strings)
- ContentView.swift: command palette, sidebar context menu, dialogs (~200 strings)
- Workspace.swift: rename/move/close tab dialogs, tooltips (~20 strings)
- UpdateTitlebarAccessory.swift: titlebar tooltips, notifications popover (~10 strings)
- TerminalNotificationStore.swift: notification permission dialog (4 strings)
- CmuxWebView.swift: browser context menu items (2 strings)
- AppDelegate.swift: CLI install/uninstall alerts (6 strings)

Add 418 new entries to Localizable.xcstrings with Japanese translations.
Extract sidebar context menu into separate @ViewBuilder to fix Swift
type-checker timeout in large body.
Fix xcstrings format specifiers for interpolated strings (%lld, %@).

Total: 624 localization entries covering the full UI.

* Address review feedback: fix missing localizations and terminology

- Localize javaScriptDialogTitle URL branch in BrowserPanel
- Localize cantReach error message in BrowserPanel
- Localize close other tabs dialog message in TabManager
- Localize workspace accessibility label in ContentView
- Fix unread notification singular/plural (split into two keys)
- Fix insecure connection apostrophe inconsistency (unify to U+2019)
- Rename socketControl.fullOpen.description to socketControl.allowAll.description
- Remove dead code: renameTargetNoun function
- Fix terminology inconsistencies in xcstrings:
  - Unify "Developer Tools" to デベロッパツール
  - Unify "Jump to Latest Unread" phrasing
  - Unify "Flash Focused Panel" terminology
  - Fix dialog.enableNotifications.notNow translation

* fix: address remaining PR 819 review feedback

* fix: use a single localized key for close-other-tabs

* fix: avoid inflection markup in close-other-tabs message

* Address review feedback: localize tooltip, fix subtitle concat, unify keys

- Localize menubar tooltip unread count (hardcoded English -> localized)
- Replace subtitle string concatenation anti-pattern with single localized
  keys containing interpolation placeholders
- Unify workspace fallback key to workspace.displayName.fallback
- Remove unused workspace.defaultName key from xcstrings
- Add Japanese translations for new tooltip and subtitle keys
2026-03-04 14:58:28 -08:00
Lawrence Chen
dad52b09d9
Cmd+P: show workspaces only (#844)
* Limit Cmd+P switcher to workspaces

* Fix command palette Enter/Escape handling and add regression test

* Scope command palette key handling to event window
2026-03-04 00:19:01 -08:00
Lawrence Chen
919f77b6dc
Add setting to hide Cmd-hold shortcut hints (#765)
* Add setting to hide Cmd-hold shortcut hints

* Bump bonsplit for Cmd-hold pane hint toggle

* Document tagged app link format in agent notes

* Disable Ctrl pane hints when hold-hints toggle is off
2026-03-02 19:56:27 -08:00
Morten Trydal
bd3ee68e0c
Fix display-pass crash from isHidden toggle in debug hit test (#698)
Toggling isHidden during a display cycle calls _setHidden:setNeedsDisplay:,
which posts another window-needs-display and pushes the pass count past
AppKit's per-cycle limit, causing an NSException crash near resize handles.

Remove the isHidden toggle from debugTopHitViewForCurrentEvent(); the hit
test now returns the overlay itself when it is the topmost view, which is
acceptable for debug logging purposes.
2026-03-01 21:38:51 -08:00
Lawrence Chen
ae79d32494
Add inline VS Code open-directory command palette action (#685)
* Add inline VS Code directory command-palette action

* Harden inline VS Code serve-web lifecycle handling

* Add command-palette actions to stop/restart inline VS Code server

* Fix inline VS Code serve-web review comments

* Fix serve-web stop/start race and add regression test
2026-03-01 18:53:08 -08:00
Lawrence Chen
bc1b6fd9eb
Honor Ghostty background-opacity across all cmux chrome (#667)
* Honor Ghostty background-opacity across all cmux chrome

Parse background-opacity from Ghostty config and propagate it through
the entire chrome pipeline: bonsplit tab bar (via RRGGBBAA hex),
browser panel/omnibar, titlebar, empty panel, and window background.

Decouple glass effect from sidebar blend mode — bgGlassEnabled now
defaults to false so opacity works independently. Add
GhosttyBackgroundTheme helper for consistent color+opacity resolution
across all UI surfaces.

Fixes https://github.com/manaflow-ai/cmux/issues/263

* Titlebar and chrome opacity matches terminal background-opacity

Use CALayer-level opacity for the titlebar background instead of SwiftUI
Color alpha, matching the terminal's Metal compositing path. Account for
the double alpha stacking in the terminal area (Bonsplit container bg +
Ghostty renderer) so the titlebar visually matches.

Also fix opacity-only config changes not triggering titlebar refresh on
Cmd+Shift+, reload.
2026-03-01 03:48:46 -08:00
doug
e01236115e
Fix: use policy constants for minimum window size instead of hardcoded 800×600 (#715)
The root ContentView body had `.frame(minWidth: 800, minHeight: 600)`
hardcoded since the initial commit, preventing users from resizing the
window narrower than 800px even when the sidebar is hidden and a narrow
terminal layout is perfectly usable.

Replace the magic numbers with the existing SessionPersistencePolicy
constants (minimumWindowWidth = 300, minimumWindowHeight = 200), which
were already defined and used for session-restore frame validation.
This gives those constants a second job as the canonical size floor and
makes it easy to tune the minimum in one place.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 02:42:41 -08:00
Lawrence Chen
f73887154d
Precompute panel ordering to reduce sidebar scroll lag (#661)
Sidebar body was calling sidebarOrderedPanelIds() multiple times per
render for branches, directories, and pull requests. Now computes it
once and passes through. Reduces redundant work during scroll frames.

Closes https://github.com/manaflow-ai/cmux/issues/655
2026-02-27 18:44:07 -08:00
Lawrence Chen
1392bd16d7 Revert "Use workspace color for notification ring and selection bar (#664)"
This reverts commit 4bfe95d125.
2026-02-27 18:24:51 -08:00
Lawrence Chen
4bfe95d125
Use workspace color for notification ring and selection bar (#664)
- Notification/focus flash uses workspace customColor (fallback: accent)
- Selection bar/indicator uses workspace customColor when set
- Flash color propagated through Panel.triggerFlash(color:) API
- Browser panel flash overlay uses workspace color
- Regression tests for flash color resolution

Fixes https://github.com/manaflow-ai/cmux/issues/557
2026-02-27 18:14:19 -08:00
Lawrence Chen
1fa0f2bcb6
Add Open Folder command (Cmd+O) (#656)
* Add "Open Folder…" command to open a workspace at a chosen directory

Adds a native folder picker (NSOpenPanel) accessible from:
- Command Palette (⌘⇧P → "Open Folder…")
- File menu with ⌘O shortcut

Selecting a folder opens a new workspace at that path.

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

* Rename openRepository → openFolder, add customizable shortcut

- Rename command ID from palette.openRepository to palette.openFolder
- Register openFolder in KeyboardShortcutSettings (default: Cmd+O)
- Wire menu bar shortcut through settings instead of hardcoding
- Add commandPaletteShortcutAction mapping for shortcut hint display

* Dismiss command palette before showing Open Folder panel

The NSOpenPanel.runModal() call blocked the main thread, keeping the
command palette visible behind the file picker. Wrapping in
DispatchQueue.main.async lets the palette dismiss first.

* Trigger GitHub PR refresh

---------

Co-authored-by: michalstrnadel <michal.strnadel@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 16:28:18 -08:00
Lawrence Chen
23d140a2a6
Add 'Flash Focused Panel' to command palette (#638)
Registers palette.triggerFlash wired to triggerFocusFlash() (same as
Cmd+Shift+H). Shortcut hint reads from KeyboardShortcutSettings so it
stays in sync with custom bindings.

Closes https://github.com/manaflow-ai/cmux/issues/633
2026-02-27 02:43:46 -08:00
Lawrence Chen
5a763a8b5e
Rename 'tab color' to 'workspace color' in user-facing strings (#637)
Closes https://github.com/manaflow-ai/cmux/issues/635
2026-02-27 02:43:08 -08:00
Lawrence Chen
49e93e4b4c
Add command palette entries to install/uninstall cmux CLI in PATH (#626)
Adds CmuxCLIPathInstaller with symlink management at /usr/local/bin/cmux,
exposed via Cmd+Shift+P command palette (VS Code style). Install entry
shown when CLI is not in PATH, uninstall entry shown when it is.
Falls back to osascript admin privilege escalation when /usr/local/bin
is not user-writable. Uses attributesOfItem instead of fileExists to
correctly handle dangling symlinks from relocated app bundles.

Closes https://github.com/manaflow-ai/cmux/issues/618
2026-02-27 01:53:13 -08:00
Lawrence Chen
978341b228
Add zoom/maximize focused pane in splits (#634)
Cmd+Shift+Enter toggles zoom on the focused pane, expanding it to fill
the workspace. Splitting or creating new tabs auto-unzooms. Zoom state
shown as icon in sidebar tab. Includes bonsplit zoom toggle support.

Closes https://github.com/manaflow-ai/cmux/issues/136
2026-02-27 01:50:56 -08:00
Austin Wang
a326514bf6
Fix frozen blank launch state caused by session restore race condition (#399) (#565)
The app sometimes launched to a frozen blank state with an empty sidebar
and no terminal loaded. This was caused by restoreSessionSnapshot emitting
intermediate @Published states (empty tabs, nil selectedTabId) that left
SwiftUI's mountedWorkspaceIds empty.

Two fixes:
1. Make restoreSessionSnapshot atomic: build the new tab list locally
   before assigning to @Published properties in a single batch, so
   SwiftUI observers never see an intermediate empty state.
2. Add a startup recovery timer that detects and fixes broken state
   (empty tabs, invalid selection, unmounted workspaces) 500ms after
   the view appears, with Sentry breadcrumbs for diagnostics.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 22:10:21 -08:00
austinpower1258
cdad265f1d Fix selected-workspace status contrast 2026-02-26 15:12:10 -08:00
Lawrence Chen
780f959a48
Fix equalize splits to recursively set all dividers to 0.5 (#575)
The equalize splits command was a no-op that always returned false.
Implement it by recursively walking the bonsplit tree and setting
every split divider position to 0.5. Also register the command in
the command palette with a "workspace has splits" precondition so
it only appears when there are multiple panes.

Adds a regression test that creates a nested split layout, skews
divider positions, equalizes, and verifies all dividers are at 0.5.

Fixes https://github.com/manaflow-ai/cmux/issues/571
2026-02-26 14:27:18 -08:00
Lawrence Chen
fab2b8611d
Switch fullscreen shortcut to Cmd+Ctrl+F (#530) 2026-02-25 19:42:21 -08:00
Lawrence Chen
4fe6006007 Cache sidebar drop UTTypes and hint width metrics
Fixes CMUXTERM-MACOS-GA

Fixes CMUXTERM-MACOS-JG
2026-02-25 16:39:09 -08:00
Lawrence Chen
7b7745caa0 avoid command palette overlay subview scans on each update 2026-02-25 15:49:25 -08:00
Lawrence Chen
0977f30c77 perf: reduce tab sidebar path formatting hot-path work 2026-02-25 15:26:57 -08:00
Lawrence Chen
62fffc7221 Use command palette flow for workspace rename shortcut 2026-02-25 05:12:49 -08:00
Lawrence Chen
7201dabdfd
Merge pull request #337 from adinvadim/feature/sidebar-pr-metadata
feat: show linked pull request metadata in sidebar
2026-02-24 21:44:27 -08:00
Lawrence Chen
e69b88a19c
Merge pull request #463 from manaflow-ai/task-open-settings-via-cmdshiftp
Fix Open Settings from Command Palette
2026-02-24 21:33:56 -08:00
Lawrence Chen
d0ce351856 Route palette settings through Cmd+, add debug logs 2026-02-24 21:15:01 -08:00
Lawrence Chen
afeec2d324 sidebar: open PR links in right split for target workspace 2026-02-24 21:14:57 -08:00
Lawrence Chen
cc06fb84e3 Fix command palette Open Settings action routing 2026-02-24 21:07:37 -08:00
Lawrence Chen
a5711425df sidebar: add command palette action for workspace PR links 2026-02-24 21:03:38 -08:00
Lawrence Chen
109ce43c70 settings: control sidebar PR link open target 2026-02-24 20:59:06 -08:00
Lawrence Chen
023d7759ac sidebar: render pull requests as per-line rows 2026-02-24 20:55:44 -08:00
Lawrence Chen
f28eb00b31 Merge remote-tracking branch 'origin/main' into feature/sidebar-pr-metadata
# Conflicts:
#	Sources/ContentView.swift
#	Sources/Workspace.swift
2026-02-24 20:49:29 -08:00
Lawrence Chen
7d0e259b36 style(sidebar): reduce metadata icon sizing 2026-02-24 20:44:15 -08:00
Lawrence Chen
513e9aa607 feat(sidebar): add markdown blocks, provider labels, and fine-grained toggles 2026-02-24 20:38:07 -08:00
Lawrence Chen
db86d3e301 Broaden CLI socket telemetry and add restart listener command 2026-02-24 20:38:05 -08:00
Lawrence Chen
f2ecb4877b feat(sidebar): add generic metadata rows and commands 2026-02-24 20:19:38 -08:00
Lawrence Chen
2877531ea2
Auto-focus omnibar when focusing blank browser surfaces (#448)
* Auto-focus omnibar when focusing blank browser surfaces

* Fix browser omnibar autofocus across pane and palette paths

* Fix Cmd+P switcher omnibar autofocus timing
2026-02-24 16:00:03 -08:00
Lawrence Chen
7ee3831eb5
Merge pull request #317 from manaflow-ai/issue-143-session-persistence
Implement session persistence pass 1 (windows/workspaces/scrollback)
2026-02-24 15:25:46 -08:00
Lawrence Chen
e8477131c1 Merge origin/main into issue-143-session-persistence 2026-02-24 14:41:27 -08:00
austinpower1258
7a75988c5b Fix double-click titlebar zoom not working on browser panel side
The browser portal's hit-test was intercepting clicks in the titlebar
region, preventing double-click-to-zoom from reaching the window.

Three fixes:
- BrowserWindowPortal: pass through hits landing in the native titlebar
- WindowDragHandleView: only let titlebar-overlay views block capture,
  not underlay browser content; respect AppleActionOnDoubleClick pref
- ContentView: use shared performStandardTitlebarDoubleClick() helper

Closes https://github.com/manaflow-ai/cmux/issues/422

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 14:35:10 -08:00
Lawrence Chen
710ed9b068 Fix Cmd+P/Cmd+Shift+P window routing (#413)
* Fix command palette shortcuts to stay window-scoped

* Fix cross-window command palette typing focus lock
2026-02-24 14:35:10 -08:00
austinpower1258
04eee73a22 Fix stuck titlebar drag suppression 2026-02-24 14:35:10 -08:00
Lawrence Chen
5c584dd7f7 Block tab drags across cmux app instances 2026-02-24 14:35:09 -08:00
Lawrence Chen
ce681bac67 Implement cross-window tab and workspace move UI 2026-02-24 14:35:09 -08:00
Lawrence Chen
7b59954a88 Fix command palette caret color in light mode 2026-02-24 14:35:09 -08:00
Lawrence Chen
e0e66a69cc Fix light-mode typing indicator contrast in active sidebar 2026-02-24 14:35:09 -08:00