Repository navigation
docs(terminal-path-links): cut the context down to current behaviour and invariants (#1355) - #1390
Merged
Merged
Conversation
…and invariants (#1355) State current behaviour and invariants with their reasons; correct the 24-row read bound and the async sensitive-path walk; answer pointer sites that cited content the file did not hold.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #1355.
Summary
Cuts
.ai/contexts/terminal-path-links.mddown to current behaviour and its invariants, with the reasons the code's pointers cite. No behaviour change.public/terminal-path-links.js,readTerminalLogicalLine).isSensitivePathAsyncwalks both the JS and the native realpath, as the sync guard does. The old text said the JS one only, which describesresolveOnDiskAsync, not the denylist guard (src/main/shared/resolve-path-on-disk.js,sensitiveCandidatesAsync).Read(…)/Edit(…)headers behave as before" became: a path inside such a header is a candidate like any other.public/terminal-manager.js),cmRevealLineon a merge view's.b(public/codemirror-setup.js), andViewerPanel.revealLine(public/viewer-panel.js).resolveTerminalPathsonly clamps its concurrency to at least 1.fs.promises.open, after the regular-file check) from the panel reader's synchronousreadFileSync, which is what can freeze main.?or&a candidate starts (https://example.test/?README.mdyieldsREADME.md). Unquotedmy file.txtgives two candidates, each linked if openable.ViewerPanel.revealLineis cancelled by anyopen(), the same file included, and bydestroy().Docs
Agent docs only:
.ai/contexts/terminal-path-links.md. No user doc describes these internals. no-changelog: nothing users see changes.Tests
node scripts/check-docs.js --validate: passed.node scripts/check-doc-refs.js: 0 failures.git diff --check: clean.git grep -l 'terminal-path-links.md' -- test/is empty). As a sanity check,test/terminal-path-links.test.jsandtest/terminal-path-target.test.jsran under Node 22 with--test-concurrency=1: 81 pass, 0 fail.Not verified
WebLinksAddonmatches by default.open/readFileSync(OS behaviour), and the Claude CLI's OSC 8 /tasks/stdout behaviour. Both are kept as reasons.Kept
isSensitivePath, directory, regular file, size, NUL sniff, plus the unreadable-file refusal.pendingLine/consumeChangesPendingLine, the working-tree document in every mode, markdown in source at the line without writing the preference, the same-file reveal, and the stricter editor read with its refusal location.://rule, the quoted pass and its reason, the 255-character component limit, punctuation stripping, overlaps decided after the answers, and 64 candidates per line.forget, a failed lookup memoised asunresolved, the extensionless cost, and LRU re-insertion with the cliff it avoids.