fix: Image tag as select (Stable/Beta/Custom), rebuilt on vendor change (studio#128) - #138
Merged
Merged
Conversation
…tudio#128) Brett's live-testing report: switching vendor didn't visibly update the Image tag field, and there was no way to enter a full custom image URL. The old implementation silently mutated one text input's `.value` on vendor change — easy to miss, and offered no structured way to pick "give me a full custom URL" vs. "use what GHCR resolved". Replaces the free-text `<input id="deploy-image">` with: - `<select id="deploy-image-select">`, rebuilt from scratch on every vendor change from `resolve_vendor_image_tags`'s Stable/Beta results (option value = the real resolved tag, label shows which is which). Rebuilding the whole list (not mutating one value) makes the change visually obvious. - A trailing "Custom…" option that reveals a `deploy-image-custom-wrap` text field (same `[hidden]` CSS-specificity fix pattern as #137) for pasting a full image URL. `currentImage()` resolves whichever is actually selected; the deploy submit handler now calls it instead of reading the old input directly. Verification: npm run typecheck / test (100/100) / build all clean. Rust/Tauri/MCP untouched — this is a pure console-side change. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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
Two bug reports from Brett live-testing the New Fleet wizard:
<input id="deploy-image">had its.valuesilently mutated on vendor change, easy to miss visually.Change
console/index.html:<input id="deploy-image">→<select id="deploy-image-select">+ adeploy-image-custom-wraplabel/input pair, hidden unless "Custom…" is picked.console/src/deploy.ts:loadVendorImage()now rebuilds the<select>'s option list from scratch on every vendor change (viaresolve_vendor_image_tags) — Stable and/or Beta as real options (value = resolved tag), plus an always-present "Custom…" sentinel. Rebuilding the whole list (not mutating one field's value) makes the vendor-change effect visible.applyImageMode()toggles the custom-URL field's visibility (reuses the.compose-form label[hidden]CSS-specificity fix from fix: chat token/secret visibility bug + ACP token field (studio#132/#136) #137 — no new CSS needed, same class).currentImage()resolves whichever is actually active (resolved tag or the free-text custom URL); the deploy submit handler now calls it instead of reading the old input directly.No Rust/Tauri/MCP changes — pure console-side fix.
Test plan
npm run typecheckcleannpm test— 100/100 passingnpm run buildclean🤖 Generated with Claude Code