Repository navigation
Output references and failure navigation: open file:line, copy paths/URLs/hashes, jump between failures #353
Description
Goal
Turn reliable references in command-owned output into user-initiated actions, and make failures easy to revisit. Extend the existing command-block Actions, /open, /find, /filter and editor bridges, rather than adding a permanent overlay or building a second debugger.
Actionable references
Conservatively recognize high-confidence:
- Source locations such as
src/main.ts:42/ absolute file paths (file/line/column when unambiguous). - URLs, Git commit IDs, test failure locations, and device identifiers (e.g. Android serials) when the source format is reliable.
- Other typed references only when supported by a real handler and explicit user demand.
From a selected owning command block, offer context-appropriate actions: Copy value; Open file at line; Reveal/open URL via supported host actions; Inspect Git commit; Stage a device-specific follow-up command for review. No executable action based on output without confirmation. Never change the shell's current command or execute automatically.
Failure navigation
- Use nonzero exit and interruption as authoritative lifecycle states.
- Parse familiar build/test diagnostics only as hints; a string containing “error” does not establish command failure.
- Jump by stable command ID (not visual row), navigate previous/next relevant result, open source, copy failure with surrounding context, Compare (Compare output: diff two executions of a command #352/Compare output: diff two runs of a command #361), Copy as Report (Copy as Report: Markdown/plain diagnostic reports from command blocks, with review and optional redaction #351/Copy as Report: reviewed Markdown/plain reports from command blocks #360).
- Do not render distracting permanent underlines/buttons over all program output; keep actions discoverable in owned Action menus/selection and keyboard controls.
- Handle malformed paths, escapes/OSC, hostile URLs, symlinks, relative cwd, legacy/restored/truncated output and missing editors honestly.
Defaults
Recognition should be lazy/contextual, local and non-executing. Do not add an automatic error panel, ongoing output scanning or mandatory integrations. Selected actions never transmit information without an explicit user instruction.
Acceptance
- Resolve reference provenance against the correct command and cwd; handle path:line and URLs safely.
- Keyboard-first actionable reference picker or menu, with accurate unavailable reasons.
- Failure navigation reuses existing transcript navigation and exact command records.
- No action steals input ownership from foreground/managed programs.
- Real-PTY, narrow/NO_COLOR/Safe, hostile-output and restored-transcript tests.
- Document what is deterministic and what is heuristic, with no claims of unsupported actions.
Parent: #359. Blocks/copy foundation: #358. Report/Compare: #360/#361.
Activity
raiseCatError commentedon Oct 10, 2026
Implemented in draft on branch
feature/output-references(stacked on #361, not yet a PR).path:line[:col](the finder/openuses; dotted numbers such as versions/IP:port are excluded) and links without credentials (look-alike hosts shown as punycode). Heuristic and limited to the printing command: commit ids ingitoutput, serials inadb devices.Tests:
tests/outputReferences.test.ts(parsing, hostile input, bounds),tests/outputReferencesApp.test.ts(menu, staging, stale/hostile ids, navigation). Typecheck clean.Not yet: real-PTY test, narrow/NO_COLOR/Safe captures, restored-transcript check, a dedicated keybinding for failure navigation (palette only), test-runner diagnostic hints, symlink handling beyond
/open's existing resolution.