feat(web): "Open in Superset" deep link on the published page header (SUPER-2193)
What
"Pages: detect browser links and offer opening in the native page view" — a Page link opened in a real browser, or in Superset's own in-app browser pane, had no way back into the native page view (comments, version history).
Why a deep link instead of navigation interception
The ticket's own implementation notes flagged the hard part: "avoid repeated prompts or navigation loops." That's the cost of the approach it half-suggests — hooking will-navigate/will-redirect inside the in-app browser pane, detecting a Page URL mid-flight, and popping a prompt.
There's a much cheaper path already sitting in the codebase:
superset://<path>is already a registered protocol; the main process already forwards anysuperset://<path>straight to the renderer router as/<path>(apps/desktop/src/main/index.ts) — this is exactly howws open'ssuperset://v2-workspace/<id>works today./pages/$slugis already a real renderer route (useOpenPage's standalone-navigate target).
So superset://pages/<slug> already works today, with zero new desktop code — I didn't need to touch the desktop app at all.
Fix
Added the one missing piece: a small "Open in Superset" icon button in the published page's header (apps/web/.../PageHeaderBar), linking to superset://pages/<slug>.
- It shows up identically whether the page is viewed in a real browser (Chrome) or inside Superset's own in-app browser pane, since both render the exact same web page — no separate interception, prompt state, or loop-avoidance logic needed anywhere.
- Deliberately not added to the desktop app's own native page view (
PageDetailView) —PageHeader(@superset/ui/page-comments) is the shared component behind both surfaces, and the button is only meaningful on the web viewer; the desktop native view gets it "for free" via the same header component but never renders it since only the web call site (PageHeaderBar) passes it intrailing. - Fails gracefully like any other custom-protocol link (Chrome's native "open app?" prompt, or a no-op if unregistered) — standard for this pattern (Slack, Notion, etc. do the same), no extra fallback UI for v1.
Testing
bun run --filter=@superset/web typecheck— passbun run check:i18n— clean, 0 missing across all 16 localesbiome checkon touched files — clean
Closes SUPER-2193.
https://claude.ai/code/session_01V89xJG2G36ArAT9XM9WygA
Summary by cubic
Adds an "Open in Superset" button to the published page header so a Page opened in a browser or in Superset's in-app browser pane can jump to the native page view (comments, version history). The button links to superset://pages/<slug>.
Browser pane
- The pane's navigation guard now recognizes the shipped
superset:scheme and the dev instance'ssuperset-<workspace>scheme, cancels the guest navigation, and forwards the link to the existing deep-link handler. - Popups and
target=_blankopens follow the same path. - The button isn't rendered in the desktop native view since you're already there.
Closes SUPER-2193.
Summary by CodeRabbit
- New Features
- Added an “Open in Superset” button to page headers, allowing pages to be opened directly in the Superset app.
- Added support for opening pages through Superset links from browser navigation and pop-up windows.
- Localization
- Added translated button labels across supported languages, including Czech, German, Spanish, French, Japanese, Korean, Portuguese, Chinese, and others.