Repository navigation
Render Command-clicked HTML files in browser panes - #9096
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (11)
📝 WalkthroughWalkthroughHTML and HTM local files now route through the cmux browser with deferred container handling, configurable defaults, and fallback behavior. Browser user-agent handling now exposes explicit destination states. Mobile demand recovery retains its session during grace-period processing. ChangesHTML routing
Browser user-agent policy
Mobile demand recovery
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant TerminalLinkOpenCoordinator
participant TerminalHTMLFileBrowserAction
participant TerminalLinkOpenContainer
participant BrowserPanel
TerminalLinkOpenCoordinator->>TerminalHTMLFileBrowserAction: validate HTML file URL
TerminalLinkOpenCoordinator->>TerminalLinkOpenContainer: defer browser opening
TerminalLinkOpenContainer->>TerminalHTMLFileBrowserAction: open normalized browser URL
TerminalHTMLFileBrowserAction->>BrowserPanel: open terminal browser link
Possibly related PRs
🚥 Pre-merge checks | ✅ 24 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (24 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
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 `@cmuxTests/TerminalLinkOpenCoordinatorTests.swift`:
- Around line 185-201: Thread an injectable defaults parameter through
CommandClickFileOpenRouter.shouldRouteInCmux and openInCmux, replacing their
hardcoded FileRouteSettingsStore(defaults: .standard) and
TerminalHTMLFileBrowserAction() dependencies. Update
withStandardHTMLRoutingEnabled and dockHTMLPathOpensInBrowser to use the
isolated makeDefaults() suite, while preserving the existing routing behavior.
🪄 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 Plus
Run ID: 7002d762-7889-41e1-814f-1035a7e9776d
📒 Files selected for processing (5)
Sources/CommandClickFileOpenRouter.swiftSources/TerminalHTMLFileBrowserAction.swiftSources/TerminalLinkOpenCoordinator.swiftcmux.xcodeproj/project.pbxprojcmuxTests/TerminalLinkOpenCoordinatorTests.swift
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
|
CodeRabbit localization pre-merge finding disposition: no fix is needed. This PR does not modify |
|
@codex review |
@austinywang I can't start this review because your workspace has reached its free monthly review limit. cubic has reviewed 241,631 of the 240,000 allowed lines of code this month. Reviews resume on 1 August 2026 (in 3 days). Paid plans include much higher monthly review limits. Upgrade now to resume reviews. To help optimise your usage, you can tune cubic to get the most out of your usage limits:
|
|
✅ Action performedReview finished.
|
|
To use Codex here, create a Codex account and connect to github. |
1 similar comment
|
To use Codex here, create a Codex account and connect to github. |
|
Latest HEAD includes isolated CI-unblock commit Please review the full latest-commit diff: |
|
To use Codex here, create a Codex account and connect to github. |
@austinywang I can't start this review because your workspace has reached its free monthly review limit. cubic has reviewed 241,631 of the 240,000 allowed lines of code this month. Reviews resume on 1 August 2026 (in 3 days). Paid plans include much higher monthly review limits. Upgrade now to resume reviews. To help optimise your usage, you can tune cubic to get the most out of your usage limits:
|
|
To use Codex here, create a Codex account and connect to github. |
|
✅ Action performedFull review finished. |
|
CodeRabbit out-of-scope warning disposition: both auxiliary changes are required to complete and validate #8627, and they are isolated in separate commits. The browser user-agent policy change is part of the runtime root cause: after HTML routing correctly opened |
Summary
.htmland.htmfiles to the existing cmux Browser pane instead ofFilePreviewPanel, across visible-path and GhosttyOPEN_URLrouting in Workspace and Dock containers.BrowserPanelfile-loading path, which usesloadFileURL(_:allowingReadAccessTo:)with the containing directory so sibling page assets work.file://navigation clears stale custom identity without entering a cancel/replay loop.Why: command-clicked agent-generated HTML was shown as raw source, and the first runtime build exposed a separate WebKit user-agent replay loop that left the Browser pane blank.
Regression coverage
147d96f417: failing behavior tests for.html/.htmvisible-path routing and Dock terminal-link routing.fb56973857and1c848d8311: failing WebKit/package policy tests proving non-web destinations must be distinct from WebKit-default HTTP(S) identity.74b1dd9faf: explicit policy resolution fix; local files clear custom identity without requesting navigation restart.Testing
swift test --package-path Packages/macOS/CmuxBrowser— 251 tests passed.xcrun swiftc -frontend -parseon every changed Swift file — passed../scripts/lint-pbxproj-test-wiring.sh— passed (625 test files checked).git diff --check— passed.30432310065passed, including all app-host shards, package tests, warning-budget/build-and-lag coverage, and the universal Release build.30435672942passed at0c2c39703a.Final tagged-app verification completed at
0c2c39703ausing the production Command-click harness through the tag-bound socket./tmp/test.htmlopened asfile:///tmp/test.htmlin a Browser panel (no FilePreview or Markdown panel), renderedhelloandrendered, and computed the paragraph asrgb(0, 128, 0). A second local page loaded sibling CSS and JavaScript from its containing directory, and the debug log showed onefile:policy decision followed byallowwith no cancel/replay loop.Demo Video
Review Trigger (Copy/Paste as PR comment)
Checklist
Closes #8627
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Open command‑clicked and terminal‑linked
.html/.htmfiles in the in‑app browser pane across Workspace and Dock, with deferral and safe fallbacks. Also formalizes non‑web user‑agent policy so local files clear custom identity without restarting, and fixes an RPC session capture bug, fulfilling #8627.New Features
.html/.htmto the Browser from command‑click and terminal links via TerminalHTMLFileBrowserAction, with injectable UserDefaults, deferral when containers aren’t ready, and fallback to file preview or external; keep BrowserPanel’s local asset loading path.CmuxBrowser: non‑web destinations are not applicable and clear the custom identity without a restart; Google Sheets uses WebKit’s default identity. Tests cover visible‑path and Dock routing and these policy outcomes.Bug Fixes
CmuxMobileRPC, capture the MobileCoreRPCSession actor immutably during queued write recovery to prevent dropped work.Written for commit 0c2c397. Summary will update on new commits.
Summary by CodeRabbit
.html/.htmterminal links now open in a Browser panel (including docked layouts) when enabled in settings.