Skip to content

Revert "Out-of-process custom sidebars: isolated interpreter + remote rendering (#5294)" - #5372

Merged
azooz2003-bit merged 1 commit into
mainfrom
revert-5294-sidebar-isolation
Jun 4, 2026
Merged

azooz2003-bit merged 1 commit into
mainfrom
revert-5294-sidebar-isolation

Conversation

@azooz2003-bit

@azooz2003-bit azooz2003-bit commented Jun 4, 2026 •

Copy link
Copy Markdown
Collaborator

Reverts 56db7a9. The main tests job went red exactly at that commit (e380d42 immediately before it is green) with a cluster of AppDelegateShortcutRoutingTests failures — see #5367 for the cluster analysis. The failing test files are byte-identical to green main, so the trigger is an interaction (likely test-host state or execution-order shift from the added code), but main must be green first; #5294 will be re-landed once the interaction is understood and the tests job passes on the re-land PR.

🤖 Generated with Claude Code


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


Summary by cubic

Reverts the out-of-process custom sidebars feature (#5294) to restore a green main build after test failures in AppDelegateShortcutRoutingTests. Custom sidebars now render in-process again; the isolated interpreter and remote rendering path are removed.

  • Bug Fixes
    • Removed CmuxSidebarInterpreterService package, worker executables, and tests; deleted remote layer hosting and worker coordination code.
    • Simplified CustomSidebarView and model to interpret locally; removed app worker-mode flags and entry points.
    • Removed the “Custom Sidebars” beta toggle and related localized strings/resources from CmuxSettingsUI and CmuxSwiftRenderUI.
    • Dropped Codable from render types in CmuxSwiftRender now that no cross-process encoding is needed.

Written for commit 6c2e51b. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Bug Fixes

    • Removed custom sidebars from beta features to improve stability.
  • Chores

    • Removed out-of-process sidebar rendering infrastructure.
    • Simplified sidebar rendering implementation.
    • Removed unused API types and protocols related to sidebar interpretation.
    • Removed custom sidebar localization strings.

@vercel

vercel Bot commented Jun 4, 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 4, 2026 7:51pm
cmux-staging Building Building Preview, Comment Jun 4, 2026 7:51pm

@coderabbitai

coderabbitai Bot commented Jun 4, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR removes the out-of-process sidebar interpreter service and consolidates sidebar rendering to in-process only. It deletes the entire CmuxSidebarInterpreterService package, removes the customSidebars beta feature, removes serialization from render types, simplifies the sidebar model to use @Observable, and eliminates worker-mode routing from app startup.

Changes

Sidebar Rendering Consolidation

Layer / File(s) Summary
Remove customSidebars beta feature from settings
Packages/CmuxSettingsUI/.../CuratedSettingEntry+Default.swift, Packages/CmuxSettingsUI/.../BetaFeaturesSection.swift, Resources/Localizable.xcstrings
Removes the customSidebars beta toggle entry, its UI row rendering, and all associated localization strings (en/ja).
Remove CmuxSidebarInterpreterService package and worker infrastructure
Packages/CmuxSidebarInterpreterService/Package.swift, Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarInterpreterClient/*.swift, Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarRemoteRender/*.swift, Packages/CmuxSidebarInterpreterService/Tests/*.swift
Deletes the entire out-of-process interpreter service: Package manifest, interpreter/render-worker client implementations, remote rendering layer (RenderWorkerClient, RemoteCustomSidebarView, tap-target collection), and all related tests.
Remove Codable serialization conformance from render types
Packages/CmuxSwiftRender/Sources/CmuxSwiftRender/{ActionCommand,ButtonAction,RenderNode,RenderModifier,ModifierArg,ReorderSpec,SwiftValue}.swift
Removes Codable protocol conformance from core render model types since in-process rendering does not require serialization over IPC channels.
Refactor CustomSidebarModel and CustomSidebarView to in-process
Packages/CmuxSwiftRenderUI/Sources/CmuxSwiftRenderUI/Sidebar/CustomSidebarModel.swift, Packages/CmuxSwiftRenderUI/Sources/CmuxSwiftRenderUI/Sidebar/CustomSidebarView.swift
Converts CustomSidebarModel from public interpreter-injected to internal @MainActor @Observable`` using SwiftViewInterpreter directly; changes rendering from async sticky-state `renderSwift()` to synchronous `renderNode()`; simplifies reload to notification-based observer with name filtering. Refactors `CustomSidebarView` to render UI directly without delegation, removes interpreter parameter, and inlines content view with split-root handling.
Remove tap-target preference collection
Packages/CmuxSwiftRenderUI/Sources/CmuxSwiftRenderUI/Rendering/{SidebarTapTarget,SidebarTapTargetsKey}.swift, Packages/CmuxSwiftRenderUI/Sources/CmuxSwiftRenderUI/JSON/DSLSidebarRenderer.swift, Packages/CmuxSwiftRenderUI/Sources/CmuxSwiftRenderUI/Rendering/RenderNodeView.swift
Deletes tap-target reporting infrastructure and replaces .reportTapTarget() modifier calls with direct onTapGesture for action dispatch.
Switch ContentView to in-process sidebar rendering
Sources/ContentView.swift
Removes sidebarRenderWorkerClient state and imports, replaces RemoteCustomSidebarView with direct CustomSidebarView, adds .id(customSidebarURL) forcing remount on URL change.
Remove worker-mode routing from app startup
Sources/cmuxApp.swift
Deletes @main enum CmuxMain startup logic that routed render/interpreter worker modes; removes interpreter/remote-render imports; leaves app running in host mode only.
Update package manifests and build configuration
Packages/CmuxSwiftRenderUI/Package.swift, cmux.xcodeproj/project.pbxproj
Removes defaultLocalization and resource processing from CmuxSwiftRenderUI Package.swift; removes CmuxSidebarInterpreterService package reference; wires CmuxSidebarProviderKit into app targets.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related issues

  • manaflow-ai/cmux#5370: Failing tests in interpreter/remote-render infrastructure that is now completely removed by this PR.

Possibly related PRs

  • manaflow-ai/cmux#5294: Introduced the CmuxSidebarInterpreterService and remote-render worker client infrastructure that this PR removes entirely.
  • manaflow-ai/cmux#5254: Introduced the customSidebars beta feature that this PR removes along with its UI/settings infrastructure.
  • manaflow-ai/cmux#5327: Extends the custom-sidebar reload flow via notification that this PR simplifies.

Poem

🐰 Out-of-process dreams fade to in-process streams,
Worker modes and pipes drift by like moonbeams.
Codable echoes vanish from the wire,
Tap targets dissolve, as sidebars climb higher—
One process, one truth, one render so pure.


Caution

Pre-merge checks failed

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

  • Ignore

❌ Failed checks (1 error, 1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Cmux Swiftui State Layout ❌ Error CustomSidebarModel.renderNode mutates cachedSource/cachedProgram during @ViewBuilder evaluation, violating swiftui-state-layout.md rule against render-time state mutations. Move parse-cache mutations out of renderNode() to reload() or a state change hook, making renderNode read-only during render.
Docstring Coverage ⚠️ Warning Docstring coverage is 44.44% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive The description provides the reason for the revert (test failures), references the failing test cluster, notes that test files are unchanged, indicates an interaction was triggered, and clarifies the plan for re-landing. However, it lacks explicit sections matching the template's required structure (Summary, Testing, Demo Video, Checklist). Consider using the repository's PR description template to provide Testing details, Demo Video (if applicable), and completing the Checklist items for consistency with repository standards.
✅ Passed checks (15 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the primary change: it is a revert of a specific commit that introduced out-of-process custom sidebars, and includes the referenced PR number for context.
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 PR removes out-of-process infrastructure and properly isolates UI models with @MainActor; no implicit MainActor value models or Sendable references without isolation introduced or worsened.
Cmux Swift Blocking Runtime ✅ Passed This revert PR removes out-of-process sidebar infrastructure without introducing blocking synchronization. Pre-existing asyncAfter/Task.sleep/NSLock patterns are not newly added.
Cmux No Hacky Sleeps ✅ Passed Revert PR adds legitimate setTimeout/timeouts for product behavior (navigation debouncing, HTTP timeouts, keyboard chords) and test mocks, not hacky sleeps.
Cmux Algorithmic Complexity ✅ Passed No algorithmic complexity violations. The names.contains call (line 117) operates on a tiny fixed-size notification payload, which passes the rule.
Cmux Swift Concurrency ✅ Passed Revert removes legacy out-of-process interpreter actors; introduces only @Observable model and one Task at AppKit NotificationCenter callback boundary with proper @MainActor isolation and lifecycle.
Cmux Swift @Concurrent ✅ Passed The rule targets async helpers; restored code uses synchronous parsing/file I/O on MainActor, outside @concurrent annotation scope.
Cmux Swift File And Package Boundaries ✅ Passed Revert PR removes out-of-process sidebar code. No new oversized files; modified files are small with focused responsibilities or existing files with net line removals. Boundaries respected.
Cmux Swift Logging ✅ Passed Revert PR removes out-of-process sidebar code via deletions/refactors with no new logging violations. Pre-existing NSLog calls are DEBUG-guarded or CLI output.
Cmux User-Facing Error Privacy ✅ Passed All user-facing error messages in the revert commit use generic, localized text and safe JSON path information; no vendor names, credentials, tokens, or sensitive implementation details are exposed.
Cmux Full Internationalization ✅ Passed All user-facing text uses String(localized:) with proper translations; removed localizations include all locales (en+ja); no new strings added without proper coverage.
Cmux Architecture Rethink ✅ Passed Revert removes complex out-of-process architecture. No new violations introduced—only removal of problematic multi-process patterns from the reverted commit.
Cmux Swift Auxiliary Window Close Shortcuts ✅ Passed PR reverts out-of-process sidebar rendering (removes RemoteWorkerWindow, RemoteWorkerRootView, RenderWorkerCoordinator, RunSidebarRenderWorker); only code deletion, no new windows added.
✨ 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 revert-5294-sidebar-isolation

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 and usage tips.

@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​vercel/​firewall@​1.1.2731007694100
Addednpm/​next-themes@​0.4.61001009882100
Addednpm/​tailwindcss@​4.1.181001008498100
Addednpm/​zod@​4.3.610010010095100

View full report

@greptile-apps

greptile-apps Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR reverts #5294 ("Out-of-process custom sidebars") to restore green CI after AppDelegateShortcutRoutingTests failures were traced to a test-host state interaction with the added code. The change removes the entire CmuxSidebarInterpreterService package and out-of-process render-worker infrastructure, and restores the single-process CustomSidebarView/CustomSidebarModel with synchronous in-body rendering.

  • The CmuxSidebarInterpreterService package and all its targets (interpreter client, remote-render layer, worker binaries, and their tests) are deleted; cmuxApp's split @main entry point is collapsed back to a plain struct cmuxApp: App.
  • CustomSidebarModel reverts to a synchronous renderNode(dataContext:) cache path and drops the file-watching FileWatcher; CustomSidebarView re-inlines the presentation logic it previously shared with CustomSidebarContentView and re-applies .id(customSidebarURL) for clean state resets on sidebar switches.
  • Two regressions are introduced: the @Observable parse cache is mutated inside the SwiftUI body, triggering an extra render cycle on every source change; and deleting Packages/CmuxSwiftRenderUI/Resources/Localizable.xcstrings silently drops the Japanese translations for three live user-facing strings in CustomSidebarView.

Confidence Score: 3/5

The revert correctly removes the out-of-process infrastructure, but two issues in the restored code need addressing before the branch is production-ready.

The bulk of the change is a mechanical deletion (~3,000 lines of the out-of-process package) that is correct. Two concrete defects ride along in the restored production code path: mutating @Observable cache properties from inside the SwiftUI body produces runtime warnings and extra render cycles on every sidebar source load or reload, and discarding Localizable.xcstrings without migrating its translations means Japanese users see raw English fallbacks for three error strings displayed on the 1-second TimelineView path.

Packages/CmuxSwiftRenderUI/Sources/CmuxSwiftRenderUI/Sidebar/CustomSidebarModel.swift (cache mutation pattern) and Packages/CmuxSwiftRenderUI/Package.swift plus the deleted Resources/Localizable.xcstrings (missing translation catalog).

Important Files Changed

Filename Overview
Packages/CmuxSwiftRenderUI/Sources/CmuxSwiftRenderUI/Sidebar/CustomSidebarModel.swift Reverted to synchronous renderNode with internal AST cache; cachedSource and cachedProgram lack @ObservationIgnored, causing observation-system notifications when written from the view body.
Packages/CmuxSwiftRenderUI/Sources/CmuxSwiftRenderUI/Sidebar/CustomSidebarView.swift Restored in-process rendering with inline body logic; renderNode mutates @Observable cache properties during body evaluation, triggering SwiftUI observation re-invalidation.
Packages/CmuxSwiftRenderUI/Package.swift Removes defaultLocalization: "en" and the resources: [.process("Resources")] declaration, orphaning the three String(localized:) keys in CustomSidebarView without a catalog bundle.
Packages/CmuxSwiftRenderUI/Sources/CmuxSwiftRenderUI/Resources/Localizable.xcstrings Entire file deleted — removes Japanese translations for sidebar.custom.error, sidebar.custom.missing, and sidebar.custom.noView while the view still references all three keys.
Sources/ContentView.swift Drops RemoteCustomSidebarView in favour of CustomSidebarView, removes the sidebarRenderWorkerClient state, and restores .id(customSidebarURL) for clean view identity resets on sidebar switches.
Sources/cmuxApp.swift Removes the split CmuxMain entry point that dispatched to render-worker or interpreter-worker modes, reverting to a plain struct cmuxApp: App @main entry point.
Packages/CmuxSettingsUI/Sources/CmuxSettingsUI/Sections/BetaFeaturesSection.swift Correctly removes the Custom Sidebars beta toggle row and its associated @State binding.
Resources/Localizable.xcstrings Removes the three settings.betaFeatures.customSidebars* entries (en + ja) matching the removal of the Custom Sidebars UI row — correct clean-up.

Reviews (1): Last reviewed commit: "Revert "Out-of-process custom sidebars: ..." | Re-trigger Greptile

Comment on lines 66 to +77
reload()
startWatcher()
if reloadObserver == nil {
reloadObserver = NotificationCenter.default.addObserver(
forName: .customSidebarReloadRequested,
object: nil,
queue: .main
) { [weak self] notification in
let names = notification.userInfo?["names"] as? [String]
Task { @MainActor [weak self] in
self?.requestReload(names: names)
}
guard reloadObserver == nil else { return }
reloadObserver = NotificationCenter.default.addObserver(
forName: .customSidebarReloadRequested,
object: nil,
queue: .main
) { [weak self] notification in
let names = notification.userInfo?["names"] as? [String]
Task { @MainActor [weak self] in
guard let self else { return }
guard self.matchesReloadRequest(names: names) else { return }
self.reload()

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.

P1 Observable cache mutation during body rendering

renderNode writes to cachedSource and cachedProgram — both plain stored properties on an @Observable class, so the macro wraps their setters with _$observationRegistrar.withMutation. Calling this method from CustomSidebarView.content (which runs during body) causes SwiftUI to schedule a re-invalidation mid-render on the first call for each new source string. In Debug you'll see "Modifying state during view update, this will cause undefined behavior." and in practice the view renders an extra cycle on every source change (initial load and each file reload). Annotating both properties @ObservationIgnored (they are an internal parse cache, not view-driving state) eliminates the spurious signal entirely.

Rule Used: Flag SwiftUI changes that can cause stale state, b... (source)

Comment on lines 4 to 30
@@ -26,9 +25,6 @@ let package = Package(
.product(name: "CmuxSwiftRender", package: "CmuxSwiftRender"),
.product(name: "CmuxSettings", package: "CmuxSettings"),
.product(name: "CmuxFileWatch", package: "CmuxFileWatch"),
],
resources: [
.process("Resources"),
]
),
.testTarget(

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.

P1 Deleted string catalog drops Japanese translations for three live UI strings

defaultLocalization: "en" and resources: [.process("Resources")] are both removed, and Packages/CmuxSwiftRenderUI/Sources/CmuxSwiftRenderUI/Resources/Localizable.xcstrings is deleted entirely. CustomSidebarView still emits String(localized: "sidebar.custom.missing", defaultValue: ...), String(localized: "sidebar.custom.noView", defaultValue: ...), and String(localized: "sidebar.custom.error", defaultValue: ...). Without the catalog bundle, Swift resolves all three to their English defaultValue for every locale — Japanese users who previously saw "サイドバーエラー", "サイドバーファイルが空か見つかりません。", etc. will now see English. The fix is to keep (or restore) Localizable.xcstrings with at minimum the ja entries for these three keys, and reinstate defaultLocalization and the resources target in Package.swift.

Rule Used: Flag production user-facing text that is not fully... (source)

@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/CmuxSwiftRenderUI/Sources/CmuxSwiftRenderUI/Sidebar/CustomSidebarModel.swift`:
- Around line 63-80: start() currently only listens for
.customSidebarReloadRequested and no longer reacts to on-disk edits; restore a
file-change reload trigger by adding a filesystem watcher or a
NotificationCenter observer for file-change events in CustomSidebarModel.start()
that watches the mounted sidebar file(s) and calls reload() (use the existing
matchesReloadRequest(names:) check before reloading). Ensure the new watcher is
stored (analogous to reloadObserver) so it can be removed in stop(), and tie it
to the same logical identity used by TerminalController (or to the file URL(s)
associated with this CustomSidebarModel) so edits on disk trigger reload() just
like selection-based reloads.
- Around line 113-117: The matchesReloadRequest function currently treats nil
and [] the same; change its logic so nil still returns true (reload-all) but an
empty array returns false (no-op) while non-empty arrays check membership;
specifically update the private func matchesReloadRequest(names: [String]?) to
first if names == nil { return true }, then if names!.isEmpty { return false },
then return names!.contains(sidebarName) so that nil vs empty semantics are
preserved for sidebarName matching.
- Around line 29-35: Move all parse-cache mutations out of
CustomSidebarModel.renderNode(dataContext:) so renderNode reads only
cachedProgram; instead, perform parsing and update cachedSource/cachedProgram
inside reload() (or a dedicated lifecycle hook) and ensure reload() is invoked
from start() and from the .customSidebarReloadRequested notification handler
(posted by TerminalController) to refresh the cache; keep
matchesReloadRequest(names:) behavior as-is but ensure reload() only reparses
when source has actually changed relative to cachedSource and that start()
subscribes to the reload notification so external edits trigger reloads.
🪄 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: 5bb91fe1-fa45-42dd-b7de-fa08bd50fa2e

📥 Commits

Reviewing files that changed from the base of the PR and between 56db7a9 and 6c2e51b.

📒 Files selected for processing (58)
  • Packages/CmuxSettingsUI/Sources/CmuxSettingsUI/Navigation/CuratedSettingEntry+Default.swift
  • Packages/CmuxSettingsUI/Sources/CmuxSettingsUI/Sections/BetaFeaturesSection.swift
  • Packages/CmuxSidebarInterpreterService/Package.resolved
  • Packages/CmuxSidebarInterpreterService/Package.swift
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarInterpreterClient/InterpreterClient+ReexecSelf.swift
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarInterpreterClient/InterpreterClient+SidebarInterpreting.swift
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarInterpreterClient/InterpreterClient.swift
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarInterpreterClient/InterpreterRequest.swift
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarInterpreterClient/InterpreterResponse.swift
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarInterpreterClient/LengthPrefixedMessageChannel.swift
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarInterpreterClient/RemoteContextCache.swift
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarInterpreterClient/RenderInterpreterRunner.swift
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarInterpreterClient/RenderPointerEvent.swift
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarInterpreterClient/RenderScene.swift
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarInterpreterClient/RenderSurfaceGeometry.swift
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarInterpreterClient/RenderWorkerClient+ReexecSelf.swift
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarInterpreterClient/RenderWorkerClient.swift
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarInterpreterClient/RenderWorkerEvent.swift
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarInterpreterClient/RenderWorkerInbound.swift
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarInterpreterClient/RenderWorkerOutbound.swift
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarInterpreterClient/SidebarInterpreterWorker.swift
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarRemoteRender/RemoteCustomSidebarView.swift
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarRemoteRender/RemoteHostedLayer.swift
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarRemoteRender/RemoteRenderContext.swift
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarRemoteRender/RemoteSidebarSurfaceView.swift
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarRemoteRender/RemoteWorkerRootView.swift
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarRemoteRender/RemoteWorkerWindow.swift
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarRemoteRender/RenderWorkerCoordinator.swift
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarRemoteRender/RunSidebarRenderWorker.swift
  • Packages/CmuxSidebarInterpreterService/Sources/cmux-sidebar-interpreter/main.swift
  • Packages/CmuxSidebarInterpreterService/Sources/cmux-sidebar-render-fixture/main.swift
  • Packages/CmuxSidebarInterpreterService/Tests/CmuxSidebarInterpreterClientTests/InterpreterClientTests.swift
  • Packages/CmuxSidebarInterpreterService/Tests/CmuxSidebarInterpreterClientTests/InterpreterWorkerLocator.swift
  • Packages/CmuxSidebarInterpreterService/Tests/CmuxSidebarInterpreterClientTests/LengthPrefixedMessageChannelTests.swift
  • Packages/CmuxSidebarInterpreterService/Tests/CmuxSidebarInterpreterClientTests/RenderWorkerClientTests.swift
  • Packages/CmuxSwiftRender/Sources/CmuxSwiftRender/ActionCommand.swift
  • Packages/CmuxSwiftRender/Sources/CmuxSwiftRender/ButtonAction.swift
  • Packages/CmuxSwiftRender/Sources/CmuxSwiftRender/InProcessSidebarInterpreter.swift
  • Packages/CmuxSwiftRender/Sources/CmuxSwiftRender/ModifierArg.swift
  • Packages/CmuxSwiftRender/Sources/CmuxSwiftRender/RenderModifier.swift
  • Packages/CmuxSwiftRender/Sources/CmuxSwiftRender/RenderNode.swift
  • Packages/CmuxSwiftRender/Sources/CmuxSwiftRender/ReorderSpec.swift
  • Packages/CmuxSwiftRender/Sources/CmuxSwiftRender/SidebarInterpreting.swift
  • Packages/CmuxSwiftRender/Sources/CmuxSwiftRender/SwiftValue.swift
  • Packages/CmuxSwiftRenderUI/Package.swift
  • Packages/CmuxSwiftRenderUI/Sources/CmuxSwiftRenderUI/JSON/DSLDocument.swift
  • Packages/CmuxSwiftRenderUI/Sources/CmuxSwiftRenderUI/JSON/DSLSidebarRenderer.swift
  • Packages/CmuxSwiftRenderUI/Sources/CmuxSwiftRenderUI/Rendering/RenderNodeView.swift
  • Packages/CmuxSwiftRenderUI/Sources/CmuxSwiftRenderUI/Rendering/SidebarTapTarget.swift
  • Packages/CmuxSwiftRenderUI/Sources/CmuxSwiftRenderUI/Rendering/SidebarTapTargetsKey.swift
  • Packages/CmuxSwiftRenderUI/Sources/CmuxSwiftRenderUI/Resources/Localizable.xcstrings
  • Packages/CmuxSwiftRenderUI/Sources/CmuxSwiftRenderUI/Sidebar/CustomSidebarContentView.swift
  • Packages/CmuxSwiftRenderUI/Sources/CmuxSwiftRenderUI/Sidebar/CustomSidebarModel.swift
  • Packages/CmuxSwiftRenderUI/Sources/CmuxSwiftRenderUI/Sidebar/CustomSidebarView.swift
  • Resources/Localizable.xcstrings
  • Sources/ContentView.swift
  • Sources/cmuxApp.swift
  • cmux.xcodeproj/project.pbxproj
💤 Files with no reviewable changes (46)
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarInterpreterClient/SidebarInterpreterWorker.swift
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarInterpreterClient/RenderWorkerOutbound.swift
  • Packages/CmuxSwiftRender/Sources/CmuxSwiftRender/InProcessSidebarInterpreter.swift
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarInterpreterClient/InterpreterClient+SidebarInterpreting.swift
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarInterpreterClient/RenderScene.swift
  • Packages/CmuxSidebarInterpreterService/Tests/CmuxSidebarInterpreterClientTests/LengthPrefixedMessageChannelTests.swift
  • Packages/CmuxSidebarInterpreterService/Tests/CmuxSidebarInterpreterClientTests/InterpreterWorkerLocator.swift
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarInterpreterClient/RenderPointerEvent.swift
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarInterpreterClient/InterpreterResponse.swift
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarInterpreterClient/RenderWorkerClient+ReexecSelf.swift
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarInterpreterClient/RenderWorkerEvent.swift
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarRemoteRender/RemoteSidebarSurfaceView.swift
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarInterpreterClient/RemoteContextCache.swift
  • Packages/CmuxSwiftRenderUI/Sources/CmuxSwiftRenderUI/Resources/Localizable.xcstrings
  • Packages/CmuxSwiftRenderUI/Sources/CmuxSwiftRenderUI/Sidebar/CustomSidebarContentView.swift
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarInterpreterClient/InterpreterRequest.swift
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarRemoteRender/RemoteWorkerWindow.swift
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarInterpreterClient/RenderInterpreterRunner.swift
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarRemoteRender/RunSidebarRenderWorker.swift
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarRemoteRender/RemoteWorkerRootView.swift
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarInterpreterClient/InterpreterClient+ReexecSelf.swift
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarInterpreterClient/RenderSurfaceGeometry.swift
  • Packages/CmuxSwiftRenderUI/Sources/CmuxSwiftRenderUI/Rendering/SidebarTapTarget.swift
  • Packages/CmuxSwiftRender/Sources/CmuxSwiftRender/SidebarInterpreting.swift
  • Packages/CmuxSidebarInterpreterService/Tests/CmuxSidebarInterpreterClientTests/InterpreterClientTests.swift
  • Packages/CmuxSidebarInterpreterService/Package.swift
  • Resources/Localizable.xcstrings
  • Packages/CmuxSwiftRenderUI/Sources/CmuxSwiftRenderUI/JSON/DSLSidebarRenderer.swift
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarRemoteRender/RemoteCustomSidebarView.swift
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarRemoteRender/RenderWorkerCoordinator.swift
  • Packages/CmuxSidebarInterpreterService/Sources/cmux-sidebar-render-fixture/main.swift
  • Packages/CmuxSwiftRenderUI/Sources/CmuxSwiftRenderUI/Rendering/SidebarTapTargetsKey.swift
  • Packages/CmuxSidebarInterpreterService/Sources/cmux-sidebar-interpreter/main.swift
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarInterpreterClient/RenderWorkerClient.swift
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarInterpreterClient/RenderWorkerInbound.swift
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarRemoteRender/RemoteHostedLayer.swift
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarInterpreterClient/InterpreterClient.swift
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarRemoteRender/RemoteRenderContext.swift
  • Packages/CmuxSidebarInterpreterService/Package.resolved
  • Packages/CmuxSidebarInterpreterService/Tests/CmuxSidebarInterpreterClientTests/RenderWorkerClientTests.swift
  • Packages/CmuxSettingsUI/Sources/CmuxSettingsUI/Navigation/CuratedSettingEntry+Default.swift
  • Packages/CmuxSwiftRenderUI/Package.swift
  • Sources/cmuxApp.swift
  • Packages/CmuxSwiftRenderUI/Sources/CmuxSwiftRenderUI/Rendering/RenderNodeView.swift
  • Packages/CmuxSidebarInterpreterService/Sources/CmuxSidebarInterpreterClient/LengthPrefixedMessageChannel.swift
  • cmux.xcodeproj/project.pbxproj

@azooz2003-bit

Copy link
Copy Markdown
Collaborator Author

@coderabbitai resolve

This is an urgent straight revert to restore a green tests job on main (red exactly since the reverted commit; green again on this PR's run — #5367). The reverted feature will be re-landed with the findings addressed once the test interaction is root-caused; review feedback on the feature content belongs on the re-land PR.

@coderabbitai

coderabbitai Bot commented Jun 4, 2026

Copy link
Copy Markdown

@azooz2003-bit Understood — this is a clean revert with a clear CI signal, and the right call to restore main to green. I'll resolve all outstanding review comments now. Review feedback on the feature itself can be addressed on the re-land PR once the test interaction from #5367 is root-caused.

🐇 🟢


🧠 Learnings used
Learnt from: gaelic-ghost
Repo: manaflow-ai/cmux PR: 1771
File: Sources/Workspace.swift:8516-8558
Timestamp: 2026-03-18T16:46:47.403Z
Learning: Repo manaflow-ai/cmux — Preference: keep lower-confidence geometry/focus/portal behavior changes out of stabilization checkpoints; evaluate them in a separate, narrowly scoped follow-up PR with DEBUG-gated toggles and diagnostics.

Learnt from: lawrencecchen
Repo: manaflow-ai/cmux PR: 5331
File: plans/feat-codex-surface-jumble/DESIGN.md:5-5
Timestamp: 2026-06-04T03:11:34.075Z
Learning: Repo: manaflow-ai/cmux — Design documents (e.g., root-cause analyses, fix plans, DESIGN.md files) belong in the control repo, not the cmux source tree. Do not flag or review design/planning markdown files (e.g., under plans/) placed in the cmux repo, as they are expected to be removed before merge and live permanently in the control repo.

Learnt from: austinywang
Repo: manaflow-ai/cmux PR: 3568
File: GhosttyTabs.xcodeproj/project.pbxproj:1588-1590
Timestamp: 2026-05-05T20:41:12.478Z
Learning: In the manaflow-ai/cmux repository, the SwiftPM package-boundary extraction of `JSONCValueEditor.swift` and `CmuxSettingsManagedValues.swift` into a dedicated Foundation-only package is intentionally deferred to a separate refactor PR. For the regression/fix PR (issue `#3551`, PR `#3568`), these files are scoped to the app target and covered by behavioral CI tests. Do not flag this as an unresolved issue within the context of that PR.

Learnt from: mrosnerr
Repo: manaflow-ai/cmux PR: 0
File: :0-0
Timestamp: 2026-04-28T22:24:18.018Z
Learning: Repo: manaflow-ai/cmux — In Sources/GhosttyTerminalView.swift (PR `#3237`, commit 9dcb9c2), the explicit-vs-baseConfig.initialInput resolution logic was extracted from `TerminalSurface.createSurface(for:)` into a standalone `TerminalSurface.resolveInitialInput(...)` static/instance method for unit-testability. Behavior is unchanged. A companion `TerminalSurfaceResolveInitialInputTests` suite asserts the contract, including byte-for-byte preservation of Ghostty raw-bytes startup-input via `baseConfig.initialInput`.

Learnt from: gaelic-ghost
Repo: manaflow-ai/cmux PR: 1926
File: scripts/build-sign-upload.sh:8-10
Timestamp: 2026-03-22T00:14:23.473Z
Learning: Repo: manaflow-ai/cmux — `scripts/lib/cmux-paths.sh` `cmux_paths_init()` intentionally preserves any pre-set `CMUX_*` environment variable overrides verbatim (does not canonicalize relative paths to absolute). This is a deliberate Stage 1 design choice; do not flag relative-override canonicalization as a bug unless a concrete reproducer is provided or a later stage explicitly tightens the override-semantics contract.

Learnt from: lejahmie
Repo: manaflow-ai/cmux PR: 2371
File: cmuxTests/CJKIMEInputTests.swift:1325-1335
Timestamp: 2026-03-31T10:56:43.241Z
Learning: Repo: manaflow-ai/cmux — In `cmuxTests/CJKIMEInputTests.swift`, `GhosttyOptionDeleteRegressionTests.testRightOptionLiteralCharacterSetsAltRightInRawModsFallbackPath` intentionally omits `consumed_mods & GHOSTTY_MODS_ALT_RIGHT` assertions. That test simulates the fallback path (no `NX_DEVICERALTKEYMASK` bit in event flags; right-side state injected via `debugSetRightOptionModifierDownForUITest(true)`), where `consumed_mods` depends on translation-mod flags and is unstable in synthetic test contexts. Only `mods & (ALT | ALT_RIGHT)` is asserted here. The `consumed_mods` coverage is provided by the deterministic `testRightOptionDeleteSetsAltRightModifier` test, which uses the direct `NX_DEVICERALTKEYMASK` modifier flag path.

Learnt from: lawrencecchen
Repo: manaflow-ai/cmux PR: 3629
File: Sources/TerminalController.swift:8094-8105
Timestamp: 2026-05-06T10:19:25.289Z
Learning: Repo: manaflow-ai/cmux — Guideline: Workstream event payloads must be allowlisted and redact sensitive fields before any persistence or streaming. Specifically, redact tool_input, context, and extra fields prior to emitting via events.stream or writing to ~/.cmuxterm/events.jsonl. Implementations touch TerminalController.v2FeedPush, CmuxEventBus.publishWorkstreamEvent, and related encoding paths (e.g., FeedSocketEncoding). Tests should verify that sensitive strings do not appear in encoded event payloads.

Learnt from: lawrencecchen
Repo: manaflow-ai/cmux PR: 3247
File: Sources/ContentView.swift:0-0
Timestamp: 2026-04-29T01:08:44.497Z
Learning: Repo: manaflow-ai/cmux — Behavior contract: Sidebar “Copy Workspace ID(s)” (e.g., in Sources/ContentView.swift TabItemView context menu) must copy plain UUIDs (IDs-only), not refs. Command palette identifier-copy commands should explicitly pass includeRefs: true when refs are desired. This split preserves backward compatibility for scripts while enabling richer payloads in the palette.

Learnt from: anthhub
Repo: manaflow-ai/cmux PR: 2239
File: CLI/cmux.swift:0-0
Timestamp: 2026-04-27T06:49:12.578Z
Learning: Repo: manaflow-ai/cmux — In CLI/cmux.swift (CMUXCLI.runClaudeHook stop/idle), workspace resolution uses selective do/catch and early-returns "OK" only on teardown-ignored errors; surface resolution failure no longer aborts the handler; setClaudeStatus(..., "Idle", ...) is always attempted after resolution; notification and session upsert only run when completion and surfaceId are present; teardown errors are filtered by shouldIgnoreClaudeHookTeardownError(_:) for graceful shutdown.

Learnt from: austinywang
Repo: manaflow-ai/cmux PR: 3812
File: Sources/TerminalLocation.swift:4-212
Timestamp: 2026-05-11T22:24:17.605Z
Learning: In manaflow-ai/cmux, TerminalLocation.swift intentionally lives under Sources/ (the app-target root) rather than a scoped feature folder. A relocation was explicitly deferred (PR `#3812`) because it is a pure organizational refactor with Xcode target-membership churn and no behavior change. Do not re-flag TerminalLocation's placement in the Sources/ root in future reviews; a file move should be tracked separately, not as a PR-blocking suggestion.

Learnt from: mrosnerr
Repo: manaflow-ai/cmux PR: 0
File: :0-0
Timestamp: 2026-04-05T21:26:10.710Z
Learning: Repo: manaflow-ai/cmux — In Sources/Workspace.swift, applySessionPanelMetadata() must gate listeningPorts restoration on the per-panel snapshot.terminal?.isRemoteBacked flag (not workspace-wide remoteTerminalStartupCommand()), so that local panels are always eligible for port restore regardless of current SSH state. Fixed in commit 4d0fd871 (PR `#2545`).

Learnt from: azooz2003-bit
Repo: manaflow-ai/cmux PR: 0
File: :0-0
Timestamp: 2026-06-04T18:12:29.836Z
Learning: Repo: manaflow-ai/cmux — `CustomSidebarModel.reload()` performs synchronous local file I/O on `MainActor`. In the shipping configuration introduced by PR `#5294` (and the reload shape established in PR `#5327`), this runs inside the faceless sidebar render worker process (`--cmux-sidebar-render-worker`), where `MainActor` is the worker's own main run loop rather than the host app's UI thread. Sidebar files are KB-scale local reads. Do not flag this as a host-UI blocking I/O concern unless the execution context changes (e.g., reload path re-enters the host app process) or sidebar files grow to a size where the latency would be perceptible.

Learnt from: lawrencecchen
Repo: manaflow-ai/cmux PR: 0
File: :0-0
Timestamp: 2026-05-05T07:01:16.438Z
Learning: In the cmux macOS project (manaflow-ai/cmux), a deferred/async resync approach for portal geometry (terminal and browser portals) after sidebar visibility toggles was tested and explicitly reverted because it could leave the right sidebar path stale until a later command. The correct fix uses state-owned visibility revisions plus an immediate terminal-host geometry sync request (via `synchronizeExternalGeometryNow(for:)`) for the next layout pass in `synchronizePortalGeometry(immediately:)` in ContentView.swift.

Learnt from: lawrencecchen
Repo: manaflow-ai/cmux PR: 3179
File: Sources/ContentView.swift:4005-4021
Timestamp: 2026-04-27T11:59:15.622Z
Learning: Repo: manaflow-ai/cmux — PR `#3179` — Sources/ContentView.swift
Learning: For separate-surface transparent windows, installNativeTitlebarBackdrop intentionally inserts NativeTitlebarBackdropView below contentView (NSHostingView) — positioned .below relativeTo: contentView — so the backdrop fills through transparent hosting without tinting SwiftUI titlebar text/buttons. The titlebar‑chrome ancestor fallback is only for edge cases where contentView isn’t directly under the NSThemeFrame. This layering was pixel‑verified in PR `#3179`; do not “fix” it to sit below the titlebar chrome on this path.

Learnt from: lawrencecchen
Repo: manaflow-ai/cmux PR: 3244
File: Sources/WindowDecorationsController.swift:71-73
Timestamp: 2026-04-29T06:24:53.283Z
Learning: Repo: manaflow-ai/cmux — Sources/WindowDecorationsController.swift — `trafficLightOffset(for:)` returned `.zero` for all non-settings windows on `main`; the only non-zero offset was for `cmux.settings` (nudge right/down to align with the custom Settings title row). PR `#3244` intentionally removes that offset because Settings now uses a SwiftUI WindowGroup with a native macOS system titlebar, making the nudge unnecessary. Do not flag `trafficLightOffset(for:)` always returning `.zero` as a regression.

Learnt from: tayl0r
Repo: manaflow-ai/cmux PR: 0
File: :0-0
Timestamp: 2026-04-08T03:36:30.160Z
Learning: Repo: manaflow-ai/cmux — AppDelegate.FileBrowserDrawerState threading pattern (PR `#1909`, commit e0e57809): FileBrowserDrawerState must be threaded through AppDelegate.configure() as a weak stored property (matching the sidebarState pattern), passed through both configure() call sites, with registerMainWindow parameter made non-optional. The fallback `?? FileBrowserDrawerState()` must NOT be used as it creates detached instances that are not properly owned by the window context.

Learnt from: mrosnerr
Repo: manaflow-ai/cmux PR: 0
File: :0-0
Timestamp: 2026-04-28T22:24:18.018Z
Learning: Repo: manaflow-ai/cmux — In Sources/Workspace.swift (PR `#3237`, commit 9dcb9c2), the `newTerminalSurface(...)` method gained an `allowInitialInputWithRemoteStartupCommand: Bool` parameter (default `false`). The session-restore call site in `createPanel(from:inPane:)` passes `true` only when `!panelWasRemoteBacked && combinedInitialInput != nil`, making the per-panel snapshot flag the sole authority for restore-time `initialInput` injection. All 12 other call sites keep `false`, preserving the existing remote-drop defense.

Learnt from: austinywang
Repo: manaflow-ai/cmux PR: 4825
File: Sources/AppDelegate.swift:921-948
Timestamp: 2026-05-26T21:44:44.637Z
Learning: In manaflow-ai/cmux PRs that make targeted fixes to AppDelegate-owned session restore, main-window registry, autosave, or display/window geometry behavior, do not insist on extracting new helper/cache logic from Sources/AppDelegate.swift when doing so would broaden the PR into an ownership refactor. It is acceptable to keep narrowly scoped geometry-cache changes in AppDelegate for a targeted bug fix if the implementation tightens boundaries with typed transition sources and guarded update paths; suggest extraction only as an optional follow-up.

Learnt from: rodchristiansen
Repo: manaflow-ai/cmux PR: 2647
File: Sources/ContentView.swift:2918-2932
Timestamp: 2026-04-14T20:05:27.511Z
Learning: Repo: manaflow-ai/cmux — Sources/ContentView.swift (PR `#2647`): On macOS 26, NavigationSplitView provides a native collapse chevron in the sidebar column header when the sidebar is visible. The code intentionally: (1) shows a custom toolbar toggle only when the sidebar is hidden to reopen it, and (2) uses SystemSidebarToggleStripper to remove the system-injected toolbar toggle to prevent duplication. Do not flag “no collapse affordance” while the sidebar is open.
✅ Action performed

Comments resolved and changes approved.

This branch was successfully deployed

1 active deployment
Preview – cmux — 6c2e51b6 Deployed Jun 4, 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.

1 participant