Skip to content

feat: mise integration for runtime resolution and auto-detection - #29

Merged
andybarilla merged 12 commits into
mainfrom
task/013-mise-integration
Mar 8, 2026
Merged

andybarilla merged 12 commits into
mainfrom
task/013-mise-integration

Conversation

@andybarilla

Copy link
Copy Markdown
Owner

Summary

  • RuntimeResolver (internal/mise/) — shared service that shells out to mise CLI for binary resolution, version detection, and installation; gracefully falls back to system PATH when mise is unavailable
  • Auto-detection — Add Site modal detects PHP/Node versions from .mise.toml / .tool-versions and pre-fills form fields (debounced, respects manual overrides)
  • Runtime warnings — SiteCard and table view show warning badges for missing runtimes with an Install button when mise is available
  • Settings status — Runtime Manager card shows mise detected/not-found status with version and install link

Test plan

  • 20 Go tests for RuntimeResolver (Available, Which, WhichVersion, Detect, Install, IsInstalled, ListInstalled + edge cases)
  • 3 Go tests for Core integration (DetectSiteVersions, MiseStatus, CheckRuntimes)
  • 4 frontend tests for auto-detection (debounce, pre-fill, hint, manual override preservation)
  • 4 frontend tests for Settings mise status (detected badge, version, not-found, install link)
  • 4 frontend tests for runtime warning badges (missing+mise, missing+no-mise, installed, no warning)
  • All 115 frontend tests passing, all Go internal tests passing

🤖 Generated with Claude Code

andybarilla and others added 12 commits March 8, 2026 13:33
Introduce the internal/mise package with:
- Executor interface for testable mise CLI abstraction
- cliExecutor implementation calling real mise binary
- RuntimeResolver with cached Available() and Which() with LookPath fallback
- Stub implementations for WhichVersion, Detect, Install, IsInstalled, ListInstalled

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add RuntimeResolver to Core struct with optional injection via Config.
Expose DetectSiteVersions, MiseStatus, CheckRuntimes, and InstallRuntime
methods. Add MiseInfo and RuntimeStatus types for the API surface.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…allRuntime bindings

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…dd Site modal

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Shows Runtime Manager card with mise availability status between
Appearance and About cards. Displays version when detected, or
install guidance with link when not found.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… views

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… core tests, browse detection)

- IsInstalled now uses ListInstalled + exact/prefix matching instead of
  strings.Contains on raw output, preventing false positives (e.g. "8.3"
  matching "8.3.1")
- Core tests use a stub mise executor via NewWithExecutor instead of the
  real CLI, making them environment-independent
- handleBrowse in AddSiteForm now calls handlePathInput() to trigger
  auto-detection after selecting a directory

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@andybarilla
andybarilla merged commit 9609139 into main Mar 8, 2026
3 checks passed
@andybarilla
andybarilla deleted the task/013-mise-integration branch March 8, 2026 20:12
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