Repository navigation
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. ℹ️ Recent review info
Walkthrough
Mergeability Score: 🔵 Low · up to The new WSL retry could briefly overlap with a still-terminating probe after a timeout, potentially causing flaky detection or extra process activity. The change is otherwise mergeable with explicit owner confirmation that child termination is complete before retrying. 🚥 Pre-merge checks | ✅ 5
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/main/ipc/preflight-wsl-agent-detection.test.ts (1)
99-135: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winConsider adding a retry exhaustion test.
The three new tests cover single-retry success and non-retriable failure, but don't verify behavior when both attempts timeout (retry exhaustion). A test confirming
detectWslCommandsOnPathreturns an emptySetandexecFileAsyncMockis called exactly twice after two consecutiveETIMEDOUTrejections would close the gap.🧪 Suggested test for retry exhaustion
it('returns an empty set when both attempts timeout', async () => { const timeoutError = Object.assign(new Error('Timed out running wsl.exe'), { code: 'ETIMEDOUT' }) execFileAsyncMock.mockRejectedValue(timeoutError) const found = await detectWslCommandsOnPath({ distro: 'Ubuntu' }, ['grok']) expect(found).toEqual(new Set()) expect(execFileAsyncMock).toHaveBeenCalledTimes(2) })
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: d1b358ea-54b0-4880-a68a-aef5c16402c7
📒 Files selected for processing (4)
src/main/ipc/preflight-wsl-agent-detection.test.tssrc/main/ipc/preflight-wsl-agent-detection.tssrc/renderer/src/store/slices/detected-agents.test.tssrc/renderer/src/store/slices/detected-agents.ts
Store non-sticky empty was not enough: useDetectedAgents only called ensureLocal when detectedIds was null, so TabBar/QuickLaunch never re-probed after a WSL cold-start []. Mirror SSH/runtime one-shot empty remount retry for local surfaces (stablyai#8366 / stablyai#8391).
|
@coderabbitai review |
✅ Action performedReview finished.
|
b01b463 to
3557906
Compare
d869edb to
a499c6b
Compare
|
Rebased onto current
Ready for re-review / CI. |
|
Taking a look! |
|
Did a deep review of this cold-start empty-agent-list fix (#8366) — correctness, cross-platform, SSH/runtime, and perf/regression angles — plus ran the full test suite for the touched files. Verdict: solid. The three-part approach is correct and minimal, and it reuses the already-shipped non-sticky-empty pattern (
Things I specifically checked and confirmed are not problems: no re-probe/render loop (per-mount ref guard + module-scoped One change I pushed (commit Validation: 30/30 tests pass across the three touched test files, |
Store non-sticky empty was not enough: useDetectedAgents only called ensureLocal when detectedIds was null, so TabBar/QuickLaunch never re-probed after a WSL cold-start []. Mirror SSH/runtime one-shot empty remount retry for local surfaces (stablyai#8366 / stablyai#8391).
35fe8b0 to
8910a7f
Compare
Restack noteRebased onto latest
Ready for upstream review; community author cannot merge. |
289e263 to
5e1432e
Compare
|
Rebased this onto the latest main and pushed the review fixes here to help get it landed — CI should be green now. Thanks so much for the contribution! |
|
Status: still CLEAN and MERGEABLE against current main, with the full 22/22 check rollup green on 5e1432e3b — deliberately not pushing anything so that signal stays intact. None of the three touched files (detected-agents.ts, useDetectedAgents.ts, preflight-wsl-agent-detection.ts) has changed upstream since. The bug is still live on main: |
Store non-sticky empty was not enough: useDetectedAgents only called ensureLocal when detectedIds was null, so TabBar/QuickLaunch never re-probed after a WSL cold-start []. Mirror SSH/runtime one-shot empty remount retry for local surfaces (stablyai#8366 / stablyai#8391).
5e1432e to
c084b8a
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
c084b8a to
02dd71a
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
02dd71a to
4d49dcf
Compare
4d49dcf to
0371455
Compare
…8366) Empty [] is truthy, so a cold-start soft-fail permanently hid agents from the launcher until a context switch. Match remote/runtime non-sticky empty caching, clear empty detectPromise snapshots, and retry one WSL ETIMEDOUT.
Store non-sticky empty was not enough: useDetectedAgents only called ensureLocal when detectedIds was null, so TabBar/QuickLaunch never re-probed after a WSL cold-start []. Mirror SSH/runtime one-shot empty remount retry for local surfaces (stablyai#8366 / stablyai#8391).
A mounted launcher that already consumed the empty-retry slot on context A must still probe a distinct cached-empty context B, without A→B→A thrash. Co-authored-by: Cursor <cursoragent@cursor.com>
0371455 to
cfb1600
Compare
|
Thanks for working on this fix! This fixes empty or timed-out WSL agent detection, which runs from Windows by probing the distro through To switch: Settings → Experimental → WSL hosts, then Add a project → Add remote host → Add WSL distro. Existing Closing this since the new bridge replaces that code path; if the problem still shows up with WSL hosts on, please open an issue with details. |
An empty local/WSL agent-detection result no longer permanently suppresses later probes. Retry one timed-out WSL cold-start probe, retain the single attempt for non-timeout failures, and allow an empty local cache to be refreshed when a launch surface opens again. Each mounted surface retries each distinct local context once, so A -> B probes B while A -> B -> A does not loop. Closes #8366; #8336 remains independent and #8110 is outside this fix.
The rebase preserves current per-context caches, in-flight deduplication, stale-result fencing, SSH/runtime detection branches, and the current WSL process wrapper. Codex found the first candidate's constant local retry key would suppress the first retry in context B; Cursor added the A/B/A regression and corrected the key. The new empty-cache store test moved to the existing local-state test module to respect max-lines. Main's existing assertions are unchanged.
Validation: Cursor and Codex each passed the final 68 tests across 4 files, covering WSL timeout behavior, local caches and the rendered React hook harness. Node/Web non-composite typechecks and changed-file lint/format passed. No live Windows/WSL/SSH or rendered Orca Electron session was exercised.
Full repository suite/build and default composite typechecks were not run for this candidate. Known baseline TS2883 is not treated as passing; only the explicit non-composite checks above are claimed.
Cursor reviewed the final candidate; Codex independently reviewed the diff and raw checks. Reviewed commit:
4d49dcff6ceeb7763492d1a35b9c4477a506186b; rebased ontobba68b1bddf1276c8bd27ad4ca41efcbd4260321.