Repository navigation
fix(web): one-line warning when the browser opener cannot start - #2689
Merged
Merged
Conversation
…rt (#2645) openBrowser logged the whole error object, so a missing opener printed a stack plus spawnargs carrying the tokenized launch URL. Print the message only, in the CLI's wording. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: cliffhall <[email protected]>
There was a problem hiding this comment.
🟢 Approval recommended
The implementation matches the issue requirements and is thoroughly covered by focused tests.
0 open findings
What changed in this PR
Prevents browser-opener failures from logging stack traces and token-bearing spawn arguments, addressing #2645.
Changes:
- Logs only the normalized failure message.
- Adds coverage for
Error, non-Error, and token-bearing spawn failures.
| File | Description |
|---|---|
clients/web/server/web-server-config.ts |
Emits a concise, single-argument warning. |
clients/web/src/test/integration/server/server-auto-open.test.ts |
Verifies warning output, token omission, and server resilience. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Member
Author
|
Copilot review closed: round 1 was clean (0 inline comments, no headline findings, no suppressed comments). |
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.
Closes #2645
What changed
openBrowser(clients/web/server/web-server-config.ts) passed the whole error toconsole.warn, so when--webcould not spawn the opener it printed a stack trace plusspawnargs— which carry the launch URL with the API token. It now prints the message only, in the same wording the CLI already uses (core/cli/cli-oauth-navigation.ts):Tests
server-auto-open.test.tsnow asserts the exact one-line warning; the ENOENT case uses an error shaped like the real one (with a tokenizedspawnargs) and asserts the token does not reach the warning; a new case covers a non-Errorrejection.Verification
npm run local:gategreen.env -i PATH=/var/empty MCP_AUTO_OPEN_ENABLED=true node clients/launcher/build/index.js --web) now prints exactly the line above — no stack, nospawnargs.No UI change, so no screenshots.
🤖 Generated with Claude Code