Skip to content

feat: add "Open in IDE" integration for source files#260

Merged
PhenX merged 1 commit into
mainfrom
claude/ide-file-path-integration-vg4vvr
Jul 16, 2026
Merged

feat: add "Open in IDE" integration for source files#260
PhenX merged 1 commit into
mainfrom
claude/ide-file-path-integration-vg4vvr

Conversation

@PhenX

@PhenX PhenX commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

What & why

Adds a comprehensive "Open in IDE" feature that lets users click any source path in the dashboard to jump directly to that file in their local editor. This bridges the gap between the web dashboard and local development workflows.

The feature supports three methods:

  • VS Code (and variants: Insiders, VSCodium, Cursor) via vscode:// URL scheme
  • JetBrains via jetbrains:// URL scheme (requires JetBrains Toolbox)
  • JetBrains local server via HTTP endpoint (requires IDE Remote Control plugin)

An "Auto" mode probes the JetBrains local server first (the only detectable method) and falls back to a URL scheme launch.

All preferences (method, workspace root, IDE product/port) are stored per-browser in localStorage — never sent to the server — since the source mapping is inherently per-device. Users configure these once in a settings modal accessible from any source path or the user menu.

Implementation details

  • useOpenInIde composable: Manages preferences, resolves workspace roots (with per-project overrides for monorepos), and orchestrates the launch logic. Handles toast notifications for success/failure feedback.
  • OpenInIdeLink component: A thin, reusable trigger that renders a source path with hover-revealed IDE controls (icon for default method, caret for chooser). Safe to drop into any component showing a file path.
  • OpenInIdeSettingsModal component: Global settings UI for configuring method, workspace root, VS Code flavor, JetBrains product/port, and per-project overrides.
  • ide-links utility: Pure URL builders for the three schemes, plus workspace-path joining. Kept free of Vue/DOM for unit testability.
  • Shared parseLocation: Moved from server-only to shared/ so the browser, server, and demo router all parse file:line:col strings identically.

How was it tested?

  • Added comprehensive unit tests for URL builders and path utilities (ide-links.test.ts)
  • Existing parseLocation tests updated to import from shared location
  • Manual integration: component wired into multiple pages (test runs, failure clusters, test cases, flaky tests) with project context threaded through for workspace-root resolution
  • Settings modal mounted globally in default layout, accessible from user menu and any source path

Checklist

  • PR title follows Conventional Commits (feat(...))
  • Tests added for URL builders and path utilities
  • Docs added (docs/ide-integration.md) with setup instructions and method comparison
  • Help content added for the settings modal
  • User-facing components integrated into existing pages (test runs, clusters, test cases, flaky tests)

https://claude.ai/code/session_01LwFmhTdStCoo39HDDeZGHm

Source paths shown across the dashboard — the failing "Failed here" call
stack, a run's test-case list and tree, the test-case and cluster pages,
flaky lists, and the AI suggested-fix — are now clickable to open the file
(and line) in the user's local editor.

- New shared OpenInIdeLink wraps a path (or file:line:col string) with a
  hover chooser: VS Code, JetBrains via URL, JetBrains via the local server
  / IDE Remote Control plugin, plus an Auto action and copy actions.
- Auto probes the detectable JetBrains local server first, then falls back
  to a single fire-and-forget vscode:// or jetbrains:// launch.
- Preferences (method, the workspace root that maps a repo-relative path to
  an absolute one, VS Code flavor, JetBrains product/port) are a per-browser
  localStorage setting in useOpenInIde, edited via OpenInIdeSettingsModal
  (opened from the chooser and the user menu) — deliberately not the DB/env
  settings registry, since the source lives on the user's machine.
- Pure URL/path builders live in app/utils/ide-links.ts (unit-tested); the
  file:line:col parser moves to #shared/parse-location, shared by server,
  demo and client.
- Docs: new docs/ide-integration.md and an AGENTS.md "Clickable source
  paths" rule.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LwFmhTdStCoo39HDDeZGHm
@github-actions

Copy link
Copy Markdown
Contributor

Coverage Report for Reporter (./reporter)

Status Category Percentage Covered / Total
🔵 Lines 63.89% 1446 / 2263
🔵 Statements 62.25% 1643 / 2639
🔵 Functions 70.43% 243 / 345
🔵 Branches 58.69% 1188 / 2024
File CoverageNo changed files found.
Generated in workflow #892 for commit 3f082fb by the Vitest Coverage Report Action

@github-actions

Copy link
Copy Markdown
Contributor

Coverage Report for Application (./application)

Status Category Percentage Covered / Total
🔵 Lines 23.47% 1828 / 7786
🔵 Statements 23.38% 2120 / 9067
🔵 Functions 22.43% 321 / 1431
🔵 Branches 20.11% 1445 / 7185
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
application/app/composables/useOpenInIde.ts 0% 0% 0% 0% 60-313
application/app/utils/help-content.ts 0% 0% 0% 0% 32-602
application/app/utils/ide-links.ts 100% 100% 100% 100%
application/app/utils/retry-command.ts 75% 71.05% 80% 73.01% 77, 97-109, 116-122
application/server/utils/parse-location.ts 0% 0% 0% 0%
application/shared/parse-location.ts 90% 87.5% 100% 90% 30-31
Generated in workflow #892 for commit 3f082fb by the Vitest Coverage Report Action

@PhenX
PhenX merged commit 20a0c8b into main Jul 16, 2026
7 checks passed
@PhenX
PhenX deleted the claude/ide-file-path-integration-vg4vvr branch July 16, 2026 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants