Repository navigation
docs(legal): say sessions keep every pull request they open - #28
Merged
Merged
Conversation
kalaspuff
approved these changes
Oct 20, 2026
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 | |---|---| |  |  | |  |  | |  |  | |  |  | |  |  | 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>
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.
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".
updatedis 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 thatmainhas too, in404.htmland500.html),npm testandnpm run build, whoseprivacy.htmlhas 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