TUI: g on a review task should open the PR it just created (create-then-open, one keypress) - #106
Merged
Merged
Conversation
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.
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.
Pressing
gon a review task with no tracked PR created the PR but stoppedthere, so reaching it took a second
g. Confirming the create-PR modal nowchains straight into the browser with the URL
pr::createjust recorded — onekeypress 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::createreturns 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.
gon a task that already has a PR isunchanged, as is the
voro prCLI verb — it formats the same message andleaves 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) andcargo clippy --workspace --all-targets -- -D warnings(clean). Three newapp 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
ghshell-outitself stays untested, as elsewhere in this seam.