Repository navigation
fix(web): list a session's open pull requests before merged ones - #362
Merged
kalaspuff merged 1 commit intoOct 31, 2026
Merged
Conversation
A session with more pull requests than its row or the rail shows at once listed them in the order its agent found them, so its open ones could be cut off behind merged ones. Open, draft and queued ones now come first, then those nobody looked up yet, then merged and closed ones, each in the order found.
kalaspuff
approved these changes
Oct 31, 2026
kalaspuff
deleted the
fctl/604-in-an-agent-session-with-many-many-prs-t
branch
October 31, 2026 00:29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A session with many pull requests listed them in the order its agent found them, so the row in session lists, which cuts off what doesn't fit, could show only merged ones, and the rail's Pull requests section put the open ones at the bottom. Now open, draft and queued pull requests come first, then those whose state nobody has looked up yet, then merged and closed ones. Each group keeps the order the agent found them in. The session header's list of links uses the same order, since all three take it from the same function.
I added a unit test for the order, ran
npm run check, and looked at a dev session with ten pull requests in mixed states, staged in its SQLite, againstmain's web app and this branch's.Screenshots
At 8051709, dark theme. The row in the project's session list, before and after:
The session page's Pull requests section:
Worth confirming
fctl session
Note
Low risk. It only changes the order in which the web app lists a session's pull requests, with a unit test; no data or API changes.
What it does.
pullRequestsnow lists a session's open, draft and queued pull requests first, then those not yet looked up, then merged and closed ones, each group in the order the agent found them. Sessions with many pull requests therefore keep the ones still under way visible when a list cuts off its end.fctl review's first look at
8051709· 2 files, +32 −3 · Review agent settings