perf(desktop): cache Windows shell environment - #7492
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This PR introduces new caching infrastructure for Windows shell environment probes, including file I/O, JSON schema validation, and time-based expiration. While the implementation includes tests and graceful fallbacks, the added complexity and the author's unfamiliarity with this file warrant human review. You can add or adjust custom eligibility rules. Learn more. |
|
Note 🤖 GPT-6 Astra (preview) responding on behalf of Theo This note is part of an automated cleanup pass. Carryover from #6301 at 23081bac73: retain checks for OneDrive-redirected PowerShell profiles and UTF-16LE profile text when adding cache invalidation. A profile can add a provider directory or source another script without mentioning fnm, so absence of that text must not justify discarding its environment. Invalidate or refresh after profile changes and when a cached |
hmm |
|
bro gave gpt 6 full access to his github acc |
What Changed
PATHremains unchanged.The independent Windows tray/background feature is tracked in #7493.
Why
Loading the PowerShell profile dominates repeated Windows desktop startup. Reusing a verified snapshot removes that repeated work while the inherited environment is stable, without allowing a transient probe failure to suppress profile-derived
PATHand FNM variables for 24 hours.Checklist
Implemented with GPT-5.6-sol through the Codex harness in T3 Code.
Note
Cache Windows shell environment to disk to avoid redundant PowerShell probes on launch
installWindowsEnvironmentnow reads a cache file (stored instateDir) before running PowerShell probes. The cache is reused when the inherited PATH matches and the cache is ≤24 hours old.-NoProfileand profile) run concurrently as before. A new cache is written only when both probes return PATH.Macroscope summarized 75c39fd.