Repository navigation
fix(desktop): check local models on the selected install drive - #233
Draft
shiroha777777 wants to merge 1 commit into
Draft
shiroha777777 wants to merge 1 commit into
shiroha777777 wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
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--homeset to the selected install location, andchooseLocationreruns 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 ischecking. The completion handler then compares thehomeit 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#checkascheckingwithout emittinglocal-server.changed. The only abort is instop()at shutdown, so nothing is left visibly stuck. - Install while a recheck is pending. If an install has already started,
inspect()is skipped and#checkbecomesunchecked.#installthen 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.
chooseLocationtriggers a recheck only when the location actually changes and a check has already run. A folder that failscheckLocationkeeps the previous location and does not trigger a recheck. checkByokand#installalready used#location ?? #home, so#inspectnow matches them.#inspecthas no other callers.- Test. I put the base version of
local-server.tsunder 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
mainand has no merge or fixup commits. gh pr checksreports 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
marked this pull request as draft
November 18, 2026 17:55
shiroha777777
force-pushed
the
fix/inspect-selected-install-location
branch
from
November 19, 2026 05:39
0615ddd to
5c53377
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.