[PR #2247] [CLOSED] fix(cli): retain correction details in rejected browser and Inspector inputs #5114

Closed
opened 2026-10-31 01:04:04 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/2247
Author: @chqcjq
Created: 10/12/2026
Status: ❌ Closed

Base: main ← Head: fix/cli-input-correction-details


📝 Commits (2)

  • 24548b3 fix(cli): retain correction details in rejected browser and Inspector inputs
  • a047c59 fix(cli): retain correction details in discover-webmcp-tools, compare-web-captures, and capture-web-screenshot

📊 Changes

3 files changed (+72 additions, -12 deletions)

View changed files

📝 src/cli/browserAdvancedCommands.ts (+19 -3)
📝 src/cli/browserCommands.ts (+33 -5)
📝 src/cliJavaScriptRuntimeCommands.ts (+20 -4)

📄 Description

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.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/2247 **Author:** [@chqcjq](https://github.com/chqcjq) **Created:** 10/12/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/cli-input-correction-details` --- ### 📝 Commits (2) - [`24548b3`](https://github.com/morluto/rea/commit/24548b38e7b851ce0afe2683df5f8288f4ef9e13) fix(cli): retain correction details in rejected browser and Inspector inputs - [`a047c59`](https://github.com/morluto/rea/commit/a047c595f8476e015d0af96d7c864c28164bc057) fix(cli): retain correction details in discover-webmcp-tools, compare-web-captures, and capture-web-screenshot ### 📊 Changes **3 files changed** (+72 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `src/cli/browserAdvancedCommands.ts` (+19 -3) 📝 `src/cli/browserCommands.ts` (+33 -5) 📝 `src/cliJavaScriptRuntimeCommands.ts` (+20 -4) </details> ### 📄 Description 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:04:04 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#5114
No description provided.