Repository navigation
fix(web): closing the last open pull request clears it from the list - #29438
MyDigitalLife wants to merge 1 commit into
Conversation
The Pull requests page only re-reads its Authored and Review requested groups while the main list has rows, and falls back to the groups it last held when it has none. The "list is empty" check also required the answer to carry no project errors, so a workspace with one unreadable project (for example a GitHub repository without `gh`) never counted as empty. Closing the last open pull request then left it listed as open under Authored until the app restarted. Project errors no longer stop an answer with no rows from counting as empty: the group reads cover the same projects, so they cannot hold rows either. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — An empty pull-request response now clears stale groups even when individual projects report errors. The change is limited to list presentation and retains pending-read and top-level-error safeguards. You can add or adjust custom eligibility rules. Learn more. |
Findings
|
| Layer / File(s) | Summary |
|---|---|
Define and use the answered-empty check apps/web/src/components/pullRequest/pullRequestList.logic.ts, apps/web/src/components/pullRequest/PullRequestsPage.tsx, apps/web/src/components/pullRequest/pullRequestList.logic.test.ts |
The helper returns true when data exists with no entries, the view is not pending, and the view has no error. The page uses the helper, and tests cover pending state and a project-read error. |
Estimated code review effort: 2 (Simple) | ~5 minutes
Change: Bug fix
Suggested reviewers: juliusmarminge
Merge Risk: 
Minimal · up to d725c
-
Closing the last open pull request now clears it from the list even when another project in the workspace cannot be read. No concrete merge-blocking defect remains. A page-level test for this flow would add protection against future regressions.
Pre-merge checks: 
4
-
Full details: Description check
-
Explanation
The description includes complete Problem, Change, Scope and approval, and Verification sections. It explains reproduction, implementation, tests, manual validation, screenshots, limitations, and the agent details.
-
Finishing Touches
-
Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
|
Note Written by Verified in a real dev environmentverified as-is at created projects through the app pointing to real local git repositories. completed real Codex with the page mounted, closed the local scenario PR externally and clicked Refresh. both servers returned before, main after closing and refreshing: after, same repository and filters on the PR head: command and websocket transcript blacksmith checks passed: 36 focused logic tests and Not verifiednative iOS/Android, the Electron shell, macOS/Windows, remote/relay/tunnel connections, and the review-requested partition were not exercised on this Linux web setup. the real error was a missing Forgejo repository, rather than missing GitHub authentication; the client received the same per-project-error condition. other provider adapters were not exercised. |



Problem
On the Pull requests page, closing the last open pull request left it listed as open under Authored until the app was restarted, even after Refresh. The detail panel showed it as Closed at the same time.
Reproduce: a workspace where one project cannot be read (here a GitHub repository on a server without
ghorGH_TOKEN) plus a Forgejo project with exactly one open pull request. Close that pull request in Forgejo, then click Refresh. Expected: "No pull requests". Actual: the pull request stays under Authored.Change
The page only re-reads its Authored and Review requested groups while the main list has rows. With no rows it falls back to the groups it last held, guarded by a "list is empty" check (
baselineEmpty). That check also required the answer to carry no project errors. With one unreadable project, every answer carries that project's error, so an empty list never counted as empty and the stale group stayed on screen.Project errors no longer stop an answer with no rows from counting as empty. The group reads cover the same projects, so they cannot hold rows either. The check moves to
pullRequestListAnsweredEmptyinpullRequestList.logic.ts.Scope and approval
A very small, focused fix for an obvious bug: a closed pull request shown as open until restart. It changes one condition in the web client. No contract, server or mobile change; mobile builds its groups from the rows themselves, so it is not affected. Desktop wraps web and gets the fix with it.
Verification
pullRequestList.logic.test.ts(an answer with no rows and a project error counts as empty, and a pending one does not). It fails against the old condition (expected false to be true) and passes here.mainand this branch): closehomelab/home#16in Forgejo, then click Refresh. Onmainit stays under "Authored 1" while its detail shows Closed. On this branch the list shows "No pull requests". The server trace confirmed Forgejo was re-read after each refresh and no longer returned Move pending approval derivation and thread visit tracking to shared session logic #16.vp run check:changedpasses (format, lint, knip, typecheck, tests, react compiler).main)Model and harness: Claude Opus 5.5 in Claude Code, run through T3 Code.
🤖 Generated with Claude Code