fix(desktop): markdown preview links follow the link click policy
What & why
Markdown preview links were inert while editing. Route HTTP(S) link clicks through Settings → Links, sharing the terminal's URL actions: by default plain click places the caret, Shift-click opens a new tab, Cmd/Ctrl-click opens a split browser pane, and Cmd/Ctrl+Shift-click opens the system browser. Editable and read-only previews follow the same policy. Views without pane context retain the inline editor's external-browser fallback.
TipTap's native link opening stays disabled. The DOM click handler also handles Shift-clicks, which ProseMirror skips in its normal click handlers. Relative, anchor, and non-web links are ignored. Shared action and click-hint helpers move to their common parent without duplication.
Original fix by Waka07; policy rework co-authored with Waka07.
How I tested it
- 19 focused tests; 230 tests across MarkdownRenderer, pane registry, and click policy passed in the verification run. Three mutations confirmed the focused tests detect regressions.
- Desktop typecheck and Biome on changed files passed.
- Real dev-app CDP clicks verified all four modifier tiers, editable and read-only previews, live Settings changes, blocked schemes, and terminal link regression coverage.
- Manual user test confirmed link behavior and editing.
- Current-main merge-tree check passes.
- Evidence: https://app.superset.sh/page/external-pr-verification-evidence-18-sep-qjrdpw (version 6).
Limitations: the v1 fallback was typechecked but not exercised in-app; Shift-click also extends selection; no modifier hover label was added. No new user-facing strings.
Checklist
- PR title follows conventional commits (
type(scope): subject) -
bun run lintandbun run typecheckpass (full CI green) - "Allow edits from maintainers" is checked on fork PRs