Skip to content

feat: explain how to set up a runner when a workspace has none - #121

Merged
kalaspuff merged 3 commits into
mainfrom
fctl/67-in-a-new-workspace-there-s-no-runners-ac
Oct 20, 2026
Merged

kalaspuff merged 3 commits into
mainfrom
fctl/67-in-a-new-workspace-there-s-no-runners-ac

Conversation

@fctl-sh

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

Copy link
Copy Markdown
Contributor

A new workspace has no runners, and its pages didn't say what to do about it. The Runners tab asked admins to "run two commands" they hadn't seen yet, and said nothing about the container runtime a machine needs. The floor and the project page let people start sessions that then waited without a word. A waiting session sent admins to the workspace's settings, where runners aren't.

What changed

  • Runners tab, admins: a workspace without runners shows three short steps under the register form, with each command in a box to copy. (1) A Mac with Apple silicon or a Linux machine, with Apple's container, Lima or Docker installed. (2) Install fctl on it: curl -fsSL https://fctl.sh/install | sh, or brew install hyperstructure/tap/fctl. (3) Sign in and register it for the workspace: fctl login <instance>, then fctl host install --workspace <slug>. To avoid signing in on the machine, admins can still name it in the form above and choose Register, which gives a command with a token. If the admin has runners of their own, the lead says to add one of those, or bring another machine online.
  • Runners tab, members: it says that sessions wait until an admin adds a runner, and names whom to ask (the primary admin).
  • Under the task boxes on the floor (for the chosen project's workspace) and on the project page, a line appears while the workspace has no runner online. It says that sessions started there wait, with a link to the workspace's Runners tab ("Add a runner", or "See its runners" when it has runners but none is online). Members are told whom to ask instead. It comes from the live runner list the feed keeps current, so it goes away as soon as a runner connects. It stays hidden while the list loads, and when it comes from a control plane before workspaces, which doesn't say which workspaces a runner serves.
  • The install command comes from one helper, for this step and for both register dialogs (the workspace's and Admin → Runners). An app at app.<domain> still takes the installer from the site beside it (fctl.sh for app.fctl.sh). Other instances, like self-hosted ones at fctl.acme.dev, now get fctl.sh's installer, as the self-hosting guide says. Before, the dialog pointed them at <instance>/install, which their Worker doesn't serve, so curl … | sh fetched the web app's HTML.
  • Setup checklist: the workspace's "Bring a machine online" step now says what happens until a runner is online: "Its sessions wait until one of its runners is online: register a Mac or Linux machine, or add one of yours."
  • Queued sessions: the control plane's reason for a session whose workspace has no runners said "Its admins add one in its settings". It now says "Its admins add one on its Runners tab". The reason is plain text, so nothing changes for older hosts or agents.
  • Docs: docs/getting-started.md step 5 says that sessions wait until a runner is online, and what the app shows meanwhile.

Most of the diff in home.tsx and project.tsx is re-indentation: each task form is now wrapped together with its note. Hide whitespace to see the change.

Verification

  • Unit tests: runnersOf in web/src/lib/workspaces.test.ts; installCommand in web/src/lib/install.test.ts; the note's wording, link and silence in web/src/components/workspace/no-runners.test.tsx; the Runners tab for admins and members in web/src/routes/workspace.test.tsx.
  • cargo xtask check --quick passes: fmt, generated types, Biome and TypeScript, Clippy (including wasm), Rust tests and 167 web tests.
  • End to end with cargo xtask dev, using the dev owner and a member signed up through an invitation:
    • I created a "Side project" workspace with a project and no runners.
    • I looked at its pages in both themes and at 390 px.
    • I registered a throwaway runner from the Runners tab, checked the dialog's commands, then deleted it.
    • I started a session there with fctl run -d -p notes "write todo.md". fctl sessions -p notes --json showed its reason as "Waiting for a runner: this workspace has none yet. Its admins add one on its Runners tab."

Screenshots

At 10f5659, with cargo xtask dev's data plus the "Side project" workspace, 1280 px wide unless noted. The "before" shots are main on the same control plane.

The workspace's Runners tab, as its primary admin (who has a runner in another workspace):

Before After
Before: the Runners tab of a workspace without runners, for an admin After: the same tab with three steps to bring a machine online, with the commands to install fctl and register it

The same tab as a member:

Before After
Before: the Runners tab for a member After: the tab names the primary admin to ask

The project page, as an admin:

Before After
Before: the project page's task box, with nothing about runners After: a line under the task box says sessions wait, with a link to add a runner

The floor with a Side project project chosen, as the admin and as the member. Before, nothing showed under the task box:

Admin Member
After: the floor's note for an admin, with a link to add a runner After: the floor's note for a member, naming the primary admin

The admin's Runners tab in the dark theme at 390 px:

After: the Runners tab's steps on a phone, dark theme

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

A new workspace has no runners, and its pages said little about what to
do: the Runners tab asked admins to "run two commands" they hadn't seen
yet, the floor and the project page let people start sessions that then
waited without a word, and a waiting session sent admins to the
workspace's settings, where runners aren't.

- The Runners tab of a workspace without runners shows its admins three
  short steps (a Mac or Linux machine with a container runtime, Register,
  the two commands), and the one-command `fctl host install --workspace`
  for machines already signed in. Members see whom to ask.
- Under the task boxes on the floor and the project page, a line says
  when the workspace has no runner online, so sessions started there
  wait, with a link to its Runners tab (or whom to ask, for members).
- The setup checklist's runner step says what happens until one is
  online, and a queued session points to the Runners tab.
@fctl-sh
fctl-sh Bot requested a review from kalaspuff as a code owner October 20, 2026 10:26
fctl-sh Bot added 2 commits October 20, 2026 10:27
"Sessions you start in it wait until it is" used "it" for both the
workspace and its runner.
The Runners tab's steps for a workspace without runners now install fctl
with the installer's one-liner (or Homebrew), then sign in and register
the machine with `fctl host install --workspace`, each in a box to copy.
Registering it above, for a command with a token, stays as the way that
doesn't sign in on the machine.

The install command comes from one place for this step and both register
dialogs. An app at app.<domain> keeps taking the installer from the site
beside it (fctl.sh for app.fctl.sh). Other instances, like self-hosted
ones, now get fctl.sh's installer, as the self-hosting guide says: their
Worker serves no /install, so the command fetched the web app instead.
@kalaspuff
kalaspuff merged commit 2eb6187 into main Oct 20, 2026
6 checks passed
@kalaspuff
kalaspuff deleted the fctl/67-in-a-new-workspace-there-s-no-runners-ac branch October 20, 2026 10:41
kalaspuff pushed a commit 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