Skip to content

The pop-up opens on the record's step, not the door's - #528

Merged
serenakeyitan merged 1 commit into
mainfrom
fix/wizard-opens-on-the-record
Sep 10, 2026
Merged

The pop-up opens on the record's step, not the door's#528
serenakeyitan merged 1 commit into
mainfrom
fix/wizard-opens-on-the-record

Conversation

@serenakeyitan

Copy link
Copy Markdown
Collaborator

Closes #527.

What you saw

Clicking Create a free doc on the landing, as an account that has already finished the loop, showed the first screen for about half a second and then jumped to the congratulations screen.

Why

OnboardingWizard mounted on the step its door asked for — welcome from the landing CTA, paste from the hub card — and only then fetched /api/onboarding. The record says revised, so stepFromRecord returns done, and the step changed after the first frame. The shell had already fetched that same record at boot and was not passing it down.

What changed

  • openingFrom(record, initialStep) is the opening rule in one place: which step to open on, whether landing past the paste step should ask first, and whether there is nothing to show at all. The first poll tick now applies the same function it did inline before.
  • document-shell.jsx hands its onboardingRecord to the pop-up, so the opening step is computed synchronously, before the first paint.
  • With no record yet (the button pressed inside the first request), the card paints its frame and close button and nothing else, rather than the door's step. Card geometry is fixed, so the step that follows lands in place.

Verified

Local rig, landing CTA, sampling data-step every 25 ms after the click:

record before after
finished (revised) welcomedone at 25 ms done on the first frame
fresh (empty) welcome welcome
mid-journey (commented) resume question resume question

Offline suite green (80 suites). Hub door (no record in hand) shows the blank frame for one sample, then the right step — never a wrong one.

🤖 Generated with Claude Code

Clicking "Create a free doc" as an account that has finished the loop
showed the first screen for a beat, then jumped to the last one. The
wizard mounted on the step its door asked for and only then fetched
/api/onboarding; when the record came back it moved the step.

The shell already reads that record at boot, so it hands it over:
`openingFrom(record, initialStep)` — one function, applied both to a
record in hand and to the first tick — decides the opening step, whether
to ask before landing past the paste step, and whether there is nothing
to show at all. With no record yet the card paints its frame and nothing
inside; the geometry is fixed, so the step that follows lands in place.

Measured on the local rig, landing CTA with a finished record: before,
`welcome` then `done` one frame later; after, `done` on the first frame.
Fresh and mid-journey records still open where they did.

Refs #527

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Preview

Open this: https://pr-528-tdoc-preview.jyshi1107.workers.dev/ — the homepage, this PR's code
carrying the landing version in this PR's checkout.
Or a document: https://pr-528-tdoc-preview.jyshi1107.workers.dev/d/conway-life/v/2

This link is unique to this PR. New commits update the same URL. It is not tdoc.dev.

Preview has no Durable Object — concurrent comments use the KV fallback. Data expires in 14 days.

@serenakeyitan
serenakeyitan merged commit e1b06ee into main Sep 10, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Onboarding wizard flashes the door's step before jumping to the record's step

1 participant