Commit graph

88 commits

Author SHA1 Message Date
Lawrence Chen
19b59cae37 Reapply "Merge pull request #239 from manaflow-ai/issue-151-ssh-remote-port-proxying"
This reverts commit f7cbbad434.
2026-03-12 15:54:26 -07:00
Lawrence Chen
f7cbbad434 Revert "Merge pull request #239 from manaflow-ai/issue-151-ssh-remote-port-proxying"
This reverts commit 78e4bd32ba, reversing
changes made to cf75da8f8a.
2026-03-12 14:45:58 -07:00
Lawrence Chen
b12f70b26c Merge origin/main into issue-151-ssh-remote-port-proxying 2026-03-12 05:09:03 -07:00
Lawrence Chen
1b4f396a48 Merge remote-tracking branch 'origin/main' into issue-151-ssh-remote-port-proxying
# Conflicts:
#	Sources/Panels/BrowserPanel.swift
2026-03-11 22:52:47 -07:00
austinpower1258
df54af34cf Merge branch 'main' of https://github.com/manaflow-ai/cmux into issue-1183-devtools-resize-layout
# Conflicts:
#	cmuxTests/CmuxWebViewKeyEquivalentTests.swift
2026-03-11 22:16:07 -07:00
austinpower1258
7d5d4d718d wip 2026-03-11 22:13:45 -07:00
Lawrence Chen
7844226ded Fix browser devtools hide fallback 2026-03-11 20:18:46 -07:00
austinpower1258
8aafb68935 Fix browser pane drag/drop follow-ups 2026-03-11 19:16:17 -07:00
austinpower1258
5233874425 ok 2026-03-11 18:32:23 -07:00
Lawrence Chen
d67090994e Merge branch 'main' into issue-151-ssh-remote-port-proxying 2026-03-11 15:56:47 -07:00
Lawrence Chen
d9021861e3 Preserve ssh remote browser proxy flow 2026-03-11 15:45:20 -07:00
austinpower1258
06c5cac4df Stabilize docked devtools side resize 2026-03-11 12:26:19 -07:00
austinpower1258
63787c26b1 Stabilize inline developer tools hosting 2026-03-11 04:17:37 -07:00
Austin Wang
d25067f38f
Merge pull request #1170 from manaflow-ai/fix-1160-devtools-loop
Fix side-docked browser DevTools resizing
2026-03-10 20:12:17 -07:00
Lawrence Chen
ec10dfdaec
Add browser find focus debug logs (#1162)
* Add browser find focus debug logs

* Allow browser find bar focus in portal host

* Add split and terminal find debug logs

* Avoid stealing search focus across splits

* Generalize panel focus restore intent

* Unify split focus intent activation

* Address focus restore review feedback

* Yield inactive panel focus before restore

* Gate browser find focus retries by generation

* Avoid repeated browser focus invalidation

* Keep browser find ownership while find bar is open
2026-03-10 19:31:52 -07:00
austinpower1258
eea6cdc1bd works 2026-03-10 19:18:30 -07:00
austinpower1258
034f157feb Keep browser omnibar visible across pane zoom 2026-03-10 00:41:00 -07:00
Austin Wang
8fa1ca3a4d
Hide browser portal when terminal tab is active (#1130) 2026-03-09 17:24:58 -07:00
Austin Wang
c447bee602
Fix browser pane portal anchor sizing (#1094)
* Fix browser pane webview sizing

* Guard browser portal by pane ownership

* Keep browser portal frame during transient zero geometry

* Guard portal surfaces against duplicate hosts

* Defer terminal surface reflow during tab drags

* Fix browser panel pane ID unit tests
2026-03-09 13:28:05 -07:00
Lawrence Chen
e680f1de55
Add DEBUG logging for browser omnibar/content focus handoff (#910)
* Add browser focus debug logging around omnibar/content handoff

* Avoid release-only unused-value warnings in focus debug logs

* Add omnibar focus writer trace logs

* Fix omnibar tap focus race

* Stabilize omnibar focus state transitions

* Propagate event context into responder guard

* Fix webview pointer hit testing in focus guard

* Stop omnibar reacquire on pointer blur intent

* Blur omnibar on webview click intent

* Preserve pointer intent through webview focus handoff

* Restore page input focus after omnibar escape

* Fix omnibar escape focus handoff and restore retry

* Track editable focus for omnibar restore and improve test diagnostics

* Add omnibar focus tracker telemetry to failing UI test

* Wait for page readiness before seeding focused input in UI test setup

* Strengthen omnibar escape focus regression with post-click assertion

* Use deterministic window offsets for post-escape web input click test

* Always enforce webview responder on omnibar escape

* Harden omnibar focus restore and address PR review feedback

---------

Co-authored-by: tiffanysun1 <tiffanysun8@gmail.com>
2026-03-07 03:05:13 -08:00
austinpower1258
3874cac08e Merge origin/main into issue-969-browser-drag-top-drop-targets 2026-03-05 22:36:33 -08:00
austinpower1258
2427a2a736 Fix browser portal anchor churn during pane drag 2026-03-05 21:55:26 -08:00
Austin Wang
15c7c0cc3c
Fix side-docked dev tools resize (#712)
* wip

* Fix side-docked dev tools resize
2026-03-05 21:28:31 -08:00
Lawrence Chen
e49e572505
Fix browser Cmd+F overlay clipping in portal mode (#916)
* Fix browser Cmd+F overlay clipping in portal mode

* Fix browser Cmd+F panel update regression

* Fix browser find overlay lifecycle and focus

* Extract regression test helpers for browser find guards

* Restore new-tab Cmd+F overlay and harden test helper

* Fix browser Cmd+F focus handoff race

* Fix browser Cmd+F focus loss across page load

* Address review feedback on browser find focus guards

* Add Cmd+F pane-switch regression UI tests

* Run Cmd+F pane-switch regressions from existing UI suite

* Restore browser find focus on pane refocus

* Stabilize Cmd+F pane-switch regressions with focus-state recorder

* Make autofocus race UI test wait on deterministic page signal

* Fix cmuxTests WebViewRepresentable init after browser search state param
2026-03-05 15:36:47 -08:00
Austin Wang
6fe1410918
Fix terminal link opens to stay in source workspace (#912) 2026-03-04 19:21:45 -08:00
Austin Wang
80baae355a
Add browser camera permission support and metadata (#760) (#913) 2026-03-04 18:56:22 -08:00
Lawrence Chen
28977c8e3b
Fix browser panel lifecycle after WebContent process termination (#892)
* Fix browser panel webview lifecycle after web content crashes

* Fix BrowserPanel observer lifecycle during webview replacement

* Fix WebKit termination delegate and harden lifecycle regression check
2026-03-04 16:23:22 -08:00
Yoshiki Agatsuma
76bdf7631a
Add find-in-page (Cmd+F) for browser panels (#837) (#875)
JavaScript-based find using TreeWalker + <mark> highlights with
match counter, next/previous navigation, and drag-to-corner overlay
matching the existing terminal find bar.

- BrowserFindJavaScript: JS generation for search/next/prev/clear
- BrowserSearchOverlay: SwiftUI overlay with IME-safe onSubmit
- BrowserSearchState: Observable state (needle/selected/total)
- TabManager routing: Cmd+F/G dispatches to browser when focused
- Visibility filter: skips script/style/hidden/aria-hidden elements
- Stale DOM guard: isConnected check in next/previous scripts
- Navigation cleanup: clears find on didFinish and didFailNavigation

Co-authored-by: Lawrence Chen <54008264+lawrencecchen@users.noreply.github.com>
2026-03-04 16:15:15 -08:00
Connor Callison
80eca0de48
Handle TLS authentication challenges to fix Microsoft device compliance (#806)
WKWebView rejects all authentication challenges by default when
webView(_:didReceive:completionHandler:) is not implemented, using
.rejectProtectionSpace. This silently breaks TLS client-certificate
flows like Microsoft Entra ID Conditional Access, which verifies
device compliance via a certificate stored in the system keychain
by MDM enrollment.

By implementing the delegate method and returning
.performDefaultHandling, the system's standard URL-loading behaviour
takes over: the keychain is searched for matching client identities,
MDM-installed root CAs are trusted, and any configured SSO extensions
(e.g. Microsoft Enterprise SSO) can intercept the challenge.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-04 15:48:18 -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
fdc38a3326
Add external URL bypass rules for embedded browser opens (#768)
* Add external URL bypass rules for embedded browser opens

* Align open-wrapper external regex handling with app-side matcher
2026-03-02 17:50:34 -08:00
Lawrence Chen
4d9587c3b0 Fix window.open() and target=_blank not opening in new tab (#693)
Always open programmatic navigation (window.open, target=_blank) in a new tab.
Fix insecure HTTP path to treat nil targetFrame as new-tab intent.

Closes #606

Co-authored-by: lark <lark1115caster@gmail.com>
2026-03-01 21:40:58 -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
Lawrence Chen
838d1b07b1
Fix local HTML file routing in open wrapper (#684)
* Route local HTML open targets to cmux browser

* Keep file:// omnibar navigation inside cmux browser

* Load local file URLs via WKWebView file API

* Add browser regression test for local file URL loads

* Address PR feedback on local HTML and file URL handling
2026-02-28 19:08:39 -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
9ae737026d
Fix browser eval: await promises, always-on console hooks, undefined detection (#613)
- Wrap eval scripts in async IIFE that detects and awaits thenables,
  using callAsyncJavaScript when available (macOS 11+) (#603)
- Register console/error telemetry hooks as WKUserScript at document
  start so they survive navigation and are active before page JS (#604)
- Return typed envelope {__cmux_t, __cmux_v} from eval to distinguish
  undefined from no return value; CLI prints "undefined" (#605)
- Keep dialog hooks as lazy injection only (not document-start) to
  avoid suppressing WKUIDelegate native dialogs
- Add regression tests for async wrapper and undefined CLI rendering
2026-02-27 01:42:27 -08:00
Travis Carr
570ed27b5d
Add Kagi as a search provider option (#561)
Co-authored-by: Travis Carr <tcarr@nvidia.com>
2026-02-26 16:23:10 -08:00
Lawrence Chen
930a6b5bc9
Use sheet modal for insecure HTTP warning prompt (#511)
Fixes CMUXTERM-MACOS-DD
2026-02-25 18:00:45 -08:00
Lawrence Chen
9140371fcd guard devtools restore from unsafe first-responder churn 2026-02-25 15:59:49 -08:00
Lawrence Chen
109ce43c70 settings: control sidebar PR link open target 2026-02-24 20:59:06 -08:00
Lawrence Chen
afbfb5a117 Use native WebKit middle-click handling for browser links (#416)
* Add middle-click debug logging for browser links

* Handle browser middle-click via native WebKit actions

* Fix flaky middle-click new-tab detection in browser
2026-02-24 14:35:10 -08:00
austinpower1258
05209e7d50 Fix stale browser favicon after navigation 2026-02-24 14:35:09 -08:00
Lawrence Chen
06cd25ed52 Fix session restore routing and browser history persistence 2026-02-24 14:34:55 -08:00
Austin Wang
d42126a082
Handle deeplink URL schemes in embedded browser (#392) 2026-02-23 10:51:28 -08:00
Lawrence Chen
2499ba1bb2
Fix browser-surface click focus without regressing open (#355)
* Allow click-to-focus for unfocused browser surfaces

* Add browser click-focus diagnostics and guard fix

* Allow pointer-initiated browser focus through responder guard
2026-02-23 03:09:19 -08:00
Lawrence Chen
6f44f17f33 Fix follow-up PR331 settings and split focus regressions 2026-02-22 19:55:06 -08:00
Lawrence Chen
0046b674aa Split open-wrapper interception into its own setting 2026-02-22 18:26:07 -08:00
Lawrence Chen
d496a07a84
Hide new-tab toggles and align dark-mode button styling (#322)
* Hide new-tab browser toggles and align dark-mode button style

* Switch forced dark mode from dimming overlay to dark theme

* Add tri-state browser theme mode for embedded web view

* Hide browser theme menu chevron in toolbar

* Use outline icons for browser theme toggle

* Align browser theme icon tint with DevTools button

* Force monochrome rendering for browser toolbar icons

* Reduce browser theme icon weight for visual parity

* Tune browser theme icon stroke for perceptual color match

* Force flat SF Symbol color rendering for toolbar icons

* Use button popover for browser theme selector
2026-02-22 17:41:10 -08:00
Austin Wang
fb2ae855db
Light mode (#258) 2026-02-21 15:39:25 -08:00