Skip to content

feat: let admins skip inviting people when setting up a workspace - #125

Merged
kalaspuff merged 1 commit into
mainfrom
fctl/68-there-should-be-a-skip-or-skip-for-now-o
Oct 20, 2026
Merged

kalaspuff merged 1 commit into
mainfrom
fctl/68-there-should-be-a-skip-or-skip-for-now-o

Conversation

@fctl-sh

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

Copy link
Copy Markdown
Contributor

A new workspace's Projects tab asks its admins for what it still needs: people, a runner, a GitHub account (when the instance has a GitHub App) and a project. A workspace for one person never gets a second member, so Invite the people you work with stayed on its page for good, and the whole checklist with it.

The invite step now has Skip for now beside Invite. It saves skip_invites on the workspace, so the step stays out of the checklist on every device and for every admin, and the checklist goes away once the other steps are done. A toast says where inviting is from then on: the People tab (and the Invite button in the page's header, as before). If someone joins after all, the step shows as done again.

  • Protocol: Workspace.skip_invites (false when an older control plane leaves it out) and UpdateWorkspaceRequest.skip_invites, both optional, so CLIs one version behind are unaffected.
  • Control plane: migration 0014_workspace_skip_invites.sql adds the column (NOT NULL DEFAULT 0). PATCH /api/v1/workspaces/{id}, for admins as before, sets it, and the workspace's audit log records it as workspace.updated like its other settings.
  • CLI: fctl workspaces set --skip-invites on|off; fctl workspaces show --json includes the field.
  • Web: the button in the checklist. On a phone, the checklist's buttons now sit under each step's words instead of beside them, so the words keep the full width and two buttons fit in a row; wider screens look as before.
  • Docs: docs/cli.md, and a sentence about the checklist in docs/getting-started.md.

Only the invite step can be skipped: a runner and a project are what sessions need. The GitHub step already leaves itself out on instances without a GitHub App; a workspace whose projects have no repository still keeps it, and could get the same button later.

The privacy policy on fctl.sh needs no change: it lists what a workspace holds about people (its name, address, avatar, the two-factor requirement), not settings such as its base role.

Verification

  • cargo xtask check passes locally: formatting, generated types, Biome and TypeScript, Clippy for the workspace and for the wasm control plane, the Rust and web tests, and the web build.
  • New tests in web/src/routes/workspace.test.tsx: skipping sends { skip_invites: true } and the checklist goes away when the rest is done; a skipped step stays out ("1 of 3 done"); the step shows as done when someone joins after a skip; no other step offers skipping. The first two fail without the change. fctl-proto tests that a workspace from an older control plane reads skip_invites: false and that older clients' updates leave it alone.
  • End to end with cargo xtask dev: the migration applied. On Development (one person, a runner and a project), Skip for now sent PATCH /api/v1/workspaces/… 200, the checklist went away and stayed away after a reload. In a new workspace, only the invite step left ("0 of 2 done"). fctl workspaces set --skip-invites off brought it back, --skip-invites on --json returned "skip_invites": true, and fctl workspaces audit shows workspace.updated for each change.

Screenshots

At 9e5ff3e, on the dev stack, whose instance has no GitHub App, so its checklist has three steps.

The checklist of a workspace with one person, a runner and a project, 1440 px wide, dark theme:

Before After
Before: Development's checklist with only Invite on the invite step After: Skip for now beside Invite on the invite step

After pressing Skip for now: the checklist is gone and a toast says where to invite people.

After skipping: the Projects tab without the checklist, and the toast

A new workspace on a phone (390 px), dark theme: the buttons move under the words.

Before After
Before: a new workspace's checklist on a phone, buttons beside narrow text After: the same checklist with the buttons under the text, Invite and Skip for now in a row

Light theme: the checklist at 1440 px, and a new workspace on a phone after skipping (the invite step is gone, "0 of 2 done").

Desktop Phone, after skipping
After, light: Skip for now beside Invite After skipping on a phone, light: two steps left and the toast

Session: https://app.fctl.sh/s/ses_01M5CCM54M0DDN4RFRH5J5C0KW

A workspace for one never gets a second member, so the setup checklist's
"Invite the people you work with" step stayed on its page for good. The
step now has "Skip for now", which saves `skip_invites` on the workspace
(migration 0014) so that the checklist leaves the step out on every device
and finishes once the rest is done. People who join anyway mark the step
done. `fctl workspaces set --skip-invites on|off` sets it from the CLI.

On a phone, the checklist's buttons move under the words, which keep the
full width.
@fctl-sh
fctl-sh Bot requested a review from kalaspuff as a code owner October 20, 2026 11:09
@kalaspuff
kalaspuff merged commit dfad13d into main Oct 20, 2026
5 checks passed
@kalaspuff
kalaspuff deleted the fctl/68-there-should-be-a-skip-or-skip-for-now-o branch October 20, 2026 11:21
kalaspuff pushed a commit that referenced this pull request Oct 20, 2026
Follows #125.

The self-hosting guide's example of a new standalone server's first log
(added in #123) says it applies 13 database migrations. #125, merged
right after, added `0014_workspace_skip_invites.sql`, so a server
started from `main` applies 14. This updates that line; nothing else in
the guide counts migrations.

## Verification

`FCTL_SETUP_TOKEN=dev-setup-token cargo xtask serve` with a new data
directory, on a tree that is this branch's (`main` with #123 and #125,
plus this line), logs `Applied 14 database migrations`. On the same
tree, `cargo xtask dev --smoke --server http://localhost:8787` passed,
`fctl workspaces set --skip-invites on|off` worked against that server,
and `cargo xtask check` passed.

Session: https://app.fctl.sh/s/ses_01M5CCM54M0DDN4RFRH5J5C0KW

Co-authored-by: fctl-sh[bot] <fctl-sh[bot]@users.noreply.github.com>
kalaspuff pushed a commit that referenced this pull request Oct 20, 2026
Follows #125 and #126.

#125 (`0014_workspace_skip_invites.sql`) and #124
(`0014_session_pull_requests.sql`) were open together and merged one
after the other, so `main` has two migrations numbered 0014. Nothing
breaks: wrangler records migrations by file name and applies every file
it hasn't recorded (`getUnappliedMigrationNames`), and its next number
is the highest plus one, so the next migration is 0015. The two add
columns to different tables (`workspaces` and `sessions`), so their
order doesn't matter. app.fctl.sh applied #125's at its deploy
(`0014_workspace_skip_invites.sql ✅`) before #124's.

Renaming either file is what would break: wrangler would see a new name
and run its `ALTER TABLE … ADD COLUMN` again, which fails on a database
that has the column. So:

- `docs/self-hosting.md`: a new standalone server now applies 15
migrations, not 14 (#126 counted before #124 was merged).
- `AGENTS.md`: the migration rule now says names are part of what's
immutable, to number a new migration after the highest, and to leave the
two 0014s as they are.

## Verification

On this branch (`main` at 8b4b699, plus these lines):
`FCTL_SETUP_TOKEN=dev-setup-token cargo xtask serve` with a new data
directory logs `Applied 15 database migrations`, `cargo xtask dev
--smoke --server http://localhost:8787` passed through it, and `fctl
workspaces set --skip-invites on` returned `"skip_invites": true` from
it. The branch merges cleanly with `main` at b580d52 (#127), which adds
no migration.

Session: https://app.fctl.sh/s/ses_01M5CCM54M0DDN4RFRH5J5C0KW

Co-authored-by: fctl-sh[bot] <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