Conversation
…/logs Same root cause as diegosouzapw#13436/diegosouzapw#13509/diegosouzapw#13568: open-sse/utils/cursorAgentCliVersion.ts imports node:fs/node:os/node:path (local Cursor CLI install detection), and those PRs already cut several edges reaching it. This is a further, previously-undiscovered edge: src/lib/oauth/constants/oauth.ts imports CURSOR_AGENT_CLI_VERSION from the full resolver, and oauth.ts turns out to be reachable from a very large share of the dashboard's client bundles (250+ pages/components in this repo, confirmed by the existing client-bundle guard test) via open-sse/config/providerModels.ts and open-sse/services/usage/supportedProviders.ts among others. Reproduced live: /dashboard/logs panicked with "the chunking context (unknown) does not support external modules (request: node:fs)" the first time Turbopack dev-mode compiled that page's client bundle. Same fix as the sibling PRs: the pin string moves to a new import-free cursorAgentCliVersionPin.ts (single source of truth); cursorAgentCliVersion.ts and oauth.ts both import it from there instead of duplicating it inline. cursorAgentCliVersion.ts itself is otherwise unchanged -- it still owns the full env -> local-install -> disk-cache -> pin resolution used by real Cursor CLI impersonation call sites. Also registers open-sse/utils/cursorAgentCliVersion.ts in the existing client-bundle-no-server-only-10692.test.ts guard's hardcoded SERVER_ONLY list, so this reproduces as a real test failure (250+ offending entry points) rather than only a live Turbopack panic, and any future edge reaching it fails CI immediately.
…nt chunk graph for /dashboard/logs) into dev/omniroute-dev-combined
…nt chunk graph for /dashboard/logs) into dev/omniroute-dev-combined
…nt chunk graph for /dashboard/logs) into dev/omniroute-dev-combined
|
Thanks for the fix — verified locally: the exact |
|
Added the changelog fragment — |
…nt chunk graph for /dashboard/logs) into dev/omniroute-dev-combined
|
Thanks for the fix! The |
Problem
/dashboard/logspanicked live in Turbopack dev mode:Root cause
Same underlying issue as #13436 / #13509 / #13568:
open-sse/utils/cursorAgentCliVersion.tsimportsnode:fs/node:os/node:pathfor local Cursor CLI install detection. Those three PRs already cut several edges reaching it (login page, combo control center, a CLI-tools page). This is a further, previously-undiscovered edge:src/lib/oauth/constants/oauth.tsimportsCURSOR_AGENT_CLI_VERSIONfrom the full resolver, andoauth.tsturns out to be reachable from a very large share of the dashboard's client bundles — confirmed via the repo's ownclient-bundle-no-server-only-10692.test.tsguard: registering the file as server-only and re-running the guard against the un-fixed source reports 250+ offending client entry points, viaopen-sse/config/providerModels.ts,open-sse/services/usage/supportedProviders.ts, and others./dashboard/logsis simply the first of those 250+ pages that Turbopack's lazy dev-mode compilation happened to reach.Fix
Same pattern as the sibling PRs: the pin string moves to a new import-free
cursorAgentCliVersionPin.ts(single source of truth).cursorAgentCliVersion.tsandoauth.tsboth import it from there instead of duplicating it inline.cursorAgentCliVersion.tsitself is otherwise unchanged — it still owns the full env → local-install → disk-cache → pin resolution used by real Cursor CLI impersonation call sites.Also registers
open-sse/utils/cursorAgentCliVersion.tsin the existingclient-bundle-no-server-only-10692.test.tsguard'sSERVER_ONLYlist, so this reproduces as a real, fast test failure rather than only a live Turbopack panic, and any future edge reaching it fails CI immediately (independent of whether #13436's broader Node-builtin-detection widening lands).Testing
client-bundle-no-server-only-10692.test.ts: confirmed it fails (250+ offending entries reported) against the un-fixed source with only theSERVER_ONLYregistration added, and passes clean with the fix.tests/unit/cursor-agent-cli-version.test.ts(6 tests) andtests/unit/cursor-login-pkce.test.ts(20 tests) — all pass unmodified.tsc -p tsconfig.typecheck-core.jsonclean./dashboard/logsbefore the fix, confirmed clean after.🤖 Generated with Claude Code