feat(desktop): Pages row in Settings > Links — external/internal + split/tab (SUPER-2315, SUPER-2192)
What
SUPER-2315 — a dedicated "Pages" row in Settings → Links so a Page link's destination (Superset vs. system browser) is configured independently of the generic "URL links" default.
SUPER-2192 — the placement axis on top of that: once a Page opens inside Superset, whether it splits the active pane or opens as a new tab.
SUPER-2315 — why / fix
runUrlLinkAction recognized Page URLs (parseSupersetPageUrl), but only after checking whether the resolved click action was "external":
if (action === "external") { openExternal(url); return; } // ← exits before the page check
const pageSlug = parseSupersetPageUrl(url, ...);
if (pageSlug) { openPagePaneInStore(...); return; }
Anyone whose "URL links" default click is external never reached the Page branch — a Page link always followed them out to the OS browser.
- New
pageOpenActionpreference, a single select (not a modifier-tiered map) mirroringportOpenAction. - New "Pages" section in
LinksSettings.tsx, same shape as "Ports". TerminalPane's default URL click checksparseSupersetPageUrlbefore resolving the genericurlLinkstier, routing Page links throughpageOpenActioninstead. The right-click "Open in ..." context menu is untouched — an explicit pick always does exactly what it says.
SUPER-2192 — why / fix
openPagePaneInStore always hardcoded "tab" placement, so there was never actually a difference between "pane" and "newTab" for pages — both landed in the same place. This closes that gap now that a placement primitive already existed (focusOrOpenPane's "split" | "tab", previously only ever called with "tab").
openPagePaneInStore(store, page, placement)—placementdefaults to"split", forwarded tofocusOrOpenPane.pageOpenActiongets its third value back:"newTab"is back in the Pages Settings row, now backed by a real distinct outcome.runUrlLinkActionand the right-click "Open in ..." submenu both map their action to a placement, so picking "New Tab" on a page link actually tabs instead of always splitting/tabbing the same way.useOpenPage'sinPanedecision falls back topageOpenAction === "pane"when a caller doesn't pass an explicit override, so the Pages grid's plain click (not just terminal links) honors the setting too. Modifier-click there still forcesinPane, unchanged.- Dropped the "Open in Superset" placeholder label now that
"pane"truly means a split — the existingactionLabel"Open in split pane" wording is accurate, so lingui correctly extracted the now-orphaned string out of every locale catalog. - Updated
openPagePaneInStore's tests for the new split-by-default behavior and added coverage for explicit"tab"placement.
Testing
bun run --filter=@superset/desktop typecheck— passbun run check:i18n— clean, 0 missing across all 16 localesbun run --filter=@superset/desktop test— 3752/3754 pass; the 2 failures are interminal-ws-transport.test.ts(jest.advanceTimersByTimeincompatibility), pre-existing and unrelated — reproduced identically on main before this changebiome checkon touched files — clean- Addressed CodeRabbit review feedback: hover-tooltip/click-action mismatch for Page links, and an Italian translation wording fix
Closes SUPER-2315, SUPER-2192.
https://claude.ai/code/session_01V89xJG2G36ArAT9XM9WygA
Summary by CodeRabbit
-
New Features
- Added a Pages link preference in Links settings.
- Choose whether Page links open in a pane, a new tab, or the external browser.
- Page links from terminals, chat messages, task markdown, and page views now follow the selected preference.
- The preference defaults to opening links in a pane.
- Page links opened in panes now split the current tab by default.
-
Localization
- Added translations for the Pages setting and its description across supported languages.