Repository navigation
Closed
Description
fctl's review agent found three problems in the pull requests page (#442) and the sidebar's count of pull requests (#443). It reported them after main was merged into those branches, nobody answered them, and both merged with them open:
- Pull requests of archived sessions never show
- A pull request whose agent asked a question shows as ready for review
- Sidebar pull request count can disagree with the page
What is wrong
- Archived sessions' pull requests never show. The page asks
GET /api/v1/sessions?pulls=anywithoutarchived=1, so the server leaves archived sessions out (AND s.archived = 0incrates/fctl-control/src/api/sessions.rs). Once someone archives the session that opened a pull request, the pull request drops out of every tab and count. That hits merged and closed ones most, since finished sessions are the ones people tidy away.fctl pullsdoes the same (sessions_with_pullsincrates/fctl-client/src/api.rs), and neither says so. - A pull request whose agent asked a question shows as ready for review.
needOfinweb/src/lib/pull-list.tsputs a pull request under "Ready for review" whenever none of its sessions is at work. Since feat: agents ask people for their input with fctl ask #441, an idle session can hold an open question (fctl ask) and wait for a person's answer. Its pull request then shows as ready, under a hint that says its agents finished, and the sidebar counts it as ready too. - The sidebar's count can disagree with the page. The sidebar asks for
pulls: "open"(OPEN_PULLSinweb/src/components/shell/sidebar.tsx), which returns only sessions whose own list has the pull request open. Say an older session still lists a pull request as open and a newer one says it merged. The sidebar never sees the newer session and counts the pull request as ready, while the page (pulls: "any", where the newest session's state wins) shows it under Merged.
What should happen
- The page, the sidebar and
fctl pullslist archived sessions' pull requests as the first decision below says. (feat: answer agents from a redesigned pull requests page #448: in every tab, with an Archived mark) - A pull request whose session holds an open question isn't under "Ready for review", and the sidebar doesn't count it as ready. It goes where the second decision says. (feat: answer agents from a redesigned pull requests page #448: a group of its own, first)
- The sidebar counts from the same list as the page:
pulls: "any", which also shares the page's request when the page isn't narrowed to a workspace or project. (feat: answer agents from a redesigned pull requests page #448)
Compatibility
GET /api/v1/sessions already takes ?archived=1, so the page and the sidebar change only in the web app, which deploys with the control plane. fctl pulls needs a release for its part.
Decisions for a person
- Do archived sessions' pull requests show in every tab, or only under Merged and Closed? A session is usually archived once it's done, but an open pull request from one may still need review.
- Where does a pull request whose agent waits for an answer go: under "Agents at work", or in a group of its own? The sidebar's Needs you already lists such a session first, as asking you.
Session: https://app.fctl.sh/s/ses_01M6SKZPG5YQDY1XJX3GB9VCN6
Activity
fctl-sh commentedon Nov 7, 2026
Done by #448 (dbf5f16), deployed to app.fctl.sh and fctl.sh's docs by main's CI. The
fctl pullspart ships with the next release. The two decisions this issue left open, as #448 took them: