Skip to content

fix(wsl): confirmed homes for transcript lookups, WSL delete as a user act, localized carryover notice - #35810

Merged
nwparker merged 1 commit into
mainfrom
nwparker/wsl-e9-scanner-followup
Oct 29, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/wsl-e9-scanner-followup

Conversation

@nwparker

@nwparker nwparker commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 4 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​47 $\color{#cf222e}{\Huge{\mathbf{−}}}$​3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​44
Prod 18 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​32 $\color{#cf222e}{\Huge{\mathbf{−}}}$​10 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​22

Flag-off: applies with the flag on or off (bridge and WSL hosts alike).
User-risk: low.

  • An OpenCode/ZCode chat in a stopped or unconfirmed distro can't find its database until the distro is confirmed running. Before, the lookup was refused partway through, so the outcome is the same.
  • Deleting a WSL session in a stopped distro still starts it, because that's a user act. Afterwards, background readers re-check instead of trusting an older "stopped".
  • The "from the last scan" notice is now translated.

ELI5

These are three small follow-ups to #35729, Orca's fixes for its history scanner starting stopped WSL distros.

  • One lookup that reads inside WSL now only uses distros that are confirmed running.
  • Deleting a WSL session is treated as something the user did, so the rest of Orca knows the distro may now be running.
  • The notice shown when WSL couldn't be checked is translated into every supported language.

What Changed

  1. Transcript database lookups take only confirmed homes (native-chat/transcript-opencode-database.ts, ai-vault/cached-session-list.ts).
    • Before: they used getAiVaultWslHomeDirs(), which since fix(wsl): close the session scanner's post-stop boot gaps #35729 keeps the last-known-good list so that path checks survive a failed probe. But these lookups then read inside those homes, through gated reads that refused a stopped distro midway.
    • After: they use the new getAiVaultWslScanHomeDirs(), which returns confirmed homes only, so a stopped distro's home is absent.
    • getAiVaultWslHomeDirs() remains for path-only checks (session delete, subagent listing), and its comment now says so.
  2. A WSL delete is a user act (wsl-unc-delete.ts). tryDeleteWslUncPath runs its wsl.exe --exec rm inside runAsWslUserAct(distro). It may still start a stopped distro, because the user asked for the delete. When it settles, noteWslDistroWoken fires, so background reads stop trusting an earlier "stopped" result. This covers both callers: the AI Vault session delete and the file explorer's WSL delete.
  3. Localized carryover notice.

Why

  • Split home lookups by whether they read inside the home. Path checks must survive a failed probe; reads must not touch an unconfirmed distro. The two variants make that choice explicit at each call site.
  • Put the user act in the shared delete helper rather than in each caller, so every WSL delete gets it.
  • Reuse fix(i18n): code AI Vault scan issues and chat auto-name failures for the renderer #35750's coded-issue path rather than adding a second code field. One mechanism keeps old-client fallback and translation consistent.

Linked Issue

Internal WSL tracker, E9. These are follow-ups to #35729 from e9-reviewer (items 1 and 2) and d3-gate-audit (the localization low).

Visual Proof

N/A. The only visible change is the notice's language, which follows the app locale.

Testing

  • wsl-unc-delete.test.ts: the rm runs inside a user act for its distro, and noteWslDistroWoken('Ubuntu') fires. This fails without the change.

  • cached-session-list.test.ts: with an unconfirmed probe, scan homes are empty while path-check homes keep the last-known-good home. The carryover issue carries messageCode: 'wslSessionsFromLastScan'.

  • transcript-opencode-database.test.ts now drives the confirmed-homes variant.

  • ai-vault-scan-issue-copy.test.ts: the notice is English on the wire and Spanish when displayed in es.

  • The ai-vault, native-chat, wsl and right-sidebar copy suites pass (6,631 tests). One load flake passes when run alone.

  • Localization: verify:localization-catalogs, -catalog, -extraction, -coverage and -runtime-catalog all pass.

  • Load rule: pnpm tc, typecheck:ci, check:code-quality:changed, the anti-slop lint and the ast-grep gates.

  • I manually tested these changes locally

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

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: a new code value in the existing optional messageCode field. Older clients show the English message.
  • Platforms: Windows only in effect; SSH is unaffected.

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)

… delete as user act, localized carryover notice

OpenCode/ZCode transcript database lookups read inside the WSL homes
they get, so they take only confirmed homes. A WSL session delete runs
as a user act on its distro, so background readers stop trusting an
older stopped read. The carryover notice gets a stable code and
catalog copy in every locale.
@coderabbitai

coderabbitai Bot commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

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 16 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: 54d7f0ee-7cc1-4dfd-9adb-0a789195cf06
Commits

Reviewing files that changed from the base of the PR and between 6de2007 and 1de263f.

Files selected for processing: 22
  • src/main/ai-vault/ai-vault-wsl-session-carryover.ts
  • src/main/ai-vault/cached-session-list.test.ts
  • src/main/ai-vault/cached-session-list.ts
  • src/main/native-chat/transcript-opencode-database.test.ts
  • src/main/native-chat/transcript-opencode-database.ts
  • src/main/wsl-unc-delete.test.ts
  • src/main/wsl-unc-delete.ts
  • src/renderer/src/components/right-sidebar/ai-vault-scan-issue-copy.test.ts
  • src/renderer/src/components/right-sidebar/ai-vault-scan-issue-copy.ts
  • src/renderer/src/i18n/en-runtime-required.json
  • src/renderer/src/i18n/locales/de.json
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/pt.json
  • src/renderer/src/i18n/locales/ru.json
  • src/renderer/src/i18n/locales/tr.json
  • src/renderer/src/i18n/locales/zh-Hant.json
  • src/renderer/src/i18n/locales/zh.json
  • src/shared/ai-vault-scan-issue-copy.ts
  • 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 29, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable defects were found.

Summary

This PR separates WSL homes used for reads from homes used for path checks.

  • OpenCode transcript lookups use only confirmed WSL homes.
  • WSL deletes run as user actions for their distro.
  • The carried-session notice follows the app’s language.

No actionable issues were found. Tests were inspected, not run.

Intent acknowledged: nwparker explicitly states that transcript lookups remain unavailable until the distro is confirmed running. That behavior was not treated as a defect.

Reviews (1) · Last reviewed commit: "fix(wsl): scanner follow-ups: confirmed ..." · Reviewed by Greptile

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