Skip to content

docs(legal): say sessions keep every pull request they open - #28

Merged
kalaspuff merged 1 commit into
mainfrom
fctl/65-when-there-s-multiple-prs-opened-in-an-a
Oct 20, 2026
Merged

kalaspuff merged 1 commit into
mainfrom
fctl/65-when-there-s-multiple-prs-opened-in-an-a

Conversation

@fctl-sh

@fctl-sh fctl-sh Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

app.fctl.sh will keep every pull request a session's agent finds, in all of its project's repositories, rather than the last one only: for each, its number, link, title, state and repository (hyperstructure/fctl#124). The privacy policy's "Projects and sessions" said each session keeps its "branch and pull request"; it now says "pull requests". updated is already today's date.

Nothing else changes: the pull requests are the ones agents open in the repositories people link, which the GitHub section already covers.

Checked with npm run check (two warnings that main has too, in 404.html and 500.html), npm test and npm run build, whose privacy.html has the new sentence.

Merge it together with hyperstructure/fctl#124. Neither needs the other to build.

Made in fctl session https://app.fctl.sh/s/ses_01M5CBQV867BG6ARZKJHZPGVY0

@kalaspuff
kalaspuff merged commit 3f2ea8e into main Oct 20, 2026
3 checks passed
@kalaspuff
kalaspuff deleted the fctl/65-when-there-s-multiple-prs-opened-in-an-a branch October 20, 2026 11:20
kalaspuff pushed a commit to hyperstructure/fctl that referenced this pull request Oct 20, 2026
)

Sessions showed one pull request: the one fctl-agent reported last, the
primary repository's first, as `#120` with no repository. A session that
opened pull requests in several of its project's repositories, or a
second one after the first was merged, listed only one of them and
didn't say where it was.

## What changed

- **The control plane keeps every pull request a session's agent
finds.** After each turn fctl-agent reports the pull request of the
branch each repository has checked out, so it only ever reports the
latest one per repository. SessionDO now adds the new ones to the
session's list, in the order they come, and takes the newer title and
state of the ones it has (`fctl_domain::pulls`, at most 20). Each
carries the repository it was opened in: the one its URL names, or else
the repository whose state it came in. The list is written to D1 in a
new `sessions.pull_requests` column (migration 0014) and is part of the
account export.
- **Protocol.** `Session.pull_requests` and `PullRequestRef.repo` are
new and optional; `Session.pull_request` stays for clients a version
behind. Agents and hosts don't change. Sessions from before this get
their one pull request in the list, with its repository, when they are
read, from D1 or from their SessionDO.
- **Web app.** The session header links every pull request as
`repository#number` (`fctl#120`, `design#14`), with its title on hover;
they wrap together as one list. The rail has a **Pull requests** section
with each one's title and `owner/name#number`, in place of the card
under **Changes**. The floor, a workspace's page and a project's page
say `PRs fctl#120, design#14`.
- **The floor stays current.** SessionDO told the dashboards about a
session when its status changed, and a turn's git report arrives after
the turn ends. So a new pull request, and the +/− counts, reached the
floor's rows only after a reload or the next turn. A git report that
changes what the lists show now goes to the dashboards too.
- **CLI.** `fctl show` prints each pull request with its repository
(below); `--json` has the list.
- **Docs.** `getting-started.md` and `cli.md` say so. The privacy
policy's "branch and pull request" becomes "pull requests" in
hyperstructure/fctl-site#28.

```
$ fctl show playground#3
playground#3 Name every pull request a session opens
…
prs:      fctl#121 #121
          design#15 hyperstructure/design#15
          fctl-site#32 hyperstructure/fctl-site#32
```

## Verification

- Unit tests for `fctl_domain::pulls` (repositories from URLs and from
repository states, merging over turns, the limit, sessions from before
the list), for `fctl show`'s lines (also from a control plane before the
list) and for the web app's helpers. `cargo xtask check` passes.
- End to end with `cargo xtask dev`. The dev instance has no GitHub, so
the dev agents got a stand-in `gh` that answers `gh pr view` with a pull
request in another repository after each turn, and the project a setup
script that pushes each commit to a local remote, so fctl-agent sees its
branch pushed and looks the pull request up.
- On `main`, a session whose agent found fctl#120, design#14 and
fctl-site#31 showed only `#31`.
- I restarted the stack on this branch with the same data, and migration
0014 applied. The sessions `main` made read with their one pull request
in the list, with its repository. Another turn in one of them added
sandbox#7 after fctl-site#31.
- A new session's agent found fctl#121, design#15 and fctl-site#32: D1,
the API, `fctl show` and the web app list all three. With the session
page and the floor open, the pull request a further turn found showed up
on both without a reload.

## Screenshots

At b04cf34, with the dev stack's data. Both columns show the same
sessions, read from this branch's control plane: on the left `main`'s
web app, on the right this branch's. Playground #3's agent found a pull
request in four repositories.

| Before | After |
|---|---|
| ![Before: the session page, dark: the header shows #8, the rail one
pull
request](https://app.fctl.sh/api/v1/published/D113R6f8QYfhpPbDsQWQBqaaeThsuZZ7L0RdkPoAJkJ/before-session-dark.png)
| ![After: the session page, dark: the header shows fctl#121, design#15,
fctl-site#32 and sandbox#8, the rail lists all four with their
titles](https://app.fctl.sh/api/v1/published/hEwHrUiZXk7zFxUG9iZ7Y53SBjoB878mQF3hFb07YsB/after-session-dark.png)
|
| ![Before: the session page,
light](https://app.fctl.sh/api/v1/published/LckXlfcezPClddzNC6B2OUWvHZChEVCqtrdRdgNgX0d/before-session-light.png)
| ![After: the session page,
light](https://app.fctl.sh/api/v1/published/ccRFWprX5eggRAMX2lN2GcXGOr3X4GBO80RZbBv695n/after-session-light.png)
|
| ![Before: the floor, light: each row says PR and a
number](https://app.fctl.sh/api/v1/published/SIV2JOxyppoBtHGBMP8P4x0x5bYinwN8MapwzQHvbvf/before-floor-light.png)
| ![After: the floor, light: each row names every pull request with its
repository](https://app.fctl.sh/api/v1/published/y7aCSgrM7AgSEFQs2G3G6CdENU9bUbwejAfJ38v8EPn/after-floor-light.png)
|
| ![Before: a project's sessions,
dark](https://app.fctl.sh/api/v1/published/eq2u9b9zYTAlQQqcG4JoDK0Xc8u7g2uvJTMXzA8YNig/before-project-dark.png)
| ![After: a project's sessions,
dark](https://app.fctl.sh/api/v1/published/rLWM8Sw691S2ApXBgxjEqycNJCtHc8kk9HAtV1bcXgd/after-project-dark.png)
|
| ![Before: the session page on a phone,
dark](https://app.fctl.sh/api/v1/published/VOW8yJhpGqiKJMtHMk1Q344QHS1PQeIYVu2VI1TcszD/before-session-dark-390.png)
| ![After: the session page on a phone, dark: the pull requests wrap
below the
branch](https://app.fctl.sh/api/v1/published/mrkQpRYwa6xS1VnMedhkYL3Wno5OHd9dPmEIZmgAsCb/after-session-dark-390.png)
|

Made in fctl session
https://app.fctl.sh/s/ses_01M5CBQV867BG6ARZKJHZPGVY0

---------

Co-authored-by: fctl-sh[bot] <fctl-sh[bot]@users.noreply.github.com>
Co-authored-by: fctl-sh[bot] <343971779+fctl-sh[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant