cmux/Sources
Achieve 71f0e69578
fix(socket): return not_found error when surface_id is provided but unresolvable (#2150)
Previously, v2SurfaceSendText, v2SurfaceSendKey, v2SurfaceClearHistory, and
v2SurfaceReadText would silently fall back to ws.focusedPanelId when a caller
supplied a surface_id that could not be resolved (e.g. a stale ref or an ordinal
whose mapping had not yet been registered). This caused two distinct bugs:

- #2042: Commands like `cmux send --surface surface:9999` would succeed (exit 0)
  and deliver input to the focused pane instead of returning an error, making
  automation that targets specific surfaces unreliable.

- #2045: When the fallback landed on a browser panel, the subsequent
  ws.terminalPanel(for:) check failed and returned "Surface is not a terminal",
  making valid terminal surfaces appear broken when addressed by ref.

The fix adds an explicit check: if params["surface_id"] is present but
v2UUID() returns nil (resolution failure), we immediately return a not_found
error instead of falling back to the focused pane. When surface_id is absent,
the existing focused-pane fallback is preserved for backward compatibility.

Fixes #2042, Fixes #2045

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 18:45:21 -07:00
..
Find Fix command palette focus after terminal find (#2089) 2026-03-25 17:27:54 -07:00
Panels fix(sidebar): use dedicated setting for port link browser preference (#2219) 2026-03-26 17:12:37 -07:00
Update Fix update attempt refreshing pill without actually updating (#2168) 2026-03-25 16:55:29 -07:00
AppDelegate.swift fix: keyboard shortcuts not working with Russian layout (#2202) 2026-03-26 15:25:36 -07:00
AppleScriptSupport.swift fix: read working directory from panelDirectories instead of TerminalPanel 2026-03-20 04:15:44 +08:00
Backport.swift Resync terminal portals after sidebar changes (#1253) 2026-03-12 02:46:30 -07:00
BrowserWindowPortal.swift Fix panel resize stuttering when tiled with browser panels (#1969) 2026-03-24 22:24:17 -07:00
cmuxApp.swift fix(sidebar): use dedicated setting for port link browser preference (#2219) 2026-03-26 17:12:37 -07:00
CmuxConfig.swift Validate workspace color during cmux.json decode (#2112) 2026-03-24 22:58:27 -07:00
CmuxConfigExecutor.swift Sanitize command before execution, not just display (#2122) 2026-03-25 00:28:30 -07:00
CmuxDirectoryTrust.swift feat: cmux.json for custom commands (#2011) 2026-03-24 22:28:46 -07:00
ContentView.swift fix(sidebar): use dedicated setting for port link browser preference (#2219) 2026-03-26 17:12:37 -07:00
GhosttyConfig.swift Add configurable sidebar tint color with light/dark mode support (#1465) 2026-03-15 15:48:57 -07:00
GhosttyTerminalView.swift fix: route PWD action to correct TabManager per tabId (#2147) 2026-03-26 15:16:12 -07:00
KeyboardLayout.swift fix: prevent Japanese IME confirmation Enter from executing command (#2075) 2026-03-24 22:24:13 -07:00
KeyboardShortcutSettings.swift Customizable number shortcuts (#1951) 2026-03-22 14:54:54 -07:00
NotificationsPage.swift Add Jump to Latest to the notifications popover (#1167) 2026-03-10 19:30:17 -07:00
PortScanner.swift Fix workspace creation crash after restore (#1985) 2026-03-25 00:04:03 -07:00
PostHogAnalytics.swift Flush PostHog hourly active events immediately (#934) 2026-03-05 04:00:04 -08:00
RemoteRelayZshBootstrap.swift Support image drag-and-drop into SSH terminals (#1838) 2026-03-20 18:31:19 -07:00
SentryHelper.swift Auto-heal missing CLI listener socket (#679) 2026-02-28 01:19:38 -08:00
SessionPersistence.swift fix: skip identical session autosave writes (#1732) 2026-03-18 03:24:40 -07:00
SidebarSelectionState.swift Implement session persistence pass 1 with multi-window restore 2026-02-22 15:39:59 -08:00
SocketControlSettings.swift Merge remote-tracking branch 'origin/main' into pr-ssh-stack-main 2026-03-13 17:56:38 -07:00
TabManager.swift Revert "Merge pull request #1915 from elvistranhere/fix/split-crash-intel-1870" (#2221) 2026-03-26 16:01:53 -07:00
TerminalController.swift fix(socket): return not_found error when surface_id is provided but unresolvable (#2150) 2026-03-26 18:45:21 -07:00
TerminalImageTransfer.swift Fix SSH image transfer followups (#1904) 2026-03-20 21:32:21 -07:00
TerminalNotificationStore.swift Fix sidebar notification persisting after being read (#1933) 2026-03-24 20:54:41 -07:00
TerminalSSHSessionDetector.swift Fix SSH image transfer cleanup and IPv6 followups (#1907) 2026-03-20 22:04:52 -07:00
TerminalView.swift Add sidebar blur effect with withinWindow blending (#9) 2026-02-04 03:04:45 -08:00
TerminalWindowPortal.swift fix: hide stale terminal portal after restore churn 2026-03-23 19:19:05 -07:00
UITestRecorder.swift Fix frozen terminals after split churn (#12) 2026-02-13 16:45:31 -08:00
WindowAccessor.swift Polish browser suggestions, focus, and tagged reload flow 2026-02-14 21:33:28 -08:00
WindowDecorationsController.swift Refine settings/about titlebar styling and controls alignment 2026-02-14 02:11:35 -08:00
WindowDragHandleView.swift Fix titlebar double-click zoom handling (#2130) 2026-03-25 02:15:15 -07:00
WindowToolbarController.swift Reapply "Merge pull request #239 from manaflow-ai/issue-151-ssh-remote-port-proxying" 2026-03-12 15:54:26 -07:00
Workspace.swift Fix nightly SSH remote daemon checksum mismatch (#2225) 2026-03-26 17:24:37 -07:00
WorkspaceContentView.swift Fix titlebar double-click zoom handling (#2130) 2026-03-25 02:15:15 -07:00