Skip to content

fix(cli): retain correction details in rejected browser and Inspector inputs - #2247

Closed
chqcjq wants to merge 2 commits into
morluto:mainfrom
chqcjq:fix/cli-input-correction-details
Closed

chqcjq wants to merge 2 commits into
morluto:mainfrom
chqcjq:fix/cli-input-correction-details

Conversation

@chqcjq

@chqcjq chqcjq commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #2180.

Problem

Nine public CLI commands reject supplied arguments through their named input contracts, then return a generic invalid_request error without the contract's field issues. The output tells callers to "Correct the listed arguments and retry", but lists no arguments or constraints.

Root cause

Each command's parsed.success === false path constructs a bare new AnalysisInputError(operation) without passing the zod parsed.error.issues through the existing analysisInputErrorFromIssues or projectInputIssues projection.

Fix

  • browserCommands.ts: pass parsed.error.issues in list-browser-targets, inspect-web-page, analyze-web-bundle, and observe-web-session.
  • cliJavaScriptRuntimeCommands.ts: same fix for list-javascript-runtime-targets and observe-javascript-runtime.
  • browserAdvancedCommands.ts: same fix for discover-webmcp-tools, compare-web-captures, and capture-web-screenshot.

Verification

  • rea list-browser-targets 'not a url' --json now returns details.issues naming the invalid endpoint.
  • rea list-javascript-runtime-targets '' --json now returns details.issues naming the empty endpoint.
  • rea capture-web-screenshot 'not a url' '' --json now returns both endpoint and target_id issues.
  • npm run check, docs:check, and verify:test-discovery (943 files) all pass.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@morluto

morluto commented Oct 12, 2026

Copy link
Copy Markdown
Owner

Thanks @chqcjq. Keeping the earlier #2230 as the canonical #2180 contribution and preserving your adjacent browser-command improvements with coauthor credit. Its author disables maintainer edits, so I opened 369Apps#1 against the original author branch; the exact contribution head passes 16 CLI tests and the full source checks. This PR stays open while that integration is pending. Once the contribution lands in #2230, this overlap can close without losing your work or replacing the earlier contributor's PR.

@morluto

morluto commented Oct 12, 2026

Copy link
Copy Markdown
Owner

The earlier #2230 has now been squash-merged. Your adjacent browser diagnostics and regression coverage are preserved with coauthor credit in #2294, a focused follow-up against main (two files, 16 public CLI tests, full source/docs checks passing). Closing this overlapping PR now that the original contribution has landed and the remaining additions have a reviewable upstream home. Thanks @chqcjq for the fixes.

@morluto morluto closed this Oct 12, 2026
morluto added a commit that referenced this pull request Oct 12, 2026
…2294)

* fix(cli): retain correction details across browser commands

Fold the complementary implementation from #2247 into the earlier #2230 proposal, retaining the original contribution history.

Co-authored-by: LouisChen <[email protected]>

* fix(browser): retain diagnostics from the selected input branch

* fix(cli): recognize incomplete browser scenarios by their owned fields

---------

Co-authored-by: LouisChen <[email protected]>
@morluto morluto added bug Something isn't working area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior labels Oct 14, 2026
@morluto morluto added the area: cli CLI adapter and one-shot commands label Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: cli CLI adapter and one-shot commands area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(cli): rejected browser and Inspector inputs lose correction details

2 participants