Skip to content

tui: :repos lists your GitHub repos; enter runs onctl claude --repo on one - #1230

Merged
cdalar merged 1 commit into
mainfrom
ai/tui-repos
Oct 23, 2026
Merged

cdalar merged 1 commit into
mainfrom
ai/tui-repos

Conversation

@cdalar

@cdalar cdalar commented Oct 23, 2026

Copy link
Copy Markdown
Owner

What

The onctl counterpart of boxctl's :repos (boxctl PR #136), on onctl's own providers -- nothing here talks to boxctl.

:repos in onctl tui: the GitHub repositories gh's account can reach (gh api user/repos: owned, collaborator, organization member), newest push first. Enter on a row runs onctl claude --repo owner/name on the tui's provider as a child process, the way s runs onctl ssh.

  • Columns REPO, PUSHED, LANGUAGE, VISIBILITY (private/public, fork, archived), DESCRIPTION; shift+letter sorts, / filter, d describe (push access, and the command enter runs), y json.
  • The list is cached in ~/.onctl/repos.json: opening the view shows the cache at once, asks GitHub in the background only when the cache is over an hour old, and R always asks. Never listed on the 5s tick.
  • The child's stderr tail is kept so the flash can say why a run failed (cobra's Error: line), since the tui's redraw hides it.

onctl claude --repo owner/name (new, -R): no project here. A box of the selected provider named claude-<name> gets the repository's default branch cloned from GitHub onto a new onctl/<id> branch, and Claude starts in it. The same --repo again comes back to that box (the clone isn't made again). Works on boxes and on any provider's VM (onctl -p hetzner claude --repo ...). A private repository needs --github store, since the clone runs before the attach that forward relies on; the clone error says so. Refuses --task, --own-box, --handoff, --project. Unlike boxctl's, no goals and no ephemeral box deletion -- the box is a Claude box like any other.

runClaude's tail (start or attach, --detach) became startSession, shared with runRepo.

Tests

go test ./... passes, golangci-lint clean. New: the view's rows/sort/filter/describe/json, enter handing off and the VM keys doing nothing there, the cache (fresh: no fetch; tick: no fetch; R: fetch; stale: shown meanwhile and refetched; a failed fetch keeps the rows and flashes why), the done-message flash, the API page parser; parseRepo, the box name and branch, the clone script run for real against a local repo, the flag conflicts and the attach hint. gh api user/repos was run once by hand to confirm the shape. Not exercised: an actual onctl claude --repo run against a box or VM.

🤖 Generated with Claude Code

https://claude.ai/code/session_019xa1nemYLRH46Gz2Mj83fF

…n one

A `:repos` view in `onctl tui`, after boxctl's: the GitHub repositories
gh's account can reach (`gh api user/repos`), newest push first, cached
in ~/.onctl/repos.json (shown at once; GitHub asked again in the
background when the cache is an hour old, or with R; never on the tick).
Enter runs `onctl claude --repo owner/name` on the tui's provider as a
child process, the way `s` runs `onctl ssh`; d describes, y is the JSON.

`onctl claude --repo owner/name` is new too: no project here. A box of
the selected provider named claude-<name> gets the repository's default
branch cloned from GitHub onto a new onctl/<id> branch, and Claude
starts in it. The same --repo again comes back to that box. A private
repository needs --github store, since the clone runs before the attach
that forwarding relies on. runClaude's tail (start or attach, --detach)
is now startSession, shared with runRepo.

Claude-Session: https://claude.ai/code/session_019xa1nemYLRH46Gz2Mj83fF
@codecov

codecov Bot commented Oct 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 57.03125% with 110 lines in your changes missing coverage. Please review.
✅ Project coverage is 47.07%. Comparing base (eff7bea) to head (a95b95b).

Files with missing lines Patch % Lines
cmd/clauderepo.go 35.00% 52 Missing ⚠️
cmd/tuirepos.go 66.18% 47 Missing ⚠️
cmd/tuiactions.go 72.00% 7 Missing ⚠️
cmd/claude.go 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1230      +/-   ##
==========================================
+ Coverage   46.74%   47.07%   +0.33%     
==========================================
  Files          75       77       +2     
  Lines        8786     9036     +250     
==========================================
+ Hits         4107     4254     +147     
- Misses       4679     4782     +103     

☔ 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
cdalar merged commit d83398d into main Oct 23, 2026
12 of 14 checks passed
@cdalar
cdalar deleted the ai/tui-repos branch October 23, 2026 14:53
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

⌂ 换网址