Background
v0.1 ships as a CLI: scan, issues, auth, fix, submit, config. The original design (see docs/design.md) called for a terminal UI; ADR-0010 records the decision to build it on bubbletea-ruby (Charm's Bubble Tea ported to Ruby) with lipgloss-ruby for styling. ADR-0010 supersedes the earlier ADR-0008 (Rooibos) — read it for the framework-choice reasoning.
The CLI's data layer is already shaped for the TUI: parsers, resolvers, and adapters return plain values, all the long-running I/O is structured so it can be wrapped in bubbletea Commands without orchestration code, and the CLI subcommands only do orchestration the TUI will replace.
What this issue covers
A working Stage 3 TUI that gets a user from "I have a Gemfile.lock" to "I have a working branch on a forked issue" without typing a subcommand.
Minimum viable scope:
- Top-level list view of the ranked
scan results (the same projects today's gem-contribute scan prints).
Enter drills into a project's open issues (today's gem-contribute issues <gem> output).
f on a selected issue triggers the fork-clone-branch state machine and displays progress (today's gem-contribute fix <gem>/<n>).
q quits.
- Status line shows current GitHub rate-limit (the adapter already records it).
Out of scope for this issue (file separately if wanted):
c to read CONTRIBUTING.md inline — see ADR-0007, which deliberately rejects in-tool summarization. A "view the file" pane would be in scope; "summarize the contributing guide" would not.
- A
submit keybinding from inside the TUI. The Stage 4 question is whether submit is a TUI flow or stays a CLI follow-up.
Implementation notes
- ADR-0010 explains the reasoning for bubbletea-ruby over Rooibos and bare ratatui.
- All async work goes through bubbletea Commands (a
Bubbletea::Cmd is a closure that returns a message). Do not spawn threads or use Async. Resolver, adapter, and git shell-outs already structure their I/O so they can be wrapped trivially. Define thin helpers — http_command(url, envelope:), system_command(argv, envelope:), wait_command(seconds, envelope:) — once, and use them everywhere.
- Tests for the TUI: assert colors and modifiers in the view (lipgloss styling), and use system tests that inject events and snapshot results. Pure-function
update testing is the bedrock — pre-merge, verify bubbletea-ruby's test helpers (or port teatest patterns from Go's bubbletea / build a minimal snapshot harness).
- The CLI subcommands stay. The TUI is additive —
gem-contribute (no args) opens the TUI; the existing subcommands keep working as scriptable equivalents.
Acceptance criteria
Related
Background
v0.1 ships as a CLI:
scan,issues,auth,fix,submit,config. The original design (seedocs/design.md) called for a terminal UI; ADR-0010 records the decision to build it on bubbletea-ruby (Charm's Bubble Tea ported to Ruby) with lipgloss-ruby for styling. ADR-0010 supersedes the earlier ADR-0008 (Rooibos) — read it for the framework-choice reasoning.The CLI's data layer is already shaped for the TUI: parsers, resolvers, and adapters return plain values, all the long-running I/O is structured so it can be wrapped in bubbletea Commands without orchestration code, and the CLI subcommands only do orchestration the TUI will replace.
What this issue covers
A working Stage 3 TUI that gets a user from "I have a Gemfile.lock" to "I have a working branch on a forked issue" without typing a subcommand.
Minimum viable scope:
scanresults (the same projects today'sgem-contribute scanprints).Enterdrills into a project's open issues (today'sgem-contribute issues <gem>output).fon a selected issue triggers the fork-clone-branch state machine and displays progress (today'sgem-contribute fix <gem>/<n>).qquits.Out of scope for this issue (file separately if wanted):
cto read CONTRIBUTING.md inline — see ADR-0007, which deliberately rejects in-tool summarization. A "view the file" pane would be in scope; "summarize the contributing guide" would not.submitkeybinding from inside the TUI. The Stage 4 question is whethersubmitis a TUI flow or stays a CLI follow-up.Implementation notes
Bubbletea::Cmdis a closure that returns a message). Do not spawn threads or useAsync. Resolver, adapter, and git shell-outs already structure their I/O so they can be wrapped trivially. Define thin helpers —http_command(url, envelope:),system_command(argv, envelope:),wait_command(seconds, envelope:)— once, and use them everywhere.updatetesting is the bedrock — pre-merge, verify bubbletea-ruby's test helpers (or portteatestpatterns from Go's bubbletea / build a minimal snapshot harness).gem-contribute(no args) opens the TUI; the existing subcommands keep working as scriptable equivalents.Acceptance criteria
gem-contribute(no arguments) launches the TUI.ftriggers fork-clone-branch and shows progress as the state machine advances.updatemethods, view rendering, and at least one end-to-end snapshot test.Related