Skip to content

The pull requests page leaves out archived sessions' pull requests and misfiles some as ready #446

Closed

Description

@fctl-sh

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:

What is wrong

  1. Archived sessions' pull requests never show. The page asks GET /api/v1/sessions?pulls=any without archived=1, so the server leaves archived sessions out (AND s.archived = 0 in crates/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 pulls does the same (sessions_with_pulls in crates/fctl-client/src/api.rs), and neither says so.
  2. A pull request whose agent asked a question shows as ready for review. needOf in web/src/lib/pull-list.ts puts 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.
  3. The sidebar's count can disagree with the page. The sidebar asks for pulls: "open" (OPEN_PULLS in web/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

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

  1. added
    bug
    web
    cli
    on Nov 7, 2026
  2. fctl-sh commented on Nov 7, 2026

    @fctl-sh
    ContributorAuthor

    Done by #448 (dbf5f16), deployed to app.fctl.sh and fctl.sh's docs by main's CI. The fctl pulls part ships with the next release. The two decisions this issue left open, as #448 took them:

    • Archived sessions' pull requests show in every tab, with an Archived mark, since an open one may still need review. So do those of schedules that hide their sessions.
    • A pull request whose agent waits for an answer goes in a group of its own, "Waiting for your answer", first on the Open tab. The question and its answers show under the row, and people who may message the agent can answer from there. An archived session's leftover question doesn't count.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcliweb

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions