Repository navigation
Allow terminal links to open browser tabs in the same pane #12806
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
austinywang
wants to merge
113
commits into
main
Choose a base branch
from
issue-12798-terminal-links-same
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,764
−326
Open
Changes from 5 commits
Commits
Show all changes
113 commits
Select commit
Hold shift + click to select a range
c3dea30
test: cover terminal links opening in their source pane
austinywang 7b6fa66
feat: configure terminal browser links to open in the same pane
austinywang e4eb592
fix: compose browser settings search entries with explicit types
austinywang 877c1b6
test: unblock app-host test compilation after cloud ownership refactor
austinywang edceecf
fix: normalize terminal source aliases before browser placement
austinywang 40e4bb3
test: assert invalid terminal link placement resets to split
austinywang 4fef148
test: verify effective placement default and wrapper source propagation
austinywang 1e38656
test: verify terminal link clicks and open commands in running app
austinywang ee6b4dc
Merge remote-tracking branch 'origin/main' into issue-12798-terminal-…
austinywang 459311a
test: wait for the tagged socket in terminal-link UI verification
austinywang e955d0e
docs: translate terminal link placement across all web locales
austinywang ba473c0
test: discover tag-scoped socket for terminal-link UI checks
austinywang 6c6e083
test: include app-reported socket path in UI readiness
austinywang b1b1606
test: reuse native browser UI socket transport for terminal links
austinywang 80f553f
test: await wrapper output and clarify Korean pane terminology
austinywang f8151ef
test: validate v2 socket readiness with transport diagnostics
austinywang 7f50fc5
Merge remote-tracking branch 'origin/main' into issue-12798-terminal-…
austinywang 45c72cd
Merge remote-tracking branch 'origin/main' into issue-12798-terminal-…
austinywang 4022251
fix: finish main merge for terminal link focus routing
austinywang 2991020
chore: normalize project after upstream merge
austinywang e679ec7
fix: close terminal link placement review gaps
austinywang 8c6e28f
test: verify placement through Settings and background opens
austinywang 94ee5dd
test: keep placement socket inside the UI runner sandbox
austinywang 6dd72ac
Merge origin/main into issue-12798-terminal-links-same
austinywang f7eed2a
test: stabilize placement UI and background coverage
austinywang 5ffbf61
fix: preserve background browser visibility
austinywang b8ea88a
test: assert background browser visibility
austinywang 0e1c5d8
test: drive placement through a one-shot terminal fixture
austinywang cefa9a0
Merge remote-tracking branch 'origin/main' into issue-12798-terminal-…
austinywang b8d74fb
Merge latest origin/main and preserve terminal link settings
austinywang d05ffa9
test: query live browser tabs and scope the placement menu
austinywang e05f6cc
test: keep failure diagnostics nonthrowing
austinywang e333b05
test: resolve visible placement options across menu scopes
austinywang 6a3e6c1
build: import process identity after the main merge
austinywang 6e153e2
Merge remote-tracking branch 'origin/main' into issue-12798-terminal-…
austinywang 30dee74
build: complete process identity imports from main
austinywang dd67deb
Merge remote-tracking branch 'origin/main' into issue-12798-terminal-…
austinywang d4be7cb
Merge origin/main and preserve terminal link placement translations
austinywang d9c7970
docs: include terminal link placement in settings skill keys
austinywang 7bdb671
Merge origin/main with CI admission and tmux test updates
austinywang faf0f87
Merge remote-tracking branch 'origin/main' into issue-12798-terminal-…
austinywang b3e1f74
Merge remote-tracking branch 'origin/main' into issue-12798-terminal-…
austinywang 0ba151c
Merge remote-tracking branch 'origin/main' into issue-12798-terminal-…
austinywang 0d25f33
Merge remote-tracking branch 'origin/main' into issue-12798-terminal-…
austinywang e7f2505
Merge remote-tracking branch 'origin/main' into issue-12798-terminal-…
austinywang 6c2f298
Merge remote-tracking branch 'origin/main' into issue-12798-terminal-…
austinywang bfb5fe2
fix: opt browser link value utilities out of actor isolation
austinywang 477caf0
Merge remote-tracking branch 'origin/main' into issue-12798-terminal-…
austinywang 7d9feb8
Merge origin/main and reconcile terminal link placement with new rout…
austinywang 2f41151
fix: import browser policy in extracted settings parser
austinywang 076e681
Merge main (f8079082fc46) into issue-12798-terminal-links-same
austinywang 1ef8360
Merge main (214448aa4164) into issue-12798-terminal-links-same
austinywang 2fe2c8e
test: avoid selection dismissal in notification harness
austinywang 777f5a8
test: use accessible sockets for browser fixtures
austinywang 414cdc2
Merge main (a49afca4a08f) into issue-12798-terminal-links-same
austinywang eb55f9d
Merge main (528c5a870dc2) into issue-12798-terminal-links-same
austinywang 7d4d4bc
test: escape nested iframe fixture scripts
austinywang e967da7
Merge main (454f1913afc3) into issue-12798-terminal-links-same
austinywang f9e9a8a
Merge main into terminal link placement branch
austinywang 0bbb51d
Merge main (31b261992edd) into issue-12798-terminal-links-same
austinywang 27c0677
Merge main (1a7467a295c0) into issue-12798-terminal-links-same
austinywang a05c72a
test(ci): make scratch pruning age regression deterministic
austinywang e7343db
fix(ci): rank SwiftPM scratch by build file timestamps
austinywang 1480d0f
Merge main and keep upstream SwiftPM cache policy
austinywang 9389bdc
Merge main (7b0a15f9e424) into issue-12798-terminal-links-same
austinywang f3e6986
Merge main (64a1765fcc7a) into issue-12798-terminal-links-same
austinywang 88ad636
fix(tests): adapt local link fixture to browser placement API
austinywang 388b247
Merge remote-tracking branch 'origin/main' into issue-12798-terminal-…
austinywang 375ae88
Merge main (5cfc6a669255) into issue-12798-terminal-links-same
austinywang 6fd2ff0
fix: preserve main localization ordering after catch-up
austinywang 1bb59d7
Merge main (d87c3be1c054) into issue-12798-terminal-links-same
austinywang d5a0284
Merge main (6d2b5d116dc4) into issue-12798-terminal-links-same
austinywang 6033e63
fix: preserve main localization ordering after latest catch-up
austinywang b3c344b
fix: preserve sizing submodule revisions across main merge
austinywang 74bd89d
Merge main (af7e3274d327) into issue-12798-terminal-links-same
austinywang 7397564
fix: preserve localization catalog bytes after catch-up
austinywang c5764a2
test: account for main's initial dock pane in placement UI
austinywang 99c6399
submodule-forward-only: allow ghostty
austinywang f77248f
test: isolate browser placement UI preferences from the runner
austinywang d54c3a1
Merge remote-tracking branch 'origin/main' into issue-12798-terminal-…
austinywang 2305835
fix: advance submodules with main
austinywang 239a747
Merge remote-tracking branch 'origin/main' into issue-12798-terminal-…
austinywang d17a82d
Merge main (71bb553867ca) into issue-12798-terminal-links-same
austinywang e3803f0
fix: pass temporary config state to auto naming overrides
austinywang f4c44a9
fix: keep OpenCode config path resolution in CLI target
austinywang 1e829f2
test: keep close-tab queue helper compatible with main
austinywang 40672ae
submodule-forward-only: allow vendor/bonsplit
austinywang ce658d7
fix: merge Bonsplit main baseline with sizing fixes
austinywang 05bb183
fix: merge Ghostty main baseline with terminal fixes
austinywang 1a76121
fix: align submodule pointers with main for mergeability
austinywang e43c0d8
chore: refresh PR merge state
austinywang dbf360b
Merge main synchronization
austinywang ed8df8b
Merge main synchronization
austinywang b0ff5bf
Merge commit '4e9d779888279b178a98c492b6efb350a459649c' into issue-12…
austinywang 86f6b6f
fix: repair inherited test and catalog regressions
austinywang 675e207
fix: use Bonsplit rendering test fix from main
austinywang eb750c9
fix: repair inherited package test fixtures
austinywang bb881bf
Merge main (039832207a63) into issue-12798-terminal-links-same
austinywang f9286e4
test: restore pane resize controller binding
austinywang 34c6109
Merge main (90e1689ffc9d) into issue-12798-terminal-links-same
austinywang 034d21f
fix: preserve main catalog after final catch-up
austinywang 914daee
test: avoid blocking main actor queue drain
austinywang 6ae230b
test: avoid CLI test alias collision
austinywang 0d9b2b0
Merge branch 'main' of https://github.com/manaflow-ai/cmux into issue…
austinywang 6c1520e
fix: share VM poll policy with app tests
austinywang 4188494
test: keep reconcile budget assertions compilable
austinywang aadd5af
Merge origin/main into issue-12798-terminal-links-same
austinywang 90e28b6
test: keep VM transfer fixture within budget
austinywang f6b1776
fix: use environment accent in notification rows
austinywang bba5182
fix: use environment accent in titlebar notifications
austinywang a3c1b10
Merge origin/main into issue-12798-terminal-links-same
austinywang 6114146
Merge branch 'main' of https://github.com/manaflow-ai/cmux into issue…
austinywang f6fc1b1
chore: refresh PR mergeability after main catch-up
austinywang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| import Foundation | ||
|
|
||
| /// Origin information supplied by the terminal `open` wrapper. | ||
| struct BrowserOpenEnvironment { | ||
| let environment: [String: String] | ||
|
|
||
| var isTerminalLink: Bool { environment["CMUX_TERMINAL_LINK"] == "1" } | ||
| var sourceSurfaceID: String? { environment["CMUX_SURFACE_ID"] } | ||
| var respectsExternalOpenRules: Bool { | ||
| guard let raw = environment["CMUX_RESPECT_EXTERNAL_OPEN_RULES"] else { return false } | ||
| return ["1", "true", "yes", "on"].contains(raw.trimmingCharacters(in: .whitespacesAndNewlines).lowercased()) | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
Packages/macOS/CmuxSettings/Sources/CmuxSettings/Values/TerminalLinkBrowserPlacement.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| /// Placement of browser tabs opened by terminal links or intercepted `open` commands. | ||
| public enum TerminalLinkBrowserPlacement: String, CaseIterable, Sendable, SettingCodable { | ||
| /// Reuse a pane to the right, or create a right split when none exists. | ||
| case split | ||
| /// Create a browser tab in the pane containing the source terminal. | ||
| case samePane | ||
| } |
36 changes: 36 additions & 0 deletions
36
.../macOS/CmuxSettingsUI/Sources/CmuxSettingsUI/Navigation/CuratedSettingEntry+Browser.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| import Foundation | ||
|
|
||
| extension CuratedSettingEntry { | ||
| static var browserEntries: [CuratedSettingEntry] { | ||
| [ | ||
| // Browser | ||
| .init(section: .browser, id: "enable-browser", title: String(localized: "settings.browser.enabled", defaultValue: "Enable cmux Browser"), synonyms: "Enable cmux Browser browser.disabled enable disable webview embedded browser tabs links"), | ||
| .init(section: .browser, id: "search-engine", title: String(localized: "settings.browser.searchEngine", defaultValue: "Default Search Engine"), synonyms: "Default Search Engine browser.defaultSearchEngine omnibar address bar google duckduckgo bing kagi brave startpage perplexity exa yahoo ecosia qwant mojeek wikipedia github baidu yandex custom search provider engine name url template"), | ||
| .init(section: .browser, id: "search-suggestions", title: String(localized: "settings.browser.searchSuggestions", defaultValue: "Show Search Suggestions"), synonyms: "Show Search Suggestions browser.showSearchSuggestions suggest autocomplete address bar search suggestions"), | ||
| .init(section: .browser, id: "theme", title: String(localized: "settings.browser.theme", defaultValue: "Browser Theme"), synonyms: "Browser Theme browser.theme web page theme color scheme light dark system"), | ||
| .init(section: .browser, id: "hidden-webview-discard", title: String(localized: "settings.browser.hiddenWebViewDiscard", defaultValue: "Browser Memory Saver"), synonyms: "Browser Memory Saver browser.discardHiddenWebViews memory hidden tabs webview discard unload reclaim"), | ||
| .init(section: .browser, id: "hidden-webview-discard-delay", title: String(localized: "settings.browser.hiddenWebViewDiscardDelay", defaultValue: "Memory Saver Delay"), synonyms: "Memory Saver Delay browser.hiddenWebViewDiscardDelaySeconds memory hidden tabs delay seconds discard unload"), | ||
| .init( | ||
| section: .browser, | ||
| id: "ask-where-to-save-downloads", | ||
| title: String(localized: "settings.browser.askWhereToSaveDownloads", defaultValue: "Ask Where to Save Downloads"), | ||
| detailText: String(localized: "settings.browser.askWhereToSaveDownloads.subtitle", defaultValue: "When off, browser downloads save directly to Downloads without a save panel."), | ||
| synonyms: String(localized: "settings.search.alias.setting.browser.ask-where-to-save-downloads", defaultValue: "browser.askWhereToSaveDownloads downloads save panel folder attachments files pdf gmail") | ||
| ), | ||
| .init(section: .browser, id: "terminal-links", title: String(localized: "settings.browser.openTerminalLinks", defaultValue: "Open Terminal Links in cmux Browser"), synonyms: "Open Terminal Links in cmux Browser browser.openTerminalLinksInCmuxBrowser click url terminal links open in browser href"), | ||
| .init(section: .browser, id: "intercept-open", title: String(localized: "settings.browser.interceptOpen", defaultValue: "Intercept open http(s) in Terminal"), synonyms: "Intercept open http(s) in Terminal browser.interceptTerminalOpenCommandInCmuxBrowser open command http https url terminal intercept"), | ||
| .init(section: .browser, id: "host-whitelist", title: String(localized: "settings.browser.hostWhitelist", defaultValue: "Hosts to Open in Embedded Browser"), synonyms: "Hosts to Open in Embedded Browser browser.hostsToOpenInEmbeddedBrowser allowlist whitelist host wildcard domain embedded browser"), | ||
| .init(section: .browser, id: "external-patterns", title: String(localized: "settings.browser.externalPatterns", defaultValue: "URLs to Always Open Externally"), synonyms: "URLs to Always Open Externally browser.urlsToAlwaysOpenExternally denylist blocklist regex rules external default browser"), | ||
| .init(section: .browser, id: "http-allowlist", title: String(localized: "settings.browser.httpAllowlist", defaultValue: "HTTP Hosts Allowed in Embedded Browser"), synonyms: "HTTP Hosts Allowed in Embedded Browser browser.insecureHttpHostsAllowedInEmbeddedBrowser insecure http allowlist localhost localtest non-https warning"), | ||
| .init( | ||
| section: .browser, | ||
| id: "url-allowlist", | ||
| title: String(localized: "settings.browser.urlAllowlist", defaultValue: "Embedded Browser URL Allowlist"), | ||
| synonyms: String(localized: "settings.search.alias.setting.browser.url-allowlist", defaultValue: "browser.urlAllowlist URL allowlist localhost wildcard scheme port organization policy") | ||
| ), | ||
| .init(section: .browser, id: "react-grab", title: String(localized: "settings.browser.reactGrabVersion", defaultValue: "React Grab Version"), synonyms: "React Grab Version browser.reactGrabVersion react grab npm version toolbar cmd-shift-g inspect component"), | ||
| .init(section: .browser, id: "history", title: String(localized: "settings.browser.history", defaultValue: "Browsing History"), synonyms: "Browsing History browsing history clear visited pages omnibar suggestions delete"), | ||
| .init(section: .browser, id: "terminal-link-placement", title: String(localized: "settings.browser.terminalLinkPlacement", defaultValue: "Terminal Link Placement"), paths: ["browser.terminalLinkBrowserPlacement"], synonyms: String(localized: "settings.browser.terminalLinkPlacement.search", defaultValue: "terminal link browser placement same pane tab split open URL")), | ||
|
austinywang marked this conversation as resolved.
Resolved
|
||
| ] | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.