Skip to content

fix(desktop): check local models on the selected install drive - #233

Draft
shiroha777777 wants to merge 1 commit into
simplexai-labs:mainfrom
shiroha777777:fix/inspect-selected-install-location
Draft

shiroha777777 wants to merge 1 commit into
simplexai-labs:mainfrom
shiroha777777:fix/inspect-selected-install-location

Conversation

@shiroha777777

@shiroha777777 shiroha777777 commented Nov 18, 2026 •

Copy link
Copy Markdown

The model check used the default home even after choosing another install folder.

Pass the selected home to the probe and recheck when it changes. Ignore stale results before checking the latest selection.

Validated in WSL: all 390 desktop tests, typecheck, lint, 9 packaging tests, and all daemon builds passed. The 3 new regression cases fail before the fix. Documentation checks also pass.

The repository gate still has 2 failures in unchanged prepare-web-dev port tests, reproduced on both base and head in this WSL1 environment.

@linger-review linger-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approve with nits (1 P3)

Scope: base main, merge base 841a8713, 1 commit, 2 files reviewed (apps/desktop/src/main/local-server.ts, local-server.test.ts) at 0615ddda. Loaded ponytail-review. Did not load coderbook or karpathy-guidelines; I applied their review passes, commit conventions and lean/surgical-change criteria from the skill brief. Ran in a separate session.

Findings

P3

  • apps/desktop/AGENTS.md:139: the doc still says the model check is "installer.js --inspect, run once as the setup window opens". That is no longer true. The check now runs with --home set to the selected install location, and chooseLocation reruns it when the location changes (local-server.ts:569-570, :625-630). Someone reading the doc would still think the check always targets the default home, which is the bug this PR fixes. Fix: add one clause, for example: "against the selected install location, and again when the person picks another folder".

Verified as fine

  • Stale result while a check is running. If the folder changes during a check, recheck() returns early because the state is checking. The completion handler then compares the home it captured with #location ?? #home, throws away the old result and starts a new check. Switching from A to B and back to A during one check keeps the A result, which is correct.
  • Abort path. A check aborted by stop() now leaves #check as checking without emitting local-server.changed. The only abort is in stop() at shutdown, so nothing is left visibly stuck.
  • Install while a recheck is pending. If an install has already started, inspect() is skipped and #check becomes unchecked. #install then adds no model disk bytes to the location check (local-server.ts:906-913). The old code would have used the old folder's result instead, so this is no worse.
  • Recheck guard. chooseLocation triggers a recheck only when the location actually changes and a check has already run. A folder that fails checkLocation keeps the previous location and does not trigger a recheck.
  • checkByok and #install already used #location ?? #home, so #inspect now matches them. #inspect has no other callers.
  • Test. I put the base version of local-server.ts under the PR's test: the new test fails there and passes at the head. It covers switching to a folder mid-check and switching back.
  • Repo rules. The diff is English-only, adds no new env vars and touches no contracts. Every changed line traces to the stated fix.

Process notes

  • The branch is up to date with main and has no merge or fixup commits.
  • gh pr checks reports no checks for this branch, so CI has not run. Get CI to run before merging.

CI

No CI checks were reported. Locally, within the review budget:

  • vitest run src/main/local-server.test.ts -t "install location|model check|recheck|inspect": 6 passed.
  • The new test against the base local-server.ts: fails, as expected.
  • pnpm --filter @linger/desktop typecheck: passed.

I did not run the full desktop suite or make check.

Automated review by Claude Code


Automated review of 0615ddd by Claude Code.

@shiroha777777
shiroha777777 marked this pull request as draft November 18, 2026 17:55
@shiroha777777 shiroha777777 reopened this Nov 19, 2026
@shiroha777777
shiroha777777 force-pushed the fix/inspect-selected-install-location branch from 0615ddd to 5c53377 Compare November 19, 2026 05:39
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