Add warp://settings deeplink entrypoints (open, search, scroll-to-widget)#13232
Conversation
Route three warp://settings deep links through the existing settings workspace actions: - warp://settings opens a settings tab on the default page - warp://settings?q=<query> pre-fills the settings search bar - warp://settings?widget=<widget_id> scrolls to a specific widget ?widget= resolves through an allowlist of stable slugs (global_hotkey, cli_agents, custom_router) so internal widget type names are not exposed as the public URL contract. Also apply the search query on an already-open settings pane. Co-Authored-By: Oz <oz-agent@warp.dev>
|
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 Powered by Oz |
There was a problem hiding this comment.
Overview
This PR adds warp://settings deeplink handling for opening Settings, pre-filling search, and scrolling/highlighting allowlisted widgets. The diff also updates existing settings-pane reuse behavior so a new search query applies when a settings tab is already open.
Concerns
- This is a user-facing behavior change, but the PR description says it was not manually tested with
./script/runand includes no screenshot or screen recording. For this user-facing change, please include screenshots or a short screen recording demonstrating the bare settings link,?q=, and?widget=flows working end to end.
Verdict
Found: 0 critical, 1 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
acarl005
left a comment
There was a problem hiding this comment.
Some comments but nothing blocking! Up to you if you want to change or not.
Co-authored-by: Andy <8334252+acarl005@users.noreply.github.com>
Co-authored-by: Andy <8334252+acarl005@users.noreply.github.com>
Reuse the already-parsed query_string map to pull out the 'q' search param instead of re-parsing pairs in a dedicated helper. Removes the now-redundant parse_settings_search_query fn and its unit test. Co-Authored-By: Oz <oz-agent@warp.dev>
Demo: https://www.loom.com/share/d26cdf004faa4aee9c128f77dc0b2af8
Description
Adds a
warp://settingsdeep link family so settings can be opened directly from a URL:warp://settings- opens a settings tab on the default page.warp://settings?q=<query>- opens settings with the search bar pre-filled and the page list filtered.warp://settings?widget=<widget_id>- opens settings scrolled to (and highlighting) a specific widget.Why: lets external surfaces (docs, in-app links, support flows) deep-link users straight to the relevant setting.
How: the existing
UriHost::Settingshandler now treats an empty trailing path segment as "no sub-page" and routes the bare host plus theq/widgetquery params (precedence:widget>q> existing simple sub-pages > bare default). A newOpenSettingsArgsenum maps to the existing workspace actions (ShowSettings,ShowSettingsPageWithSearch,ScrollToSettingsWidget) via two newroot_viewactions.?widget=resolves through an allowlist (settings_widget_deeplink_target) of stable slugs to(SettingsSection, &'static str)so internal Rust type names aren't exposed as the public URL contract; seeded withglobal_hotkey,cli_agents, andcustom_router. Also fixedopen_settings_paneso a?q=search applies even when a settings tab is already open.Linked Issue
N/A - no linked issue.
Testing
Added unit tests in
app/src/uri/uri_tests.rs:parse_settings_search_query- present / empty / URL-encoded / missingqsettings_widget_deeplink_target- known slugs (incl.custom_router) and unknown/emptysettings_section_for_simple_subpage- regression for existing sub-pagesRan
./script/formatandcargo clippy -p warp --all-targets --tests -- -D warnings(clean), plus the new unit tests../script/runAgent Mode
Warp artifacts
CHANGELOG-IMPROVEMENT: Added
warp://settingsdeep links - open settings, pre-fill the search bar with?q=, or jump to a specific setting with?widget=.Co-Authored-By: Oz oz-agent@warp.dev