Skip to content

Support warp://action/open_file URIs#10233

Open
niyangup wants to merge 1 commit intowarpdotdev:masterfrom
niyangup:issue-9561-open-file-uri
Open

Support warp://action/open_file URIs#10233
niyangup wants to merge 1 commit intowarpdotdev:masterfrom
niyangup:issue-9561-open-file-uri

Conversation

@niyangup
Copy link
Copy Markdown

@niyangup niyangup commented May 6, 2026

Summary

  • Add support for warp://action/open_file?path=/absolute/path&line=120&column=8.
  • Parse required absolute path and optional positive line / column query parameters.
  • Reuse the existing file-opening flow and keep the scope URI-only, without adding CLI arguments.

Test Plan

  • MACOSX_DEPLOYMENT_TARGET=14.0 cargo fmt --manifest-path /Users/niyangup/WorkSpace/warp/Cargo.toml --all --check
  • MACOSX_DEPLOYMENT_TARGET=14.0 cargo test test_action_open_file_parse --manifest-path /Users/niyangup/WorkSpace/warp/Cargo.toml
  • MACOSX_DEPLOYMENT_TARGET=14.0 cargo check --manifest-path /Users/niyangup/WorkSpace/warp/Cargo.toml

Closes #9561

@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented May 6, 2026

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: poper.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email [email protected]
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

@github-actions github-actions Bot added the external-contributor Indicates that a PR has been opened by someone outside the Warp team. label May 6, 2026
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 6, 2026

@niyangup

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

oz-for-oss[bot]
oz-for-oss Bot previously requested changes May 6, 2026
Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

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

Overview

Adds parsing and handling for warp://action/open_file URIs and forwards them into the existing URI file-opening flow with optional line/column data.

Concerns

  • The new custom URI action reuses the existing file:// opener, which can route runnable shell scripts into the session execution path. The URI action should be constrained to opening files in viewers/editors, or explicitly reject paths that would become ExecuteInSession.
  • This is user-visible deep-link behavior and the PR description does not include screenshots or a short video showing the end-to-end result. For faster review, please upload visual evidence of the feature working end to end.

Security

  • warp://action/open_file currently reaches the same runnable-script behavior as file://, expanding the protocol surface that can trigger local script execution behavior.

Verdict

Found: 0 critical, 2 important, 0 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Comment thread app/src/uri/mod.rs Outdated
open_file(window_id, path, None, false, ctx);
}
Self::OpenFile { path, line_col } => {
open_file(primary_window_id, path.clone(), *line_col, true, ctx);
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.

⚠️ [IMPORTANT] [SECURITY] open_file reuses the file:// routing path, which can send runnable shell scripts through execute_file; a warp://action/open_file?... link should only open files in an editor/viewer or reject ExecuteInSession paths.

@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented May 6, 2026

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: poper.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email [email protected]
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

Add warp://action/open_file URI parsing and route it through the editor/notebook-only file opening path with optional line and column targeting.

Co-Authored-By: Claude Haiku 4.5 <[email protected]>
@niyangup niyangup force-pushed the issue-9561-open-file-uri branch from 33c5c4a to 4c84c9c Compare May 6, 2026 06:37
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented May 6, 2026

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @niyangup on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment @cla-bot check to trigger another check.

@niyangup
Copy link
Copy Markdown
Author

niyangup commented May 6, 2026

@cla-bot check
/oz-review

@cla-bot cla-bot Bot added the cla-signed label May 6, 2026
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented May 6, 2026

The cla-bot has been summoned, and re-checked this pull request!

@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 6, 2026

@niyangup

I'm re-reviewing this pull request in response to a review request.

You can view the conversation on Warp.

I reviewed this pull request and requested human review from: @seemeroland.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss oz-for-oss Bot dismissed their stale review May 6, 2026 07:12

Oz no longer requests changes for this pull request after the latest automated review.

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

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

Overview

This PR adds URI parsing and routing for warp://action/open_file with a required absolute path and optional positive line/column parameters. It reuses the existing file-opening flow while distinguishing the new URI origin so executable/session-opening paths are blocked for this action.

Concerns

  • None found.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss oz-for-oss Bot requested a review from seemeroland May 6, 2026 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed external-contributor Indicates that a PR has been opened by someone outside the Warp team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: support opening an external file at a specific line via URL Scheme and CLI

1 participant