Skip to content

tui: pick the provider inside the tui - #1267

Merged
cdalar merged 6 commits into
mainfrom
onctl/28a975
Oct 27, 2026
Merged

cdalar merged 6 commits into
mainfrom
onctl/28a975

Conversation

@cdalar

@cdalar cdalar commented Oct 27, 2026

Copy link
Copy Markdown
Owner

Summary

  • Bare `onctl` / `onctl tui` with no `-p` or `ONCTL_CLOUD` no longer shows a promptui list before the tui. It opens on the tui's providers view; enter on a row restarts the tui on that provider (the existing `:provider` path).
  • Until a provider is picked nothing is listed, and only navigation, `/`, `?`, `:q`, `:help` and `:provider` work; other keys and `:` commands do nothing or flash "pick a provider first".
  • Removes `askProvider` / `providerChoices`; `TestTUIProviderChoices` is replaced by `TestTUIPickProvider`.

Testing

  • `go build ./...` and `go vet ./cmd/` clean; TUI tests pass, including the new one.
  • Not run: the picker in a real terminal.
  • Failing on this branch without my change too: `TestProjectCheck`. `TestPopulateOnctlEnv_ErrorWritingFile` also fails when run as root (sandbox), skipped.

🤖 Generated with Claude Code

With neither -p nor ONCTL_CLOUD, onctl / onctl tui opened a promptui
list and then the tui. It now opens on the tui's providers view, and
enter on a row restarts the tui on that provider. Until one is picked
nothing is listed, and only navigation, :q, :help and :provider work.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.24590% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 49.75%. Comparing base (81be99c) to head (b407ade).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
cmd/tui.go 87.17% 5 Missing ⚠️
cmd/tuiactions.go 83.33% 3 Missing ⚠️
cmd/root.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1267      +/-   ##
==========================================
+ Coverage   49.60%   49.75%   +0.14%     
==========================================
  Files          83       83              
  Lines        9678     9706      +28     
==========================================
+ Hits         4801     4829      +28     
  Misses       4877     4877              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

cdalar and others added 5 commits October 27, 2026 08:24
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
An error opened a popup and also flashed the same text in red at the
bottom. The flash is hidden while the popup is open and cleared when it
is closed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Picking a provider on a machine with no .onctl directory ended in a
"please run `onctl init` first" popup and no way on. The tui now asks,
runs onctl init in the foreground on yes (it asks its own questions),
and goes on to the provider that was picked. boxes needs no config and
is not asked.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The tui asks "Run onctl init?" itself, and then init asked its own
question about a project-based .onctl folder on the terminal. --global
sets up only ~/.onctl and doesn't ask; the tui runs init with it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A listing error (the ac provider without Apple's container CLI, an
expired token) was only flashed and cut off at the screen's edge. It now
opens the error popup the first time; the same failure on the next
refresh is flashed only, one that arrives while a question or a form is
open waits, and a listing that works lets the next failure open it again.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@cdalar
cdalar merged commit 0027c86 into main Oct 27, 2026
13 checks 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

⌂ 换网址