Skip to content

fix(wsl-mover): say a move waits for a project coming back, not another move - #35406

Merged
nwparker merged 2 commits into
mainfrom
nwparker/wsl-move-undo-running-refusal
Oct 28, 2026
Merged

nwparker merged 2 commits into
mainfrom
nwparker/wsl-move-undo-running-refusal

Conversation

@nwparker

@nwparker nwparker commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 5 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​14 $\color{#cf222e}{\Huge{\mathbf{−}}}$​3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​11
Prod 9 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​31 $\color{#cf222e}{\Huge{\mathbf{−}}}$​4 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​27

ELI5

While a moved project is coming back to this computer, Orca now refuses to start a move of the same WSL distro (#35369). The refusal used the "a move is already running" message, which is wrong: nothing is moving. It now says "A project is coming back from Ubuntu. Try again once that finishes." It also gets its own code, so the automatic mover and telemetry can tell the two cases apart.

What Changed

Before: starting a move of a distro while one of its projects was being brought back showed "A move into Ubuntu is already running. Wait for it to finish, then try again." Telemetry recorded it as already_running.

After: the dialog shows "A project is coming back from Ubuntu. Try again once that finishes." It is reported as wsl_move_undo_running (telemetry undo_running). A real concurrent move still shows the old message.

Mechanism:

  • A new WslMoveRefusalCode, wsl_move_undo_running.
  • A new wslMoveClaimRefusal(distro) in wsl-move-running-moves.ts says why claimWslMoveRun just returned null: the distro's undo mark, or another move.
  • The driver (moveProjectsToWslHost) and the orchestrator's settling preview return that code.
  • The orchestrator maps it to { next: 'stay' } (retry on the next trigger), like wsl_move_already_running.
  • WSL_MOVE_REFUSAL_VALUES gains undo_running. The existing type check fails the build if a refusal code has no telemetry value.
  • wsl-move-copy.ts has the new message (wslMove.refusal.undoRunning).

Why

Why a companion function rather than changing claimWslMoveRun's return type. claimWslMoveRun returns the run or null, and 13 call sites (code and tests) rely on that. Making it return a refusal object would turn every expect(claim).not.toBeNull() into a silent pass. The companion reads the same registry synchronously, right after the failed claim, so it can't disagree.

Locales: the wslMove.refusal copy exists only in en and de today. The other nine locales have no mover refusal strings at all and fall back to English for the whole dialog. So the new string is in en and de, matching its siblings. Adding just this one string to the other nine would mix languages inside one dialog.

Flag-off: moves and undo exist only behind the WSL hosts gate. With ORCA_INTERNAL_WSL_HOSTS unset, no undo mark is ever taken, so this code is never produced.

User-risk: none to behaviour. Only the wording and the telemetry value of one refusal change.

Linked Issue

Follow-up to #35369 (merged), from e9-reviewer’s copy note.

Visual Proof

N/A. One refusal's text in the existing move dialog; covered by the dialog's every-refusal-has-a-message test.

Testing

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

  • wsl-move-release-here-move-race.test.ts: the orchestrator's move and settling preview of the distro mid-undo now return wsl_move_undo_running.

  • updater-wsl-move-install-hold.test.ts: wslMoveClaimRefusal names the undo for the undone distro, and a move for a distro held by a move.

  • wsl-move-orchestrator-transitions.test.ts: wsl_move_undo_running → stay.

  • WslMoveDialog.test.tsx: the new code has its own distinct message.

  • wsl-move-telemetry.test.ts: it is reported as undo_running.

Checks run: pnpm tc, pnpm run typecheck:ci, 87 test files (837 tests passing: every moving-wsl-projects, mover IPC, mover telemetry, install-hold and move-dialog test), verify-localization-catalogs, verify-localization-extraction, pnpm run check:code-quality:changed, anti-slop oxlint, oxlint, ast-grep scan and gates.

Review

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

  • Wire compatibility: refusal codes stay inside this desktop (driver → renderer through local IPC), so no remote peer sees the new code.
  • SSH and folder workspaces: not affected.

Status

Ready for review.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

@nwparker

Copy link
Copy Markdown
Contributor Author

STATUS: ready. Head 002d5c8, stacked on #35369 (8932eae); I'll rebase onto main when it merges. New refusal code wsl_move_undo_running with its own dialog copy (en and de; the other nine locales have no wslMove.refusal strings), wslMoveClaimRefusal for the reason, orchestrator → stay, telemetry undo_running. Checks: pnpm tc, typecheck:ci, 87 test files (837 tests passing), localization, code-quality, anti-slop, oxlint, ast-grep scan and gates. Review requested from e9-reviewer.

@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 20 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bbdf26f2-36b1-4043-add3-85c53df1d88d
Commits

Reviewing files that changed from the base of the PR and between a360942 and 00b867e.

Files selected for processing: 14
  • src/main/ipc/wsl-move-release-here-move-race.test.ts
  • src/main/persistence/moving-wsl-projects/wsl-move-driver-preview.ts
  • src/main/persistence/moving-wsl-projects/wsl-move-driver.ts
  • src/main/persistence/moving-wsl-projects/wsl-move-orchestrator-transitions.test.ts
  • src/main/persistence/moving-wsl-projects/wsl-move-orchestrator-transitions.ts
  • src/main/persistence/moving-wsl-projects/wsl-move-running-moves.ts
  • src/main/telemetry/wsl-move-telemetry.test.ts
  • src/main/updater/updater-wsl-move-install-hold.test.ts
  • src/renderer/src/components/wsl-move/WslMoveDialog.test.tsx
  • src/renderer/src/components/wsl-move/wsl-move-copy.ts
  • src/renderer/src/i18n/locales/de.json
  • src/renderer/src/i18n/locales/en.json
  • src/shared/telemetry-wsl-move-event-schemas.ts
  • src/shared/wsl-move/wsl-move-driver-types.ts
Walkthrough

The move flow now returns wsl_move_undo_running when an undo is active for the requested distro. The orchestrator, telemetry schema, and renderer handle the new refusal code. English and German messages explain that the user can retry after the return operation finishes.

Priority: Low

Merge Risk: Low · previous review a3609

Regenerate the English runtime catalog before merging; otherwise localization validation fails even though English currently falls back to the inline message.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly identifies the primary change: correcting the WSL move refusal message when a project is coming back. It is concise and specific.
Description check Passed The description follows the required template and explains the user-visible change, mechanism, rationale, linked issue, visual proof, testing, compatibility notes, and checklist status. It documents t…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description follows the required template and explains the user-visible change, mechanism, rationale, linked issue, visual proof, testing, compatibility notes, and checklist status. It documents that manual testing was not performed and that some broad commands remain unchecked, but the description is otherwise substantially complete.

Full details: Docstring Coverage

Explanation

Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 5 functions across 12 files. (2 skipped: 2 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches: 💡 2
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge; it changes the refusal message and telemetry while preserving the existing move guard.

Summary

The PR gives moves blocked by an undo their own refusal code and message.

  • Moves blocked by a project coming back get their own refusal reason.

Reviews (3) · Last reviewed commit: "Merge branch 'main' into nwparker/wsl-mo..." · Reviewed by Greptile

@nwparker
nwparker force-pushed the nwparker/wsl-move-undo-running-refusal branch from 002d5c8 to a360942 Compare October 28, 2026 22:15
@nwparker

Copy link
Copy Markdown
Contributor Author

STATUS: rebased onto main 1510f46 (#35369 merged). Head a360942; range-diff identical to 002d5c8. tc and the 5 affected test files pass. Not merged.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 85ce18b3-93d2-4408-a935-8e7a7b1aa6c4
Commits

Reviewing files that changed from the base of the PR and between f12e12f and a360942.

Files selected for processing: 14
  • src/main/ipc/wsl-move-release-here-move-race.test.ts
  • src/main/persistence/moving-wsl-projects/wsl-move-driver-preview.ts
  • src/main/persistence/moving-wsl-projects/wsl-move-driver.ts
  • src/main/persistence/moving-wsl-projects/wsl-move-orchestrator-transitions.test.ts
  • src/main/persistence/moving-wsl-projects/wsl-move-orchestrator-transitions.ts
  • src/main/persistence/moving-wsl-projects/wsl-move-running-moves.ts
  • src/main/telemetry/wsl-move-telemetry.test.ts
  • src/main/updater/updater-wsl-move-install-hold.test.ts
  • src/renderer/src/components/wsl-move/WslMoveDialog.test.tsx
  • src/renderer/src/components/wsl-move/wsl-move-copy.ts
  • src/renderer/src/i18n/locales/de.json
  • src/renderer/src/i18n/locales/en.json
  • src/shared/telemetry-wsl-move-event-schemas.ts
  • src/shared/wsl-move/wsl-move-driver-types.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.

"startFailed": "Orca lost contact with the move. Open this dialog again to see where it stands.",
"unavailable": "Moving projects to a WSL host is not available in this window.",
"alreadyRunning": "A move into {{distro}} is already running. Wait for it to finish, then try again.",
"undoRunning": "A project is coming back from {{distro}}. Try again once that finishes.",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor · Functional Correctness · Quick win

Supported by static analysis

Script executed:

rg -n -C 4 'en-runtime-required|generate-runtime-required-english-catalog|verify-localization|undoRunning' src/renderer/src/i18n config/scripts package.json
git diff --no-ext-diff --unified=20 1510f46258db3739f7b3750977deceed937108a2 a36094223b3362c3c214cedfba40f99d2f086e6d -- src/renderer/src/i18n/locales/en.json src/renderer/src/i18n/en-runtime-required.json
sed -n '70,140p' src/renderer/src/i18n/i18n.ts

Repository: stablyai/orca

Length of output: 36872


Update the generated English runtime catalog.

src/renderer/src/i18n/locales/en.json adds wslMove.refusal.undoRunning, but src/renderer/src/i18n/en-runtime-required.json does not contain it. The WSL refusal path calls translate() with the distro interpolation option, so the runtime catalog generator requires this key in the eager English resource. Without it, English currently relies on the inline fallback and the localization catalog validation fails. Regenerate en-runtime-required.json with pnpm run sync:localization-runtime-catalog.

@nwparker
nwparker merged commit 797bbaa into main Oct 28, 2026
81 of 83 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant