Skip to content

Close both extension first-run gaps: download trigger + existing-install override - #30

Merged
TheValiantOne merged 1 commit into
mainfrom
feature/vortex-first-run
Aug 11, 2026
Merged

Close both extension first-run gaps: download trigger + existing-install override#30
TheValiantOne merged 1 commit into
mainfrom
feature/vortex-first-run

Conversation

@TheValiantOne

Copy link
Copy Markdown
Owner

Summary

Closes the two first-run gaps vortex-extension/README.md has 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.

  • Initial download trigger: the status dashboard tile's not-acquired state now shows "Download WitcherScriptMerger v0.6.2", driving 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 new DEFAULT_WSM_VERSION). Downloads stay an explicit user action — index.ts's no-eager-download policy is unchanged.
  • Existing-install override: "Use an existing install..." prompts for a WitcherScriptMerger*.exe path (validated: must exist and name a WSM executable with mcp support) and persists it via the new central resolver, wsmToolPath.ts (tool-path-override.txt in extension storage — same one-line-file convention as installed-version.txt, deliberately not Vortex Redux state given discoveredTool.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.ts is also the extraction mergeHistoryDashlet.ts's "known duplication, not an oversight" comment explicitly deferred to "a later unit": conflictScan, mergeHistoryDashlet, wsmStatusSummary, ensureWsmToolRegistered, and coexistenceGuard all resolve the exe through it now — and since ensureWsmToolRegistered feeds the discovered-tool registration that resolveAction reads, every consumer follows the same answer automatically. WSM_HEADLESS_EXE_NAME moved to storage.ts (re-exported from toolAcquisition.ts for compatibility) to avoid an import cycle. WsmStatusSummary gains an override-missing kind; scanWsmConflicts now 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 in conflictScan.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/build clean.

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

…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
@TheValiantOne
TheValiantOne merged commit 3e20b46 into main Aug 11, 2026
1 check passed
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