Skip to content

Fix remote SSH workspace cwd tracking - #6747

Merged
austinywang merged 7 commits into
mainfrom
issue-6746-remote-ssh-cwd
Jun 25, 2026
Merged

austinywang merged 7 commits into
mainfrom
issue-6746-remote-ssh-cwd

Conversation

@austinywang

@austinywang austinywang commented Jun 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • add regression coverage for remote zsh, bash, and fish prompt cwd relay
  • add surface.report_pwd so remote shell integrations can update the shared workspace panel directory
  • preserve early remote cwd reports until the remote terminal surface is registered

Testing

  • Not run locally per issue instructions; CI/PR workflows only.

Issue: #6746

Closes #6746


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.


Summary by cubic

Fixes remote SSH workspace CWD tracking from the first prompt and stops local config/hook scans on remote paths. Adds and advertises the surface.report_pwd RPC; bash/zsh/fish now report CWD via socket or the remote relay. Addresses #6746.

  • Bug Fixes
    • Implemented surface.report_pwd end-to-end with alias support (path/directory/cwd), conflict checks, and clear not_found errors; capability is now advertised.
    • Updated cmux-{bash,zsh} and fish prompts to report CWD (UNIX socket when present, relay otherwise) with last-PWD dedupe; added relay helpers and regression tests for bash/zsh/fish.
    • Queues early remote CWD reports and applies them when the first remote surface registers; preserves exact path whitespace.
    • No local config or hook scans for remote paths: disables project-root refresh for remote workspaces and passes no starting path to notification hooks in FeedCoordinator and TerminalNotificationStore.

Written for commit af708de. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • New Features

    • Added support for reporting the current working directory from remote shell sessions (including relay-based reporting when no local UNIX socket is available).
    • Expanded V2 socket/RPC support with the new surface.report_pwd command so the app can process directory reports.
  • Bug Fixes

    • Added validation for path/cwd inputs, rejecting conflicting or missing values.
    • Improved remote surface handling by introducing a pending remote directory (PWD) flow and clearing it on disconnect.
  • Tests

    • Added/updated integration and coordinator tests to cover surface.report_pwd for bash/zsh relay scenarios and parameter validation.

@vercel

vercel Bot commented Jun 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cmux Ready Ready Preview, Comment Jun 24, 2026 10:25pm
cmux-staging Building Building Preview, Comment Jun 24, 2026 10:25pm

@coderabbitai

coderabbitai Bot commented Jun 24, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR adds surface.report_pwd handling across the control socket, workspace state, shell integrations, and tests. It also changes diff viewer launch argument handling and subprocess environment setup.

Changes

surface.report_pwd pipeline

Layer / File(s) Summary
Command contract and routing
Packages/macOS/CmuxControlSocket/Sources/CmuxControlSocket/Coordinator/Surface/*, Sources/TerminalController.swift
Adds the new surface.report_pwd RPC contract, dispatch path, and advertised capability list.
Request handling and validation
Packages/macOS/CmuxControlSocket/Sources/CmuxControlSocket/Coordinator/Surface/ControlCommandCoordinator+Surface3.swift, Packages/macOS/CmuxControlSocket/Tests/CmuxControlSocketTests/*
Parses surface.report_pwd parameters, maps context resolutions, and adds stub/test coverage for alias conflicts and path whitespace handling.
Remote PWD state and directory updates
Sources/TerminalController+ControlSurfaceContext4.swift, Sources/Workspace.swift, Sources/Feed/FeedCoordinator.swift, Sources/TerminalNotificationStore.swift
Tracks pending remote PWD state, applies it when surfaces appear, and updates remote directory tracking and hook starting paths.
Shell relay reporting
Resources/shell-integration/*
Adds relay helpers and prompt hooks in bash, zsh, and fish to send surface.report_pwd when $PWD changes.
Tests and project wiring
cmuxTests/FishShellIntegrationTests.swift, cmuxTests/RemoteShellCWDRelayTests.swift, cmux.xcodeproj/project.pbxproj
Adds shell integration tests, relay test helpers, and the project entries needed to compile the new relay test bundle.

Diff viewer launch update

Layer / File(s) Summary
Session flag and environment setup
Sources/AppDelegate.swift
Adds --session when launching cmux diff with last-turn source and switches subprocess setup to environment variables instead of currentDirectoryURL.

Sequence Diagram(s)

sequenceDiagram
  participant ShellHooks as Shell hooks
  participant Coordinator as ControlCommandCoordinator
  participant TerminalController as TerminalController
  participant Workspace as Workspace
  ShellHooks->>Coordinator: surface.report_pwd(workspace_id, surface_id?, path)
  Coordinator->>TerminalController: surfaceReportPWD(request.params)
  TerminalController->>Workspace: controlSurfaceReportPWD(workspaceID, requestedSurfaceID, path)
  Workspace-->>TerminalController: ControlSurfaceReportPWDResolution
  TerminalController-->>Coordinator: ok / pending / not_found
  Coordinator-->>ShellHooks: control call response
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related issues

Possibly related PRs

  • manaflow-ai/cmux#2398 — Overlaps with the relay-mode shell prompt flow that now carries PWD reporting.
  • manaflow-ai/cmux#6468 — Also changes Sources/AppDelegate.swift diff viewer launch behavior and session-related subprocess setup.

Suggested reviewers

  • lawrencecchen

Poem

🐰 I hopped through the prompts at dusk and dawn,
sending PWD footprints where the shell had gone.
Bash, zsh, and fish all whispered the trail,
while cmux tucked each path in without fail.
Thump-thump — the workspace knew where to roam.


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error, 2 warnings)

Check name Status Explanation Resolution
Cmux Full Internationalization ❌ Error New production API errors 'Missing path' and 'Conflicting path parameters' are plain literals, with no matching localization entries. Localize the new surface.report_pwd error messages with String(localized:defaultValue:) and add matching catalog entries for all supported locales.
Docstring Coverage ⚠️ Warning Docstring coverage is 11.54% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The description covers summary and testing, but it omits the required Demo Video, Review Trigger, and Checklist sections from the repository template. Add the missing template sections, or mark them N/A if not applicable, and include the review-trigger comment block and checklist items.
✅ Passed checks (22 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the main change: fixing remote SSH workspace cwd tracking.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Cmux Swift Actor Isolation ✅ Passed PWD plumbing stays behind existing @MainActor coordinators/protocols; new enum is value-only Sendable, and test stubs are main-actor isolated.
Cmux Swift Blocking Runtime ✅ Passed New Swift prod code is synchronous; the only sleeps/waits are in test scaffolding, which the rule explicitly allows.
Cmux Browser Automation Off-Main ✅ Passed PR only adds selection-screen-row C APIs in Zig/C header files; it does not touch browser.* routing, WebKit waits, or socket-worker policy.
Cmux Expensive Synchronous Load ✅ Passed No new sync history load in changed code; report_pwd paths only mutate workspace state, and the only RestorableAgentSessionIndex.load() is the pre-existing guarded fallback in Workspace.
Cmux Cache Substitution Correctness ✅ Passed PASS: the new PWD cache is only an event-driven buffer for late remote surfaces; no persistence/history/snapshot path replaces a fresh read with stale cache.
Cmux No Hacky Sleeps ✅ Passed The new bash/zsh/fish cwd relay hooks are event-driven and add no fixed sleeps, timers, or polling loops in runtime code.
Cmux Algorithmic Complexity ✅ Passed New report_pwd and pending-PWD paths are one-pass or fixed-size checks; no nested rescans or repeated hot-path sorting/filtering were added.
Cmux Swift Concurrency ✅ Passed The new report_pwd plumbing is synchronous; I found no added DispatchQueue, Task, Combine, or completion-based async in the changed PWD code.
Cmux Swift @Concurrent ✅ Passed No new async actor-bound work or @concurrent misuse was introduced; the added report_pwd paths are synchronous and remain on @MainActor.
Cmux Swift File And Package Boundaries ✅ Passed PASS: New/expanded production Swift files stay under 400 lines (375/367/23/478), and the app-target edits are focused glue/state updates in existing oversized files.
Cmux Swiftpm Lockfiles ✅ Passed All cmux-owned package dep edits have matching package-local Package.resolved diffs, the edited .gitignore files don't ignore Package.resolved, and cmux.xcodeproj has the root lockfile.
Cmux Swift Logging ✅ Passed New report_pwd code adds no print/debugPrint/dump/NSLog/Logger; only existing DEBUG-guarded logs remain in unrelated paths.
Cmux User-Facing Error Privacy ✅ Passed New user-facing errors are generic product terms; no vendor names, env vars, raw upstream messages, or payload dumps were added.
Cmux Swiftui State Layout ✅ Passed PR only tweaks coordinator/model/shell logic; no new SwiftUI layout/state pattern from the rule was added or expanded.
Cmux Architecture Rethink ✅ Passed report_pwd uses the existing control-surface seam and Workspace-owned pending state; no new polling, sleeps, or split lifecycle ownership was introduced.
Cmux Swift Auxiliary Window Close Shortcuts ✅ Passed PR changes are shell/CWD plumbing and tests only; no new standalone NSWindow/NSPanel/WindowGroup or cmuxAuxiliaryWindowIdentifiers changes were introduced.
Cmux Source Artifacts ✅ Passed Root changes are submodule gitlinks; ghostty edits only source files, and vendor/bonsplit’s commit only touches source/test files—no artifacts.
Cmux No Test Or Debug Seam In Production Source ✅ Passed The new report_pwd API and pending-PWD helpers are production feature code, not test/debug seams; no new DEBUG-only or test-only accessor was added.
Cmux No Ambient Global State ✅ Passed New PWD state is scoped to Workspace; the added RPC handlers and resolution enum are type members, with no new file-scope API or singleton runtime state.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-6746-remote-ssh-cwd

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.

@greptile-apps

greptile-apps Bot commented Jun 24, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR implements end-to-end remote SSH workspace cwd tracking by adding a surface.report_pwd RPC, updating bash/zsh/fish shell integrations to report PWD on every prompt change (via unix socket or relay), and queuing early PWD reports until the first remote surface registers. It also hardens the remote-path guard in several places that previously walked local filesystems with remote directory paths.

  • New surface.report_pwd RPC: The coordinator validates path/directory/cwd aliases, detects conflicts, delegates to controlSurfaceReportPWD, and returns .pending for remote workspaces with no surfaces yet — mirroring the existing TTY/port-kick pending pattern.
  • Shell integration updates (bash/zsh/fish): Each shell reports PWD on change via unix socket (_cmux_send_bg) when available, falling back to the relay path; dedup via _CMUX_PWD_LAST_PWD prevents redundant reports.
  • Remote-path filesystem guard widened: configTrackingDirectory, scheduleExtensionSidebarProjectRootRefresh, FeedCoordinator, and TerminalNotificationStore now all guard on isRemoteWorkspace (previously only isRemoteTmuxMirror), preventing autofs stalls from remote path stat/walk operations; updatePanelDirectory is also harmonized to use configTrackingDirectory for surfaceTabBarDirectory, fixing a pre-existing inconsistency where remote paths could slip through between directory updates and focus changes.

Confidence Score: 5/5

Safe to merge — the new RPC, pending-queue pattern, and filesystem guards are all consistent with existing patterns in the codebase and well-covered by new integration tests.

The implementation follows the established pending-state pattern (TTY, port-kick) exactly, adds proper cleanup on disconnect, and all remote-path filesystem guards are symmetric across every call site that was previously unguarded. Shell integration changes are additive and covered by regression tests for all three shells.

No files require special attention.

Important Files Changed

Filename Overview
Sources/Workspace.swift Adds pendingRemoteSurfacePWD/SurfaceId state with remember/apply helpers; widens configTrackingDirectory guard from isRemoteTmuxMirror to isRemoteWorkspace; harmonizes updatePanelDirectory to use configTrackingDirectory for surfaceTabBarDirectory (fixing a pre-existing inconsistency where remote paths could slip through); guards scheduleExtensionSidebarProjectRootRefresh on isRemoteWorkspace.
Sources/TerminalController+ControlSurfaceContext4.swift Implements controlSurfaceReportPWD witness: resolves surface, queues pending for empty remote workspaces, then dispatches to updatePanelDirectory (remote) or tabManager.updateSurfaceDirectory (local), consistent with the report_tty pattern.
Packages/macOS/CmuxControlSocket/Sources/CmuxControlSocket/Coordinator/Surface/ControlCommandCoordinator+Surface3.swift Adds surfaceReportPWD handler with parameter validation (path aliases, conflict detection), workspace/surface resolution, and proper .pending/.recorded/.notFound responses.
Resources/shell-integration/cmux-bash-integration.bash Adds _cmux_report_pwd_via_relay relay helper and _CMUX_PWD_LAST_PWD dedup; relay path reports on change; unix socket path also reports via _cmux_send_bg with simple quote-only escaping consistent with existing socket commands.
Resources/shell-integration/fish/config.fish Adds _cmux_report_pwd_via_relay and _CMUX_PWD_LAST_PWD; fish prompt updates PWD via unix socket (_cmux_send_bg with JSON escaping) when available, else relay; dedup state only updated on success.
Sources/Feed/FeedCoordinator.swift Guards notificationHooks lookup with isRemoteWorkspace; adds private normalizedFeedNotificationCWD helper; hooks search root now uses event.cwd (normalized) ?? surfaceTabBarDirectory instead of the broader cwd local that fell back to currentDirectory and homeDir.
cmuxTests/RemoteShellCWDRelayTests.swift New integration tests for zsh and bash relay PWD reporting; uses RunLoop-based process timeout (test-only scaffolding) and shell-side sleep 0.05 polling to await background relay writes.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
    participant Shell as Remote Shell (bash/zsh/fish)
    participant Relay as cmux CLI relay
    participant Socket as ControlSocket Coordinator
    participant TC as TerminalController
    participant WS as Workspace

    Shell->>Relay: "rpc surface.report_pwd {workspace_id, path, surface_id}"
    Relay->>Socket: surfaceReportPWD(params)
    Socket->>TC: controlSurfaceReportPWD(workspaceID, surfaceID, path)
    
    alt No surfaces registered yet (remote workspace)
        TC->>WS: rememberPendingRemoteSurfacePWD(path, requestedSurfaceId)
        TC-->>Socket: .pending
        Socket-->>Relay: "{ok, pending: true}"
        Note over WS: pendingRemoteSurfacePWD stored
        WS->>WS: _didActivateRemoteTerminalSurface(panelId)
        WS->>WS: applyPendingRemoteSurfacePWDIfNeeded(panelId)
        WS->>WS: updatePanelDirectory(panelId, path)
    else Surface registered
        TC->>WS: updatePanelDirectory(surfaceId, path)
        TC-->>Socket: .recorded(surfaceID)
        Socket-->>Relay: "{ok, surface_id, path}"
    end
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
    participant Shell as Remote Shell (bash/zsh/fish)
    participant Relay as cmux CLI relay
    participant Socket as ControlSocket Coordinator
    participant TC as TerminalController
    participant WS as Workspace

    Shell->>Relay: "rpc surface.report_pwd {workspace_id, path, surface_id}"
    Relay->>Socket: surfaceReportPWD(params)
    Socket->>TC: controlSurfaceReportPWD(workspaceID, surfaceID, path)
    
    alt No surfaces registered yet (remote workspace)
        TC->>WS: rememberPendingRemoteSurfacePWD(path, requestedSurfaceId)
        TC-->>Socket: .pending
        Socket-->>Relay: "{ok, pending: true}"
        Note over WS: pendingRemoteSurfacePWD stored
        WS->>WS: _didActivateRemoteTerminalSurface(panelId)
        WS->>WS: applyPendingRemoteSurfacePWDIfNeeded(panelId)
        WS->>WS: updatePanelDirectory(panelId, path)
    else Surface registered
        TC->>WS: updatePanelDirectory(surfaceId, path)
        TC-->>Socket: .recorded(surfaceID)
        Socket-->>Relay: "{ok, surface_id, path}"
    end
Loading

Reviews (3): Last reviewed commit: "Make remote notification hook root expli..." | Re-trigger Greptile

Comment thread Sources/Workspace.swift Outdated
Comment on lines +6289 to +6292
guard let path = pendingRemoteSurfacePWD?.trimmingCharacters(in: .whitespacesAndNewlines),
!path.isEmpty else {
return false
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 The path is already trimmed and validated non-empty inside rememberPendingRemoteSurfacePWD before it is stored in pendingRemoteSurfacePWD, so the re-trim here is redundant. A simpler guard that just checks for nil / empty after unwrapping would be clearer and consistent with how applyPendingRemoteSurfaceTTYIfNeeded reads the stored value directly without re-trimming.

Suggested change
guard let path = pendingRemoteSurfacePWD?.trimmingCharacters(in: .whitespacesAndNewlines),
!path.isEmpty else {
return false
}
guard let path = pendingRemoteSurfacePWD, !path.isEmpty else {
return false
}

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Comment on lines +223 to +225
let rawPath = rawString(params, "path")
?? rawString(params, "directory")
?? rawString(params, "cwd")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 The coordinator silently accepts "directory" and "cwd" as undocumented aliases for the path key. No shell integration sends either of these keys — all three shells always use "path" — and the ControlSurfaceContext protocol doc only mentions path. Accepting three different keys without documenting them creates an invisible surface area in the API; if the intent is deliberate forward-compatibility, a comment explaining the aliases would prevent future readers from pruning them as dead code.

Suggested change
let rawPath = rawString(params, "path")
?? rawString(params, "directory")
?? rawString(params, "cwd")
// "directory" and "cwd" are accepted as forward-compatibility aliases for "path".
let rawPath = rawString(params, "path")
?? rawString(params, "directory")
?? rawString(params, "cwd")

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@Packages/macOS/CmuxControlSocket/Sources/CmuxControlSocket/Coordinator/Surface/ControlCommandCoordinator`+Surface3.swift:
- Around line 223-227: The cwd parsing in ControlCommandCoordinator+Surface3
currently treats path, directory, and cwd as interchangeable and silently picks
the first value, which can hide conflicting inputs. Update the logic around the
rawString(params, ...) lookup to require a single authoritative alias, and
reject the request with an invalid_params error if more than one of
path/directory/cwd is present with different trimmed values. Keep the existing
empty-path validation, but ensure the chosen remote cwd is derived only when the
aliases agree.

In `@Resources/shell-integration/fish/config.fish`:
- Around line 299-307: The cwd cache is being updated too early in the prompt
handler, causing missed retries when the report cannot actually be sent. Move
the set of _CMUX_PWD_LAST_PWD in config.fish so it only happens after
_cmux_send_bg or _cmux_report_pwd_via_relay succeeds, and keep the existing
precondition checks around the report path in the prompt/cwd reporting flow. Use
the current pwd-report logic around _CMUX_PWD_LAST_PWD, _cmux_socket_is_unix,
and _cmux_report_pwd_via_relay to ensure the launch cwd is retried until the
terminal surface is ready.

In `@Sources/Workspace.swift`:
- Around line 6279-6299: The pending remote cwd handling in
rememberPendingRemoteSurfacePWD and applyPendingRemoteSurfacePWDIfNeeded is
stripping valid leading/trailing spaces from the reported path. Remove the
trimming logic in both places so the exact shell-reported cwd is preserved when
storing pendingRemoteSurfacePWD and when later passing it to
updatePanelDirectory; keep the empty-path guard based on the unmodified string.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 71b03fd8-5dea-4d1e-895a-aad4c63997c1

📥 Commits

Reviewing files that changed from the base of the PR and between 3a23bfa and f6650f7.

📒 Files selected for processing (13)
  • Packages/macOS/CmuxControlSocket/Sources/CmuxControlSocket/Coordinator/Surface/ControlCommandCoordinator+Surface.swift
  • Packages/macOS/CmuxControlSocket/Sources/CmuxControlSocket/Coordinator/Surface/ControlCommandCoordinator+Surface3.swift
  • Packages/macOS/CmuxControlSocket/Sources/CmuxControlSocket/Coordinator/Surface/ControlSurfaceContext.swift
  • Packages/macOS/CmuxControlSocket/Sources/CmuxControlSocket/Coordinator/Surface/ControlSurfaceReportPWDResolution.swift
  • Packages/macOS/CmuxControlSocket/Tests/CmuxControlSocketTests/ControlCommandContextTestStubs.swift
  • Resources/shell-integration/cmux-bash-integration.bash
  • Resources/shell-integration/cmux-zsh-integration.zsh
  • Resources/shell-integration/fish/config.fish
  • Sources/TerminalController+ControlSurfaceContext4.swift
  • Sources/TerminalController.swift
  • Sources/Workspace.swift
  • cmuxTests/FishShellIntegrationTests.swift
  • cmuxTests/GhosttyConfigTests.swift

Comment thread Resources/shell-integration/fish/config.fish Outdated
Comment thread Sources/Workspace.swift

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Sources/TerminalNotificationStore.swift`:
- Line 1057: The notification hook startup logic in TerminalNotificationStore is
relying on workspace?.surfaceTabBarDirectory being nil for remote workspaces,
and the non-remote branch also redundantly falls back to the same value already
represented by cwd. Update the notificationHooks(startingFrom:) call to pass nil
explicitly in the remote-workspace path, and simplify the non-remote path to use
cwd directly, keeping the behavior in line with the existing workspace/cwd
resolution used earlier in the method.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: a0e5561c-c7aa-4758-bebc-25a31c1d3009

📥 Commits

Reviewing files that changed from the base of the PR and between da8cf66 and da3b3c7.

📒 Files selected for processing (2)
  • Sources/Feed/FeedCoordinator.swift
  • Sources/TerminalNotificationStore.swift

Comment thread Sources/TerminalNotificationStore.swift Outdated
@austinywang
austinywang merged commit 047e260 into main Jun 25, 2026
35 checks passed

This branch was successfully deployed

1 active deployment
Preview – cmux — af708de6 Deployed Jun 24, 2026 by vercel[bot]
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.

Diff view and file browser use the local launch path (ssh:hostname:<local-path>) on cmux ssh remote sessions instead of the remote cwd

1 participant