fix: preserve web backend setup hint#835
Conversation
Size Report
Startup median (7 runs, lower is better):
Top changed chunks:
|
|
Reviewed against #834 and the web backend notes. The fix now preserves |
thymikee
left a comment
There was a problem hiding this comment.
Looks correct and tightly scoped. Spreading ...(appError.details ?? {}) before overriding cmd/args/hint is what preserves the version/installDir details, and routing both the TOOL_MISSING and COMMAND_FAILED branches through the shared webBackendHint helper keeps the "use the mapped hint when present, else fall back to the doctor hint" behavior consistent. The Node-22 runtime-override regression test pins exactly the detail that was being lost (the Node 24+ hint plus version/installDir), and the helper restores the original process.version in a finally, so it won't bleed into other tests.
One minor thought: since webBackendHint only ever reads error.details?.hint, it could take the details object directly rather than the whole AppError — trivial, take it or leave it. LGTM.
Generated by Claude Code
Summary
Preserve managed backend details when the web provider wraps missing agent-browser failures, so Node <24 users keep the actionable Node 24+ hint instead of seeing only the generic setup hint.
Closes #834
Touched files: 2. Scope stays inside the web provider and its regression coverage.
Validation
pnpm exec vitest run src/platforms/web/agent-browser-provider.test.ts src/platforms/web/agent-browser-tool.test.ts
pnpm check:quick