Close both extension first-run gaps: download trigger + existing-install override - #30
Merged
Merged
Conversation
…all override The two gaps the README documented since Unit L: - "Download WitcherScriptMerger v0.6.2" on the status tile's not-acquired state now drives acquireWsmTool (the full download/verify/extract/register pipeline) against the real GitHub release, pinned via a single DEFAULT_WSM_VERSION constant (githubRelease.ts). Downloads remain an explicit user action, never a startup side effect. - "Use an existing install..." stores an override exe path via the new central resolver (wsmToolPath.ts, persisted as tool-path-override.txt in extension storage, same one-line-file convention as installed-version.txt). Override wins over the managed install; a stale override is its own surfaced state (with clear/re-choose actions on the tile), never a silent fallback to a different binary. wsmToolPath.ts is also the extraction mergeHistoryDashlet.ts's "known duplication, not an oversight" comment promised: conflictScan, mergeHistoryDashlet, wsmStatusSummary, ensureWsmToolRegistered, and coexistenceGuard all resolve through it now, so the discovered-tool registration (which resolveAction reads) follows the same answer automatically. WSM_HEADLESS_EXE_NAME moved to storage.ts to avoid an import cycle (re-exported from toolAcquisition.ts for compatibility). New wsmToolPath.test.ts (6 tests) + override-precedence coverage in conflictScan.test.ts; 208 unit / 222 with integration, all green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GXAuGMLB44T5Zv5o5ZzKah
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.
Summary
Closes the two first-run gaps
vortex-extension/README.mdhas documented since Unit L — the ones that would leave a fresh Nexus user with no in-app way to get a WSM binary at all.acquireWsmTool(the existing, integration-tested download/verify/extract/register pipeline) against the real GitHub release. The version is pinned in one place (githubRelease.ts's newDEFAULT_WSM_VERSION). Downloads stay an explicit user action —index.ts's no-eager-download policy is unchanged.WitcherScriptMerger*.exepath (validated: must exist and name a WSM executable withmcpsupport) and persists it via the new central resolver,wsmToolPath.ts(tool-path-override.txtin extension storage — same one-line-file convention asinstalled-version.txt, deliberately not Vortex Redux state givendiscoveredTool.ts's documented persistence caveats). An override wins over the managed install; a stale override is its own surfaced state on the tile (broken path shown, with "Clear this path" / "Choose a different path..." actions) — never a silent fallback to a different binary than the user chose.The centralization
wsmToolPath.tsis also the extractionmergeHistoryDashlet.ts's "known duplication, not an oversight" comment explicitly deferred to "a later unit":conflictScan,mergeHistoryDashlet,wsmStatusSummary,ensureWsmToolRegistered, andcoexistenceGuardall resolve the exe through it now — and sinceensureWsmToolRegisteredfeeds the discovered-tool registration thatresolveActionreads, every consumer follows the same answer automatically.WSM_HEADLESS_EXE_NAMEmoved tostorage.ts(re-exported fromtoolAcquisition.tsfor compatibility) to avoid an import cycle.WsmStatusSummarygains anoverride-missingkind;scanWsmConflictsnow refuses to spawn with a clear error when nothing usable resolves, instead of blindly spawning a nonexistent path.Tests
New
wsmToolPath.test.ts(precedence, stale-override no-fallback policy, persistence round trip, blank-file/no-op-clear edges) plus override-precedence coverage inconflictScan.test.ts; existing fixtures updated to stage real fake exes now that resolution actually checks existence. 208 unit / 222 with integration (real spawned Headless processes),typecheck/lint/buildclean.The remaining UI-render surface (actually clicking the new tile buttons inside a real Vortex) stays manual — no jsdom in this repo's test setup, same as every prior dashlet unit; the handlers delegate to the already-tested pipeline functions.
🤖 Generated with Claude Code
https://claude.ai/code/session_01GXAuGMLB44T5Zv5o5ZzKah