feat: edit the description and pick reviewers from Overview - #176
Merged
Conversation
The Overview tab rendered the pull request's body and nothing else, so two ordinary things about a pull request still had to be done on github.com: fixing a description an agent drafted, and choosing who reviews it. Leaving the app mid-review is the one gap left in a screen that already merges, comments and files a review. Overview now carries both. The description takes an Edit that opens the body in place and saves it through `gh pr edit --body`. Beside it sits the review roster, which is two gh fields read as one: reviewRequests is who still owes an answer, latestReviews is who gave one, and GitHub moves a person between them — submitting a review clears the request, asking again re-files it. Either half alone lies, so PRDetail carries them merged, and a reviewer who already answered comes back unticked because ticking them is the re-request. The picker offers GitHub's assignableUsers rather than a typed login: it is what gh's own prompt uses, a read-only account can still see it, and every name in it is one GitHub will accept. The pull request's author is filtered out — GitHub refuses a request addressed to them — and a merged or closed pull request keeps the roster but loses the picker. A team shows on the roster and stays out of the picker: gh addresses one as org/slug, which is not the slug the roster carries.
The editor opened at a fixed sixteen rows, which is a page-long description behind an inner scrollbar on any screen and a tall empty box on a short one. It now sizes itself to the text, bounded by the viewport — 40vh of floor so a one-line body still reads as an editor, 70vh of ceiling so Save stays on screen.
# Conflicts: # CHANGELOG.md
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.
What
The Overview tab was a read-only rendering of the pull request's body. Two ordinary things still had to be done on github.com — trimming a description an agent drafted, and choosing who reviews — which is the last gap in a screen that already merges, comments and files a review.
Overview now carries:
gh pr edit --body.How
internal/project/prreviewers.go:AssignableReviewers(GraphQLassignableUsers— what gh's own prompt uses, visible to a read-only account),RequestReview(gh pr edit --add/--remove-reviewer), andtoReviewers, which merges gh's two halves of the roster.internal/project/pr.go:EditPullRequestBody;prViewFieldsgainsauthor,reviewRequests,latestReviews.frontend/src/components/pulls/PullsOverview.tsx: the tab, lifted out ofPullRequestView.frontend/src/lib/pulls/reviewers.ts: who the picker may offer, and who it ticks.Decisions worth knowing
reviewRequestsis who owes an answer,latestReviewsis who gave one, and GitHub moves a person between them — a submitted review clears the request, asking again re-files it. Either half alone reads as a lie the moment the first review lands.org/slug, which is not the slug the roster carries.Test plan
gofmt -l .,go vet ./...,go test ./...(809)pnpm check,tsc --noEmit,vitest run(641),vite buildinternal/project/prreviewers_test.go(roster merge incl. re-request, teams, deleted accounts; gh args for add/remove/edit) andfrontend/src/lib/pulls/reviewers.test.tsfield-sizing-content), verified in the built CSS and reviewed running undertask dev