Repository navigation
open_file_editor deep link cannot target a tab other than the active one #16695
Description
Pre-submit Checks
- I have searched Warp feature requests and there are no duplicates
- I have searched Warp docs and my feature is not there
Describe the solution you'd like?
warp://action/open_file_editor opens the file in whichever tab is active when Warp handles the URI. If I switch tabs after requesting the panel and before it opens, the file opens in the wrong tab. I want it to open in the tab that originated the request: the tab containing the terminal session whose shell ran the command.
Add an optional session query parameter so the caller can name that tab:
warp://action/open_file_editor?path=/abs/path/file.md&session=<session-uuid-hex>
Proposed behavior:
- The file opens in the tab that contains the terminal session with that UUID. The existing
code.editor.open_file_layoutsetting (split pane or new tab) applies relative to that tab. - Warp does not switch the active tab. The panel opens in the target tab in the background.
- If no pane matches the UUID (for example, the tab was closed), Warp logs a warning and does nothing. It does not fall back to the active tab.
- Without
session, behavior is unchanged.
The scope is open_file_editor only. Other warp://action/* handlers could adopt the same parameter later.
Is your feature request related to a problem? Please describe.
When using tools launched from a shell (coding agents, scripts, CLIs), I often want to show a file in a panel next to the terminal that ran the command. I have a script that does this today through open_file_editor.
- Current: the panel opens in whichever tab is active when Warp handles the URI, not when the command was run.
open_file_editorhas no way to target any other tab. - Problem: if I switch tabs between requesting the panel and Warp opening it, the panel opens in the wrong tab, next to unrelated work. The originating tab never gets it.
- Wanted: the panel opens in the tab that originated the request, even if I have switched away in the meantime. The panel placement itself (a split pane to the right, per
code.editor.open_file_layout) stays as it is today.
Additional context
Current behavior, from reading the code:
app/src/uri/mod.rs(open_file_editor) resolves a window and callsWorkspace::open_file_with_target.app/src/workspace/view.rs(open_file_with_target,open_file_notebook) places the pane throughactive_tab_pane_group(), so placement is always relative to the active tab.
Existing pieces that make this small:
- Every Warp shell exports
WARP_TERMINAL_SESSION_UUID(andWARP_FOCUS_URL=warp://session/<uuid>), defined incrates/warp_terminal/src/focus_env.rs. A caller can pass that value assessionwith no new identifier. - The
warp://session/<uuid>handler inapp/src/uri/mod.rsalready resolves a UUID to a window, pane group, and pane withfind_terminal_pane_by_session_uuid. It only focuses the pane; it does not open content.
Related: #8929 asks to focus an existing tab by name or path. This request is about opening content in a tab that is not active, and does not overlap with focusing.
Caller note: with no fallback, a stale UUID means the file silently does not open. If maintainers prefer falling back to the active tab, that works for my use case too.
Operating system (OS)
Cross-platform
How important is this feature to you?
3
Activity