Repository navigation
feat(patchy): setup ends on a live welcome page and the agent's own suggestion - #914
Merged
Merged
Conversation
Owner
Author
|
GPT 6.1 Sol (xhigh) reviewed this. Two should-fixes, both fixed:
|
allisonmahmood
force-pushed
the
feat/setup-ends-on-welcome-page
branch
from
October 23, 2026 21:49
15a32c4 to
bb0fd60
Compare
This was referenced Oct 23, 2026
…uggestion The portal's setup line ran login, auto mode and the company look, then signed off without publishing anything, so a person finished setup with nothing live and a blank page to fill. Every onboarding trigger now runs the whole conversation: the welcome page goes live in the company look unless the person says not to, then the agent suggests a first patch from what it knows about them. Patchy keeps no list of suggestions. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…and asks about it rather than offering stock examples Co-Authored-By: Claude Opus 5.5 <[email protected]>
…agent to onboarding A supervised run showed an agent that was told to skip the welcome page stop at logged_in without suggesting anything: onboarding was only a Next note. Finishing setup is now its own step. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…'s working in Co-Authored-By: Claude Opus 5.5 <[email protected]>
allisonmahmood
force-pushed
the
feat/setup-ends-on-welcome-page
branch
from
October 24, 2026 00:35
bb0fd60 to
6fa3191
Compare
allisonmahmood
added a commit
that referenced
this pull request
Oct 24, 2026
…#916) Stacked on #914, which is stacked on #913. Merge those first; the onboarding stack ships together. ## What changed The first-patch guide didn't convert: - It was Home itself in an empty company and a separate page everywhere else. - On a phone it read as seven steps. - It asked people to invent a first patch. - It never moved on without a reload. Now, until someone has a live machine token, their real Home sits blurred behind one panel headed **Final step**: connecting an agent is the last step between them and Patchy. It has two steps, giving the agent the line and confirming it's you. The panel follows along on Patchy's own records. It says **You're set** when the computer connects and lets go. Home then shows the first publication after that without a reload. There's no close button: **Later** puts the panel off for the rest of a sign-in. It comes back at each sign-in for the person's first week or first three sign-ins, whichever lasts longer. On a phone it's a bottom sheet that sends the address to their computer. Closes #909. Part of #906. ## Look at - **The show rule** (`packages/auth/src/SetupPrompts.ts` with migration 0026): one small table of the sign-ins (Clerk session ids) that reached Home. Rows are kept for everyone's first four and any in their first week, so someone who connected and later revoked every key never re-enters the window. Later is stored per sign-in. - **Following along** (`packages/portal/src/guide.ts`, `/guide/steps`, `/assets/guide.js`): - The steps come back as HTML from the same renderer as the page. They're swapped only when their state changes, every 3 s while the tab is visible. - Polling stops at the end or after 30 minutes, which offers Check again. - It reads machine tokens and the person's own patches directly, never `DeviceLogins.lookup`'s budget. - There's no spinner. - **The shell's modal slot** (`AppShell.overlay` in `packages/core/src/html.ts`): the app card goes `inert` and blurs statically, with no animation. On a phone the panel is a bottom sheet. - **Each state in a real browser**, as Ben on a dev instance: a device login confirmed in a second tab, collected by its poll, then a publish with that key. The panel moved on by itself each time. | Copied | Device page's new ending | Connected, no reload | | --- | --- | --- | |  |  |  | | Welcome page live, in the panel | Panel closed before publishing: Home takes the note itself | Phone | | --- | --- | --- | |  |  |  | ## How it was verified - `pnpm exec vitest run packages/portal packages/auth/src/DevicePages.test.ts packages/core apps/server/src/migrations.test.ts`: 204 tests pass. New tests cover: - the panel over Home, with Later per sign-in, a cross-site POST refused, and a form from another account refused; - the first-week and first-three-sign-ins rule, including a connected person's sign-ins counting; - `/guide` and `/guide/steps` going waiting, then connected, then live, plus the watch mode; - the first-patch note's Open it. - `pnpm typecheck` and `pnpm lint` pass. - Not run locally: `pnpm verify` and the rollback rehearsal. CI runs both. ## Release impact - [ ] **Breaking** — requires action from anyone already running this - [x] **Not breaking** — no action required Additive migration (one new table), new routes, and portal pages. - **What does a revert leave behind?** The `setup_prompt_sign_ins` table and its rows: sign-in ids and times for people's first few sign-ins. - **Does the release before it still work with that?** Yes. Nothing before this reads the table. <!-- patchy-dev:compare:ben --> #### Before and after, as Ben Ortiz (member) Before is `bb0fd60` (where this branch left feat/setup-ends-on-welcome-page) and after is `8c388de` (feat/final-step-panel), both on the `team` scenario, from `pnpm dev compare`. Every page answered 200 with no browser errors. ##### `/` **1280px, after**  <details><summary>1280px, before</summary>  </details> | Width | Before | After | | --- | --- | --- | | 390px |  |  | <!-- /patchy-dev:compare:ben --> Made by Claude Opus 5.5 in Claude Code, running in T3 Code. --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
allisonmahmood
added a commit
that referenced
this pull request
Oct 24, 2026
…erson's Final step panel (#917) Stacked on #916 (then #914, #913). Merge those first; the onboarding stack ships together. ## What changed The Final step panel could only notice the end of each step: any new computer of the person's, then a patch of theirs. Nothing moved for about a minute after the paste, and any old laptop counted. The panel's line now carries a one-time **setup link**: `Set up Patchy using <instance>/llms.txt?s=<link>`. - The agent's fetch marks the line picked up, within seconds of the paste. - `/llms.txt` prints `patchy login --setup <link>`. - The first login that line starts binds to it; a second contests it. - The mint records which key it made and who confirmed it. The panel follows those facts. When a setup can't finish, it says why and offers **Get a new line**. Events carry a separate setup id, so one person's setup reads as a single funnel in PostHog. Closes #910. Part of #906. ## Look at - **`packages/auth/src/SetupLinks.ts` and migration 0027.** - A link is 128 random bits as 26 base32 characters, one live per person for 30 minutes, reused across reloads. - It keeps how its login ended: pending, denied, expired, contested, connected, or confirmed by another account. Device logins are deleted when they finish, so the outcome has to live here. A login that mints after its line ran out ends expired. - `device_logins.setup_link_id` is nullable and `ON DELETE SET NULL`. - **`DeviceLogins`.** `start` binds, `deny` marks denied, a login that runs out marks expired before it is deleted, and the mint records the key and the confirming user in its own transaction. `token.minted` gains `setupId`. - **The front door.** A narrow `SetupPickup` port, which `apps/server/src/SetupPickup.ts` provides. The SDK gains no Auth dependency. Pickups spend a per-address minute's budget (`rate.setupPickup.perMinute`) before reaching the database. An unknown, expired, over-budget or failing link serves the plain `/llms.txt`, so setup never breaks. - **The CLI.** - `patchy login --setup <link>` keeps the link in its pending login. - A rerun with the same link resumes. A rerun with a different link (or a link when none was pending) starts afresh and says the earlier code no longer applies. - `--setup` with `--complete` is refused. - ADR-0004 and the README record this. - **The panel's states, in a real browser.** Each moved on by itself on a dev instance: the agent's fetch, then a login started with the link, confirmed in another tab, then its key collected. | Picked up | Login waiting | Confirmed, key not yet collected | | --- | --- | --- | |  |  |  | | Connected: this setup's key | Two logins used one line | | --- | --- | |  |  | ## How it was verified - `pnpm exec vitest run` across `packages/portal`, `packages/auth`, the front door, the CLI's login, `packages/api`, `packages/limits`, `packages/core`, Patches and the server's migration record: 1,121 tests pass. New ones cover: - links: one live per person, pickup once, retire; - binding, contested, denied, expired (by poll, and by a mint after the line ran out), a contested line's mint, and the owner's mint against another account's; - `token.minted`'s `setupId`; - the front door's live, unknown and failing links, and the pickup budget per address; - the CLI's same-link, new-link and legacy reruns; - the panel following a line through every state, including a login that runs out with nothing polling, plus Get a new line's origin and stale-account refusals. - `pnpm typecheck` and `pnpm lint` pass. `docs/API.md` and `docs/limits.md` are regenerated, and the skill's lock hash is refreshed. - Not run locally: `pnpm verify` and the rollback rehearsal. CI runs both. ## Release impact - [ ] **Breaking** — requires action from anyone already running this - [x] **Not breaking** — no action required The API field and the CLI flag are optional and additive. The migration adds a table and a nullable column. - **What does a revert leave behind?** The `setup_links` table and `device_logins.setup_link_id`. Old code never reads them. - **Does the release before it still work with that?** Yes. Agents holding the new `--setup` command would need the matching CLI, but `/llms.txt` installs the instance's own release first. Made by Claude Opus 5.5 in Claude Code, running in T3 Code. --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
1 of 2 tasks
allisonmahmood
added a commit
that referenced
this pull request
Oct 24, 2026
## What changed This PR adds release 18's What's new entry, written from `b23e6ad`. It covers everything merged since release 17's `through` (`5dd94f3`), and it sets the `patchy` release to `0.18.0` in `packages/patchy/package.json` and `CURRENT_RELEASE`. With this release, onboarding ends in a Final step on Home that follows the person's agent through setup and lets them confirm it right there (#906). | Change | PRs | | --- | --- | | New: A Final step to connect your AI agent | #916, #917 | | New: Confirm your computer without leaving Home | #918 | | Improved: Setting up ends with your first page | #914 | | Improved: The logo takes you Home | #913 | | Behind the scenes: the first time someone opens a colleague's tool is counted, for activation | #915 | One merged PR gets no line: #905 is release 17's own entry. ## Look at - **The entry**, at the top of `releases` in `packages/core/src/whatsNew.ts`. Its labels are the pages' own: Final step, Later, Not me, Home, Patches. - **Rollback safety, from the live commit `a049a3c` to `b23e6ad`.** - No PR in the range is labelled `one-way`, and every PR answers both Release impact questions with "Yes". - Migrations 0026 and 0027 are additive: the `setup_prompt_sign_ins` and `setup_links` tables, and a nullable `device_logins.setup_link_id` with `ON DELETE SET NULL`. Release 17 never reads them. - `rollback-rehearsal` exercised both migrations on the landed heads: - #916: `Exercised rollback paths passed: a049a3c → 6037d86 → a049a3c → 6037d86, in 234s.` - #917: `Exercised rollback paths passed: a049a3c → d03a5bf → a049a3c → d03a5bf, in 217s.` - #918 and #915 change no migration or handler descriptor, so they had nothing to rehearse. - A rollback takes the Final step panel and setup links away. Home goes back to the old guide, and a CLI at `0.18.0` stays usable against release 17: `--setup` is only sent when `/llms.txt` prints it, and release 17's `/llms.txt` doesn't. ## How it was verified - `pnpm typecheck` and `pnpm lint` pass, and so do `packages/core`, `packages/api`, `packages/portal` and the skill lock test (245 tests), including `whatsNew.test.ts`, `schemas.test.ts` and `WhatsNewPages.test.ts`. - The live commit was pinned from `/healthz/deep`: `a049a3c`, release 17. The Deploy run updated last succeeded, and none is unfinished. - Each PR in the range was read, including its Release impact answers. All six landed with the reviewed trees: each squash left `main`'s tree identical to its PR's reviewed head. ## Release impact - [ ] **Breaking** — requires action from anyone already running this - [x] **Not breaking** — no action required This PR changes only the changelog text and the `patchy` version. As with every release, a CLI installed before this deploy is told to upgrade. - **What does a revert leave behind?** Nothing. People whose seen marker reached 18 would just see no new release. - **Does the release before it still work with that?** Yes. If this release misbehaves, roll back to `a049a3cf544ae89691eec547dea46773febfdf05` (release 17). Made by Claude Opus 5.5 in Claude Code, running in T3 Code. Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
Stacked on #913, so the onboarding stack shares one app shell. This PR could ship alone: merge #913 first.
What changed
The portal's setup line (
Set up Patchy using <instance>/llms.txt) logged the machine in, handled Claude Code's auto mode and the company look, then signed off without publishing anything. So a person finished setup with nothing live and a blank page to fill.Now setup ends with their welcome page live in the company look, unless they say they don't want one. Then their agent suggests a first patch drawn from what it knows about them: what they've told it, its memory of them, the files in the folder it's working in, and what their company already has. Patchy keeps no list of suggestions, and the agent doesn't offer generic ones. When it knows too little, it asks one question about their work and suggests from the answer.
Closes #908. Part of #906.
Look at
skills/patchy/references/onboarding.md:/llms.txt(packages/sdk/src/FrontDoor.ts) gets a Finish setup section: logging in isn't the end, and onboarding takes it from there. Before this, an agent told to skip the welcome page stopped atlogged_inwithout suggesting anything (run 2 below).Ben, a member, reruns the setup line on a machine that already had a welcome page: the welcome page is updated, and the suggestion comes from his notes
Cleo, a member, says "I don't want a welcome page": none is published, and the suggestion comes from her pipeline notes
How it was verified
Five supervised runs: Claude Code on Sonnet, a fresh HOME, npm prefix and CLI state per machine, none of my instructions or memory (checked with a sentinel probe), against a
teamdev environment built from this branch. I confirmed each login in a browser as the persona. Each run changed something:logged_inand never opened onboarding./llms.txtnow has Finish setup.pnpm dev trialrefuses setup prompts by design, so it wasn't used.Also passing:
pnpm exec vitest run packages/sdk/src/FrontDoor.test.ts packages/patchy/src/Setup.test.ts packages/patchy/src/skillLock.test.ts. The skill's lock hash is refreshed.Release impact
Skill and llms.txt text only. They ship with the release, and agents pick them up on their next install or upgrade.
Made by Claude Opus 5.5 in Claude Code, running in T3 Code.