Repository navigation
Conversation
A port of boxctl's tui (boxctl-io/boxctl-cli#130, #131) onto onctl's provider interface. A header with an info block, the view's hotkeys and a logo; one bordered table per view (:vms, :images, :sizes), switched with a `:` command and filtered with `/`; describe (d) and json (y) pages; a y/N dialog for destroy; flash messages on the crumbs line. The list refreshes itself every 5s. Every action is what the subcommand does, nothing more: - s runs `onctl ssh <vm>` as a child process (the alternate screen is left for it), with the resolved --provider and any root flags passed along; p is provider.Pause by name, r is CreateSSHKey + Resume as resume.go does it, ctrl-d is provider.Destroy after destroy's question - c is a form (name, image, type -- typed, or walked through what the provider's images/sizes list) that runs `onctl create` in the foreground with those flags, so create's own output and waits show as usual - pause is refused on a paused VM, resume on a live one, and nothing runs twice while an action is in flight ls's running/paused partition moves into listVMs so the tui and ls agree on which VMs count as paused. The provider code's log lines are kept off the screen while the tui runs (ONCTL_LOG sends them to a file whose name is printed on exit). boxctl-only views and keys (urls/expose, backups/restore, keep, goal logs) have no onctl equivalent and are left out. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
cdalar
enabled auto-merge
October 21, 2026 15:05
Both jobs run under a 5-minute cap on the self-hosted runner. On main the build already takes 4-5 minutes with a warm module cache, and a pull request that changes go.sum starts cold: ~90s more for vet to download and compile the modules, which is over the cap, so the job is cancelled before its post step can save the cache, and every rerun is cold again. Lint finished in 2 minutes but was cancelled while its post step was still uploading the 380 MB module cache. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012kqmyZGSj54mkMfVDcWhUU
… say so - The destroy dialog took enter as yes. `onctl destroy`'s own prompt is [y/N], so a reflexive enter no longer destroys a VM: y alone does. - The 5s tick re-listed the images/sizes catalog whenever that view was open (a few API calls each on some providers). They are listed when the view opens and on R; the tick lists the VMs only. - A catalog whose listing failed showed "Loading…" for ever, with the error flashed again every tick. The table now says why it is empty and that R retries. - R was both refresh and the sizes view's ARCH sort letter, and refresh won, so ARCH could not be sorted; it sorts on A now. - `onctl ssh` exits with the remote shell's status, so a session that ended with `exit 1` was flashed as a failed ssh. A non-zero exit with nothing on stderr is left alone. - The "Refreshed" line listed in-flight actions in map order, which reshuffled them on every spinner frame; sorted. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012kqmyZGSj54mkMfVDcWhUU
The onctl-2 pool has been provisioning VMs 8-14 minutes late since about 14:20 UTC today and losing runners mid-job (the edge build on main, then this PR's Build twice), so lint, build, vuln, the docs test deployment, Dependabot auto-merge and Snyk go to ubuntu-latest until the pool is looked at. The release and docs-deploy workflows are left on onctl-2. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012kqmyZGSj54mkMfVDcWhUU
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1210 +/- ##
==========================================
+ Coverage 41.25% 45.70% +4.45%
==========================================
Files 69 74 +5
Lines 7560 8554 +994
==========================================
+ Hits 3119 3910 +791
- Misses 4441 4643 +202
- Partials 0 1 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
What
A port of boxctl's
tui(boxctl-io/boxctl-cli#130, #131) onto onctl's provider interface. Same stance as there: every action is what the subcommand does, nothing else in the CLI changes.<key> labelcolumns, and anonctllogo on the right. Hidden on terminals under 18 lines.:prompt::vms(default),:images,:sizes, plus:create,:ssh <vm>,:help,:q.:vms webopens filtered.VMs(all)</filter>[count], sorted column marked↑/↓, cursor row highlighted, coloured STATE column,0/1/2for all/running/paused (ls's two sections).shift+lettersorts by that column.enter/ddescribe (akubectl describelayout: IP, type, image, location, SSH port, created, cost; follows the VM on refresh),ythe VM as JSON,?help. Esc pops; crumbs at the bottom show the stack.srunsonctl ssh <vm>as a child process (the alternate screen is left for it) with the resolved--providerand any root flags passed along;pisprovider.Pauseby name;risCreateSSHKey+Resumeas resume.go does it;ctrl-disprovider.Destroyafter destroy's question. Pause is refused on a paused VM, resume on a live one, and nothing runs twice while an action is in flight.c): a form with name, image and type. Each is typed, and←/→walks image/type through what the provider'simages/sizeslist when it lists them; empty fields leave the flag off soonctl create's own defaults apply. Enter runsonctl createin the foreground with those flags, so create's output and waits show as usual.cfrom:imagesor:sizesfills in that row.Also: ls's running/paused partition moves into
listVMssolsand the tui agree on which VMs count as paused. Provider log lines are kept off the screen while the tui runs (ONCTL_LOGsends them to a file whose name is printed on exit).boxctl-only views and keys (urls/expose, backups/restore, keep, goal logs) have no onctl equivalent and are left out.
Dependencies
Adds
charmbracelet/bubbletea,bubbles(textinput, spinner) andlipgloss.spf13/pflagbecomes a direct dependency (it was already there via cobra).Testing
cmd/tui_test.godrives the model against a fake provider: rows/sort/filter/state filter, keys arriving batched, refusals on paused and pending VMs,r→CreateSSHKeythenResume, the destroy dialog →Destroy, describe/json pages and VM keys from them,:images/:sizes/:vms web, unknown commands,:q, partial listing errors, the child-process exit message, the child args (provider + changed root flags), the create form (catalog walking, existing-name refusal, theonctl createcommand line, preselection from:sizes).acprovider at 100x26 and 70x16: list, help,:sizes,:images, the create form, flash messages. (Theaclisting itself fails on this machine with "unexpected output from the container CLI", on main too; the tui shows it as a flash.)go vet,gofmt,golangci-lint, Linux and Windows cross-builds: clean. Fullcmdtest package passes.🤖 Generated with Claude Code