Repository navigation
feat(cli): add no-snapshot navigation output - #179
Merged
Merged
Conversation
[Medium impact] The PR appears safe to merge. Reviews (1) · Last reviewed commit: "feat(cli): allow metadata-only navigatio..." · Reviewed by Greptile |
Owner
|
Speaking as Kun's firstmate: triaged against VISION.md on main VISION per-rule
Contract-class: opt-in. The unconfigured CI green (build-and-test, generated-files guard, no-mistakes), Greptile 5/5, diff reviewed. Squash-merged as Speaking as Kun's firstmate: this is merged. Thank you @lmn451 — really appreciate you taking the time on this. |
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.
Why
Navigation-to-
evaland chained page-level workflows often do not use the automatically printed accessibility tree. Returning that unused tree adds output to the agent context, while UID-basedclick/fillworkflows still benefit from the existing default. This opt-in flag lets the caller choose metadata-only output without changing that default.This is an AXI presentation option, not a new MCP/browser capability. Snapshot capture remains in place to preserve the existing metadata and reference-freshness behavior. Token and latency savings have not been measured in real workflows; this PR does not claim reduced CDP/browser work. No environment-variable control or server/transport change is introduced.
Closes #178.
Local checks
pnpm run buildpassed.pnpm test: 731 tests across 27 files passed.pnpm exec prettier --check .passed.What Changed
--no-snapshottonewpageandselectpageto print page metadata without the accessibility tree or snapshot-derived suggestions.--fulland works before or after the URL or page ID.Risk Assessment
✅ Low: The change is limited to opt-in navigation output formatting; it retains snapshot capture and freshness handling, leaves default output unchanged, and matches the stated scope.
Testing
Drove the CLI against isolated headless Chrome and a disposable local counter page. Default trees, metadata-only navigation (including flag placement and --full precedence), selected-page eval, explicit snapshot UID click, and rejection outside navigation all behaved as expected. Captured CLI transcripts; a screenshot was not applicable to this terminal-only surface. No broad test suite, lint, or build was run in this assigned live-test phase.
newpage https://example.comandselectpage 2CLI runs; selectpage transcript is in the Default selectpage output artifact.newpage --no-snapshot http://127.0.0.1:19400,selectpage --no-snapshot 3 --full, andnewpage http://127.0.0.1:19400 --full --no-snapshotruns; see the metadata-only output artifacts.selectpage --no-snapshot 3 --fullfollowed byeval 'document.title'; see the selected-page eval output artifact.snapshot,click @g5:2_3, theneval 'document.querySelector("button").textContent'; snapshot and resulting value"1"were observed in CLI output.snapshot --no-snapshotreturnedUnknown flag --no-snapshot for snapshotwithVALIDATION_ERROR.Evidence: Default selectpage output
Evidence: Metadata-only newpage output
Evidence: Metadata-only selectpage with --full
Evidence: Selected-page eval output
Evidence: Explicit snapshot with fresh UID
Evidence: newpage --full --no-snapshot output
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
newpage https://example.comandselectpage 2CLI runs; selectpage transcript is in the Default selectpage output artifact.newpage --no-snapshot http://127.0.0.1:19400,selectpage --no-snapshot 3 --full, andnewpage http://127.0.0.1:19400 --full --no-snapshotruns; see the metadata-only output artifacts.selectpage --no-snapshot 3 --fullfollowed byeval 'document.title'; see the selected-page eval output artifact.snapshot,click @g5:2_3, theneval 'document.querySelector("button").textContent'; snapshot and resulting value"1"were observed in CLI output.snapshot --no-snapshotreturnedUnknown flag --no-snapshot for snapshotwithVALIDATION_ERROR.HOME=<worktree-local temp HOME> CHROME_DEVTOOLS_AXI_SESSION=nav-live CHROME_DEVTOOLS_AXI_PORT=19324 pnpm exec tsx bin/chrome-devtools-axi.ts newpage https://example.compnpm exec tsx bin/chrome-devtools-axi.ts newpage --no-snapshot http://127.0.0.1:19400pnpm exec tsx bin/chrome-devtools-axi.ts selectpage 2pnpm exec tsx bin/chrome-devtools-axi.ts selectpage --no-snapshot 3 --fullpnpm exec tsx bin/chrome-devtools-axi.ts eval 'document.title'pnpm exec tsx bin/chrome-devtools-axi.ts snapshotpnpm exec tsx bin/chrome-devtools-axi.ts click @g5:2_3pnpm exec tsx bin/chrome-devtools-axi.ts eval 'document.querySelector("button").textContent'pnpm exec tsx bin/chrome-devtools-axi.ts snapshot --no-snapshotpnpm exec tsx bin/chrome-devtools-axi.ts newpage http://127.0.0.1:19400 --full --no-snapshotClosed disposable pages where possible, stopped both isolated bridges and the local fixture server, removed.test-runtime, and confirmed the worktree had no reported changes.✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.