feat(service,features,desktop): close, reopen, and retitle an agent's pull request as the member who presses
A3 of the "Act on the PR" stack, stacked on #3294 (A2, the merge box). It adds close, reopen and inline title editing to the Pull request tab's header, as stage-cli has them.
What changes
- Close / Reopen: the state pill's menu now offers Close pull request, drawn in red, beside Ready for review or Convert to draft. A closed pull request offers Reopen pull request. A merged one offers nothing.
- Edit the title inline: a pencil appears after the title and number on hover or focus and opens a field over the title.
- Enter or the check keeps the new words, trimmed.
- Escape or the cross gives them up.
- Words left unchanged, or blank, send nothing.
- The field stays open until GitHub answers.
Each change goes through W1's seam (memberPullRequestWrite), so it is made on GitHub as the member who presses: GraphQL closePullRequest, reopenPullRequest and updatePullRequest. GitHub's refusals show in its own words on W1's line, and the tab reads the pull request again afterwards. Closing can be reopened, so it doesn't ask first; only a merge does.
Goldens
Recorded with LUKE_UPDATE_FIXTURES=1: pull-request-write-wire-pullRequestActionRequestSchema and coding-agent-view-codingAgentPullRequestActionParamsSchema gain the close, reopen and edit-title actions. The title is trimmed, non-empty, and at most 256 characters, which is GitHub's own bound.
Tests
- Service: close, reopen and retitle are each sent as the member with the right mutation and variables (the title arrives trimmed), and a blank title is refused before GitHub.
- Renderer:
- an open pill offers Close and a closed one Reopen, each sending its action;
- the title field: Escape and unchanged words send nothing, Enter sends the trimmed words, and the field closes once GitHub answers;
- W1's pill-menu assertions now include Close.
Checks
The full pnpm check:affected runs out of memory in the sandbox. I ran the parts separately instead, and all passed: per-package tsc, oxlint, biome, knip, and the affected vitest files.
Screenshots follow in a comment.
Made with Luke
Summary by cubic
Adds close, reopen, and inline title editing to the Pull request tab, alongside a merge box that offers the merge action available from the pull request's current state. Every change is made on GitHub as the member who presses, through the existing write seam.
- The state pill's menu offers Close pull request for open pull requests, drawn neutral as GitHub draws it, and Reopen pull request for closed ones; a merged one offers nothing.
- The title's pencil opens an inline field: Enter saves the trimmed title, Escape or unchanged text sends nothing, the field keeps its Escape to itself and waits on composing input, and stays open until GitHub answers.
- The merge line offers Merge, Enable auto-merge, Disable auto-merge, or Remove from queue depending on state, its presses and method chevron now
@luke/ui's Button and SplitButton; a merge asks first and targets the head that was read, and a question left behind goes with the panel as it hides. - The header read carries how the pull request may be merged, read in a single GraphQL query.
- The bundle budget was re-recorded:
main'srenderer/panel.jswas already 52 bytes over its ceiling, and this PR's additions bring it to 901,571 gzipped bytes, recording every entry asmainnow draws it.
Bundle budget
main already draws renderer/panel.js at 901,133 gzipped bytes, which is 52 over its 901,081 ceiling (an 858,173 baseline plus 5%). This PR adds 438 more, for 901,571 in total: close and reopen, the inline title editor, and moving the merge box onto @luke/ui's Button and SplitButton. I re-recorded it with LUKE_UPDATE_BUNDLE_BUDGET=1, which records every entry as main now draws it.