Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Mobile PR menus now hide actions the host does not support, with compatibility fallbacks for older servers. Permission checks, confirmation dialogs, and action execution safeguards remain unchanged. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Problem
On mobile, a pull request row's menu offered Convert to draft, Mark ready for review, Close, and Reopen based only on the PR's state. Hosts support different actions. Bitbucket supports only merge and close. Forgejo has no ready/draft. So a Bitbucket PR offered Convert to draft, and a closed one offered Reopen. Picking either opened a confirm dialog, then failed with "This action isn't available for this pull request."
Web fixed this for its row quick actions in #17774. It reads the per-host
actionsthe server already sends inPullRequestListResult.providers, and falls back tochangeRequestActionsWhenUnreportedwhen an older server doesn't report them. Mobile never got the same check.Change
mergeEnvironmentPullRequestPagescollects each environment's reported host actions. It does this next to the per-host search support it already collects.pullRequestListRowActionspicks ready/draft/close/reopen from the PR's state, then keeps only what that host supports, with the same fallback web uses.What the menu offers before and after:
Scope and approval
Very small, focused fix for an obvious bug, so no prior issue: mobile was offering actions that the server rejects for that host, while web already hides them. Overlap search: the local index plus
gh search prsfor the menu and hook. #25761 also editsusePullRequestListActions.ts, but only the post-action handling inperform, not the menu. #29857 changes the merge method and doesn't touch the list menu.Verification
pullRequestListRowActionsfor main's state-only menu logic and ran the new test. It failed withAssertionError: expected [ 'draft', 'close' ] to deeply equal [ 'close' ]. On plain main the test can't run because the helper doesn't exist yet, so the table above shows what main's menu offered.vp test run src/features/pull-requests/pullRequestList.test.ts→ 25 passed.vp run check:changed: lint, knip, typecheck (2 packages), tests, and React Compiler passed. Format failed the first time. I fixed it withvp fmt, andvp fmt --checkis now clean.Reviewed with sol-loop: 1 round with GPT-6.1 Sol on high. Sol verdict: approved.
Created with Claude Opus 5.5 in Claude Code (T3 Code).
🤖 Generated with Claude Code