Skip to content

feat: edit the description and pick reviewers from Overview - #176

Merged
omartelo merged 3 commits into
mainfrom
feat/pr-overview-edit
Aug 7, 2026
Merged

feat: edit the description and pick reviewers from Overview#176
omartelo merged 3 commits into
mainfrom
feat/pr-overview-edit

Conversation

@omartelo

@omartelo omartelo commented Aug 7, 2026

Copy link
Copy Markdown
Owner

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:

  • Opened by — the author, which the detail never showed.
  • Reviewers — who was asked, who approved, who requested changes, with Request review beside it.
  • Edit on the description, in place, saved through gh pr edit --body.

How

  • internal/project/prreviewers.go: AssignableReviewers (GraphQL assignableUsers — what gh's own prompt uses, visible to a read-only account), RequestReview (gh pr edit --add/--remove-reviewer), and toReviewers, which merges gh's two halves of the roster.
  • internal/project/pr.go: EditPullRequestBody; prViewFields gains author, reviewRequests, latestReviews.
  • frontend/src/components/pulls/PullsOverview.tsx: the tab, lifted out of PullRequestView.
  • frontend/src/lib/pulls/reviewers.ts: who the picker may offer, and who it ticks.

Decisions worth knowing

  • The roster is one list, not two. reviewRequests is who owes an answer, latestReviews is 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.
  • A reviewer who answered comes back unticked. Their request is gone; ticking them again is GitHub's re-request.
  • The author is filtered out of the picker — GitHub refuses a review request addressed to them, and an item that can only fail is not an item.
  • A merged or closed PR keeps the roster and loses the picker; GitHub would refuse the request anyway.
  • A team shows on the roster but not in the picker: gh addresses one as org/slug, which is not the slug the roster carries.
  • Ceiling: the picker reads the first 100 assignable users, unpaged. A larger organisation keeps a tail only github.com can reach.

Test plan

  • gofmt -l ., go vet ./..., go test ./... (809)
  • pnpm check, tsc --noEmit, vitest run (641), vite build
  • New: internal/project/prreviewers_test.go (roster merge incl. re-request, teams, deleted accounts; gh args for add/remove/edit) and frontend/src/lib/pulls/reviewers.test.ts
  • Rendered in a headless Chromium over CDP (the gate cannot render): Overview tab, the description editor, and the reviewer menu with its items
  • The description editor sizes itself to the body between 40vh and 70vh (field-sizing-content), verified in the built CSS and reviewed running under task dev
  • Requesting and withdrawing a review against a live open PR — not exercised: this repository lists one assignable user, its own author, whom GitHub refuses as a reviewer

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.
@omartelo
omartelo merged commit ee5a45c into main Aug 7, 2026
3 checks passed
@omartelo
omartelo deleted the feat/pr-overview-edit branch August 7, 2026 13:39
@omartelo omartelo mentioned this pull request Aug 7, 2026
4 tasks
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