# 079 - Paths Open in VS Code ## User Story As the operator, I want to click folder and file names on cards and have them open in VS Code, so that I inspect a change without typing its path. ## Decisions (operator-confirmed 2026-11-27; do not re-litigate) 1. **`vscode://file/`** (operator): a file opens in VS Code, a folder opens as a window. Rejected: a file viewer in the hub (new trust boundary, the container would read host files); a browser extension (effort); a runner `xdg-open` (a signature per click). 2. **Where**: the folder chip, the worktree chip, and the file head of every diff (worktree plus relative path). 3. **Copy**: right-click copies the full path, as left-click does today. ## Approach ```mermaid flowchart TD subgraph P["๐Ÿงญ 0 ยท Preparation"] P1["๐Ÿ“‹ Write requirement"] --> P2{"โœ… Operator approves?"} P2 -- "โœ๏ธ corrections" --> P1 end P2 -- "๐Ÿค– yes" --> A1 subgraph A["๐Ÿ”— A ยท Path links"] A1["๐Ÿงฉ Link builder"] --> A2["๐Ÿท๏ธ Chips and diff heads as links"] A2 --> A3["๐Ÿ“‹ Right-click copies"] A3 --> A4{"๐Ÿงช Unit and E2E green?"} A4 -- "๐Ÿ”ด no: fix" --> A1 A4 -- "๐ŸŸข yes" --> AF{"๐Ÿ’ฌ Operator feedback on screenshots?"} AF -- "โœ๏ธ changes" --> A2 end AF -- "๐Ÿ‘ fits" --> D1["๐Ÿ Review, commit with operator OK, hand-over"] ``` ## Acceptance Criteria ### Links - [ ] The `href` of the folder chip is exactly `vscode://file/`. - [ ] The worktree chip links the same way to its worktree. - [ ] A diff file head links to `/`. - [ ] Right-click on a link copies the full path and opens no context menu. - [ ] A relative or empty path renders as text without a link. ### Tests - Unit: - [ ] The link builder (node): absolute path, characters needing encoding, relative and empty path. - Integration: - n/a: page only, no hub or runner change. - E2E: - [ ] `tests/e2e/test_path_links_e2e.py`: hrefs and right-click copy, screenshots at 1920, 1366 and 390.