fix(desktop): restore cmd+click for v1 terminal file links#3457
Conversation
Gate `onFileLinkClick` behind metaKey/ctrlKey in v1 helpers so file-path links once again require cmd/ctrl+click, matching pre-#3382 behavior. The shared `LinkDetectorAdapter` (used by v2) still activates on plain click and is untouched.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdded a modifier key requirement to terminal file link click handling. The Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
Greptile SummaryThis PR fixes a regression introduced in #3382, where v1 terminal file-path links began opening on plain click after being ported to the shared
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant xterm
participant LinkDetectorAdapter
participant onFileLinkClick as onFileLinkClick (helpers.ts)
participant v1Handler as v1 file-open action
User->>xterm: plain click on file path
xterm->>LinkDetectorAdapter: activate(event, detectedLink)
LinkDetectorAdapter->>onFileLinkClick: onFileLinkClick(event, link)
onFileLinkClick->>onFileLinkClick: "metaKey || ctrlKey?"
Note over onFileLinkClick: NO → early return (fix)
onFileLinkClick-->>LinkDetectorAdapter: (no-op)
User->>xterm: Cmd/Ctrl+click on file path
xterm->>LinkDetectorAdapter: activate(event, detectedLink)
LinkDetectorAdapter->>onFileLinkClick: onFileLinkClick(event, link)
onFileLinkClick->>onFileLinkClick: "metaKey || ctrlKey?"
Note over onFileLinkClick: YES → proceed
onFileLinkClick->>v1Handler: openFileInEditor.mutate(...)
v1Handler-->>User: file opens in editor
|
superset-sh#3457) Gate `onFileLinkClick` behind metaKey/ctrlKey in v1 helpers so file-path links once again require cmd/ctrl+click, matching pre-superset-sh#3382 behavior. The shared `LinkDetectorAdapter` (used by v2) still activates on plain click and is untouched.
…ndle chore(upstream): PR1 低リスク修正5件バンドル (superset-sh#3457 superset-sh#3464 superset-sh#3462 superset-sh#3466 superset-sh#3461)
-s ours merge to record that upstream commits a3e34bf through de70163 (13 commits) are semantically already present on origin/main via the PR1-6 cherry-pick series (PRs #176, #177, #178, #179, #180, #182), plus fork-adaptation fixes layered on top. This merge target is de70163 specifically (not upstream/main) so newer upstream commits (9fff075 and later) remain visible in future behind counts. Upstream commits covered by this audit merge: - a3e34bf fix(desktop): restore cmd+click requirement for v1 terminal file links (superset-sh#3457) [PR1/#176] - 57557f8 fix(desktop): gate v2 workspace children on collection readiness (superset-sh#3464) [PR1/#176] - 4ee2e61 fix(desktop): use native clipboard for copy path in v2 sidebar (superset-sh#3462) [PR1/#176] - 87d6e93 feat(desktop): close settings with Escape key (superset-sh#3466) [PR1/#176] - 9c7f5f4 chore(desktop): auto-restart host-service on bundle change in dev (superset-sh#3461) [PR1/#176] - 93140d9 fix(mcp): accept MCP resource URL as valid OAuth audience (superset-sh#3459) [PR2/#177] - be9e000 fix(desktop): drive tray menu off events, fetch real org name (superset-sh#3458) [PR2/#177] - c5f791e feat(v2): unify workspace delete through host-service (superset-sh#3443) [PR3/#178] - 2c24d93 feat(desktop): paginated branch picker with checkout + open actions (superset-sh#3397) [PR4/#179] - 2bf1049 feat(desktop/hotkeys): v1 directional pane focus + best-effort v1 override migrator (superset-sh#3460) [PR5/#180] - 1294a7d feat(desktop/hotkeys): restore Cmd+Alt+Arrow for tab/workspace nav (superset-sh#3472) [PR5/#180] - de70163 feat(desktop): v2 review tab first pass — PR info, checks, comments (superset-sh#3463) [PR6/#182] Intentionally skipped (version bump, fork has independent versioning): - 1e23353 chore(desktop): bump version to 1.5.5 (superset-sh#3473) Fork-adaptation fixes layered on top of the cherry-picks: - PR1: host-service-coordinator alias import fix, settings Escape selector narrowing (role-based + popper wrapper), Escape close uses replace navigation - PR2: dual quit mode preservation (requestQuit "release"/"stop"), trayUpdateToken guard for stale async fetchHostInfo results - PR4: ChangesHeader.normalizeBranchName regex rewrite (lint false positive), worktree add uses fullRef for remote-tracking refs, syncTimedOut reset on pendingId change, GIT_REFS.md barrel example fix - PR5: migrate.ts re-sanitize of existing localStorage overrides (v2 marker bump intent), FOCUS_PANE_* enabled:isActive for KeepAliveWorkspaces, CATEGORY_ORDER merges Navigation (upstream) and Browser (fork) - PR6: normalizeThreadsToComments flattens all thread.comments (not just first), CommentPane overrides <a> (openUrl) and <img> (SafeImage), zero-badge suppression, pr-null comments gate Fork features verified intact (Explore agent audit of combined 36d4de4..35d95f3 range): - BROWSER_RELOAD / BROWSER_HARD_RELOAD hotkeys - dual quit mode menu in tray - v1 terminal cold-restore + retry reconnect (out of range but unaffected) - KeepAliveWorkspaces (FOCUS_PANE_* gated on isActive) - useCommandPalette + addMemoTab in v2 workspace - host-service-coordinator rename alias pattern
Summary
TerminalLinkManager. The oldFilePathLinkProviderrequired cmd/ctrl; the sharedLinkDetectorAdapter(also used by v2) activates on plain click.onFileLinkClickbehindmetaKey/ctrlKeyin v1'shelpers.tsso v1 requires the modifier again without changing v2 behavior.UrlLinkProvider; this fix aligns file-path links with that.Test plan
Summary by cubic
Restore Cmd/Ctrl+click requirement for file-path links in the v1 terminal; plain clicks no longer open files. URL clicks and v2 terminal behavior are unchanged.
Written for commit 7c67db1. Summary will update on new commits.
Summary by CodeRabbit