Skip to content

Follow every open pull request on one page, and update, ready or merge it there - #921

Merged
github-actions[bot] merged 3 commits into
mainfrom
claude/pr-tracking-dashboard-d722fb
Oct 1, 2026
Merged

github-actions[bot] merged 3 commits into
mainfrom
claude/pr-tracking-dashboard-d722fb

Conversation

@JSdotNet

@JSdotNet JSdotNet commented Oct 1, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a Pull requests page, a takeover surface in the header next to Sessions. It shows the open pull requests of every repository registered in Settings → GitHub on one page. From each row you can trigger Update branch, Ready for review and Merge, and jump to the PR's task and session. It is behind the new pull-requests feature flag, at Dev status.

Changes

  • GitHub adapter (Backlog.Infrastructure.GitHub):
    • ListOpenPullRequestsAsync makes one GraphQL read per repository. It returns state, draft, head and base branch, mergeStateStatus/mergeable, viewerDidAuthor, auto-merge, the check roll-up and the allowed merge method.
    • UpdateBranchAsync calls PUT pulls/{n}/update-branch with expected_head_sha.
    • MarkReadyForReviewAsync uses markPullRequestReadyForReview.
    • GitHubIntegration lists every repository concurrently. A failing repository becomes a per-repository failure instead of hiding the others.
    • The two new acts reuse the existing refusal wording.
  • Page (src/App/Backlog.Desktop.UI/PullRequests/PullRequestsPane.razor):
    • Columns: repository, PR, branch, status, task, session, actions.
    • Filters: Mine / Everyone's, plus the header repository chips.
    • Actions by state:
      • Update branch only on a PR GitHub reports as behind.
      • Ready for review only on a draft.
      • Merge offers "Merge now" when the PR is mergeable now, "Merge when checks pass" otherwise, and "Cancel auto-merge" when auto-merge is queued.
      • Neither a draft nor a branch in conflict gets a merge action.
    • After every act the pane re-reads that repository.
  • Links:
    • Task: the entry whose link_change projection names the PR.
    • Session: the session whose transcript recorded the PR URL, else the newest session on its head branch. It opens the Sessions surface focused on that session.
  • Shell: WorkspaceSurface.PullRequests is appended last, because the navigation file stores names. The header toggle and Home.razor wiring mirror Sessions. The feature key is SessionFeatures.PullRequests.
  • Placement: the page is in the desktop shell, not Sessions.UI. ModuleBoundaryTests.Backlog_Modules_Sessions_never_reaches_for_the_file_system_adapter forbids any Sessions project from referencing infrastructure, and the shell already joins tasks, sessions and GitHub.

Testing

  • dotnet build Backlog.sln: 0 warnings.
  • CI build (Backlog.WithoutAppHeads.slnf, Release, -warnaserror, non-incremental): 0 warnings, 0 errors.
  • CI dotnet test: 10,514 passed, 0 failed, 1 skipped (the browser E2E test, which needs BACKLOG_E2E=1).
  • New tests:
    • the list parse, update-branch and ready-for-review requests, multi-repository listing with a failing repository, and the refusal wording;
    • bUnit tests for the pane: rows, filters, scope, the action matrix including conflicts, acts, and the task and session links;
    • the shell toggle and flag gating.
  • Playwright QA on the desktop web harness under Aspire: 8 of 9 scenarios pass and 1 is partial.
    • Live GitHub had no draft or behind PR, so those two buttons are covered by unit tests only.
    • QA never clicked an action button, because they act on real PRs.
    • Aspire logs and the browser console showed no errors.
  • QA found that a conflicting PR was offered "Merge when checks pass". That is fixed and has a test.

Known follow-ups (minor review findings, not addressed here)

  • Update branch can look like a no-op. GitHub updates the branch asynchronously, so the re-read right after the act often still shows the PR as behind.
  • Overlapping reads can bring back a merged PR. Refresh, Retry and per-act re-reads can overlap; the last write wins, so a stale refresh can restore a merged row. The fix is a generation counter.
  • "Merge when checks pass" is offered on a BEHIND or UNKNOWN merge state.
  • The 50-per-repository cap is silent, and Mine filters after it.
  • No cancellation when the page closes mid-read.
  • The branch fallback for the session link ignores forks.
  • The header overflows at 375px. This predates the change; the new toggle adds about 90px.
  • The devbook has no chapter for this yet. .devbook/domain/sessions/features.md needs one, to be added through flow-spec.

Related

There is no issue; this was an ad-hoc request from the session.

Checklist

  • Scope is focused and excludes unrelated changes
  • Documentation or instruction files were updated when governance or behavior changed (the devbook chapter is a follow-up)
  • Running Aspire instances for this checkout were stopped before PR creation (build\stop-aspire-before-pr.ps1)
  • Follow-up work is captured when the implementation is intentionally partial
  • Issues this PR closes are linked with a closing keyword, or there are none

🤖 Generated with Claude Code

JSdotNet and others added 3 commits October 1, 2026 21:57
A Pull requests takeover beside Sessions lists the open pull requests of
every registered repository, mine by default or everyone's, with their
checks, draft, behind and conflict state. From each row: Update branch
when GitHub reports it behind, Ready for review on a draft, and the merge
act that fits (merge now, merge when checks pass, cancel auto-merge; none
while the branch is in conflict). Each row links to the task that linked
the pull request and to the session that opened it or ran on its branch.

The GitHub adapter gains the open pull request listing (one GraphQL read
per repository, a failing repository reported beside the others), the
update-branch call and the ready-for-review mutation, with refusals worded
like the existing merge acts. The page sits in the desktop shell rather
than Sessions.UI: no Sessions project may reference infrastructure, and the
shell already joins tasks, sessions and GitHub. Gated by the new
`pull-requests` flag (Dev).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hared StubProbe

Main now ratchets duplicate top-level selectors in app.css and declares
each test double once under tests/Shared. The panel's eyebrow, title and
subtitle each set their margin in their own rule, and the pane tests use
the shared StubProbe instead of a private copy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions
github-actions Bot merged commit 3b088cc into main Oct 1, 2026
9 checks passed
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