Skip to content

TUI: g on a review task should open the PR it just created (create-then-open, one keypress) - #106

Merged
MJohnson459 merged 1 commit into
mainfrom
task-313-create-then-open
Aug 1, 2026
Merged

TUI: g on a review task should open the PR it just created (create-then-open, one keypress)#106
MJohnson459 merged 1 commit into
mainfrom
task-313-create-then-open

Conversation

@MJohnson459

Copy link
Copy Markdown
Contributor

Pressing g on a review task with no tracked PR created the PR but stopped
there, so reaching it took a second g. Confirming the create-PR modal now
chains straight into the browser with the URL pr::create just recorded — one
keypress does create-then-open.

The chained open is cosmetic, not part of the create: the URL is stored either
way, so a browser that will not launch reports "PR created (); could not
open browser: " rather than reading as a failed create. pr::create
returns the canonical URL instead of a status message so the chain needs no
re-read of the task, and the browser launch is factored into pr::open_url,
shared with the tracked-PR path. g on a task that already has a PR is
unchanged, as is the voro pr CLI verb — it formats the same message and
leaves the jump to an operator who is already at a shell. The confirmation
modal gained a line naming the browser jump, and DESIGN.md §8 records the
divergence between the two surfaces.

Verified with cargo test --workspace (241 + 1 + 237 pass) and
cargo clippy --workspace --all-targets -- -D warnings (clean). Three new
app tests cover the chain — the browser receiving the created URL, a launch
failure still reporting the PR, and a failed create never reaching the browser
— plus a ui test asserting the modal announces the jump. The gh shell-out
itself stays untested, as elsewhere in this seam.

Creating a PR is all but always followed by looking at it, so `g` on a
review task with no tracked PR made the operator press the key twice:
once to create, once to jump. Confirming the create-PR modal now chains
straight into the browser with the URL `create` just recorded.

The chained open is cosmetic, not part of the create: the URL is stored
either way, so a browser that will not launch is reported beside the URL
rather than as a failed create. `pr::create` returns the canonical URL
instead of a message so the chain needs no re-read, and the browser
launch is factored into `pr::open_url`, shared with the tracked-PR path.
The `voro pr` CLI verb is unchanged — it formats the same message and
leaves the jump to an operator who is already at a shell.
@MJohnson459
MJohnson459 merged commit a855503 into main Aug 1, 2026
6 checks passed
@MJohnson459
MJohnson459 deleted the task-313-create-then-open branch August 1, 2026 16:58
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