Repository navigation
fix(instances): fix selection loop and require Tailscale for connect - #249
Merged
Merged
Conversation
The instance picker used fixed index math that assumed a "Main:" section was always present. When an application only had preview-labelled pods, every item was treated as a section header and the prompt looped forever. Map each item to its pod (or None for headers) instead, and default the cursor to the first selectable pod. The Livebook URL is only reachable over Tailscale, so confirm the user is connected before provisioning, and mention Tailscale in the connectivity test and failure messages. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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
Fix: instance picker loops forever when there are no main pods
wukong application instances connectbuilt the picker list with aMain:and aPreview:header, then used fixed index math to skip headers:When an application has only
preview-labelled pods (e.g.mv-platformProd / Green),main_pods.len() + 1 == 1, so the only real pod was also treated as a header and the prompt re-appeared on every selection. If it had exited,preview_pods[idx - main_pods.len() - 2]would have underflowed.Each picker item is now paired with its pod (
Nonefor headers), so selection no longer depends on index math. The cursor also defaults to the first selectable pod instead of the header.Feature: Tailscale confirmation
The Livebook URL is only reachable over Tailscale. Without it, the connectivity test spins for ~100s and then tears the instance down.
Test plan
cargo fmt,cargo clippy(no new warnings)--features prodbuild againstmv-platformProd / Green (preview-only pods): picker selects the pod, no loop🤖 Generated with Claude Code