Fix CLI onboarding detection and launch routing#415
Conversation
There was a problem hiding this comment.
2 issues found across 11 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="app/src/main/hl/engines/pathEnrich.ts">
<violation number="1" location="app/src/main/hl/engines/pathEnrich.ts:127">
P2: Windows npm prefix handling adds the wrong directory (`prefix\\bin` instead of `prefix`), which can prevent custom-prefix global CLIs from being found.</violation>
</file>
<file name="app/src/renderer/onboarding/OnboardingApp.tsx">
<violation number="1" location="app/src/renderer/onboarding/OnboardingApp.tsx:503">
P2: Installation status is refreshed only once after 3s, so successful installs that finish later can remain undetected and leave onboarding UI in a stale state.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.
18c21ba to
664562d
Compare
| child = spawn(spawnSpec.command, spawnSpec.args, { | ||
| env: spawnSpec.env, | ||
| stdio: ['ignore', 'pipe', 'pipe'], | ||
| ...spawnSpec.spawnOptions, | ||
| }); |
664562d to
f07190c
Compare
|
@cubic review |
f07190c to
c813575
Compare
There was a problem hiding this comment.
2 issues found across 20 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="app/src/renderer/hub/ConnectionsPane.tsx">
<violation number="1" location="app/src/renderer/hub/ConnectionsPane.tsx:266">
P2: The install flow now sets a persistent error on any immediate `installed=false` probe, which can produce stale false-failure messages when CLI detection lags briefly after installer exit.</violation>
</file>
<file name="app/src/preload/shell.ts">
<violation number="1" location="app/src/preload/shell.ts:231">
P2: `engineInstall` preload typing is missing `stdout`/`stderr`, so renderer consumers can’t use installer output tails returned by IPC.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.
c813575 to
260075f
Compare
|
@cubic review |
There was a problem hiding this comment.
3 issues found across 21 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="app/src/renderer/hub/EnginePicker.tsx">
<violation number="1" location="app/src/renderer/hub/EnginePicker.tsx:221">
P1: `installing` is cleared immediately after one status probe, so delayed install detection can regress to a stale “Install” state instead of continuing to wait/poll.</violation>
</file>
<file name="app/src/main/identity/codexLogin.ts">
<violation number="1" location="app/src/main/identity/codexLogin.ts:60">
P1: `resolveCliLaunch` options are being dropped, so Windows shim launches can be mis-quoted and fail in the PTY login path. Preserve and apply `resolved.spawnOptions` when spawning.</violation>
</file>
<file name="app/src/main/hl/engines/installer.ts">
<violation number="1" location="app/src/main/hl/engines/installer.ts:173">
P2: When the process is killed by an external signal (not the timeout), `exitCode` is `null` and `signal` is set, but the error message interpolates `exitCode` directly, producing "installer exited null". Include the signal in the fallback message for a meaningful error.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.
260075f to
2940598
Compare
|
@cubic review |
2940598 to
a54345f
Compare
There was a problem hiding this comment.
2 issues found across 21 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="app/src/renderer/onboarding/OnboardingApp.tsx">
<violation number="1" location="app/src/renderer/onboarding/OnboardingApp.tsx:339">
P2: Using a single `installingEngine` value causes incorrect install-button state when installs overlap, so one provider can appear idle while its installer is still running.</violation>
<violation number="2" location="app/src/renderer/onboarding/OnboardingApp.tsx:1171">
P3: Codex install UI text still tells users to run a manual npm command, but this button now launches the installer automatically.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.
Codex and Claude onboarding now separate CLI installation from authentication, so missing CLIs show install actions instead of sign-in prompts. CLI launches use one high-level router that enriches GUI PATHs on macOS/Linux/Windows, includes Codex.app bundle locations on macOS, and resolves Windows npm shims before spawning. Installer actions now run in the background and resolve from the installer process close event. The result includes completion status, exit code/signal, output tails, and a post-exit install probe; onboarding keeps polling after installer completion so delayed CLI detection still updates the UI. Constraint: Electron GUI launches can miss user shell PATH entries, Codex.app can ship its CLI inside the macOS app bundle, and Windows npm-installed CLIs often resolve to .cmd or .ps1 shims. Rejected: Keep per-call Windows launch fixes | leaves Codex PTY login and future CLI calls easy to miss. Rejected: Poll with fixed timers after install start | does not distinguish slow installs, failed installs, or hung installers. Confidence: high Scope-risk: moderate Tested: npm run test Tested: task typecheck Tested: npm run lint -- --quiet Tested: git diff --check origin/main...HEAD Not-tested: Manual Windows/Linux Electron installer flow on physical machines Co-authored-by: Rich <admin@atomtan.studio>
a54345f to
ce4fa4f
Compare
|
@cubic review |
Summary
Verification
Notes
Manual full Electron installer flows on physical Windows/Linux machines were not run.