Repository navigation
Show Magic Compose's questions in the drafting screen, as a step - #688
Conversation
The questions used to replace the waiting screen with a different layout, which felt like a jump. They now arrive in the same frame: "A few details" becomes a step between reading and drafting, the questions take the panel's place, and only the left column's words change. - Shared step pieces (frame, step list, sparkle) move to Steps.tsx; the phone's one-line progress and the "here" dot load with the questions. - Steps still to come are drawn in ink-soft / ink-muted, which pass the contrast the old surface-sunk outline and faded label did not. - Phone: Back sits top left, the steps shrink to one line, and drafting from the answers opens at the top. - A refused Draft my signup scrolls its message into view; Back focuses the description with the caret at the end. - /app/signups/new budget 115 -> 116 kB: the shared step module can't be merged into the page's code, as the lazily loaded questions use it too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The stack fixed the questions screen's tophat findings meanwhile, two of which this branch also fixed. Resolved by keeping the stack's versions: - Compose.tsx and MagicComposeRoot.tsx: the stack's `focusAtEnd` after Back replaces this branch's `focusOnMount`. - Questions.tsx: the stack's logic (the focused, scrolled error box, `draftWithPlaceholders`, `appendAnswers(prompt, questions, …)`) inside this branch's frame layout. - Questions.test.tsx: dropped this branch's scroll and Back-focus tests, which the stack's own tests now cover. - CHANGELOG: this branch's line no longer claims those two fixes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A review of the questions-in-the-frame change found: - After the questions, the steps showed the title as under way but still spent reading's 700ms first, so the title sat still for 1.4s. The step timer now starts at the title, and a test checks it finishes 700ms sooner than a first-call draft. - The "A few details" row's grow-in animation kept its 52px height cap after it ended, with overflow hidden, so larger text could be clipped. It now fills backwards only. - The "You wrote" box's one-line variant had no callers left. - A comment still said the error shows above the card. - A test's window.scrollTo spy could leak into the next test on failure. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UW9ZpEu4MWkeqTv2Qe14ks
|
Taking this one on as part of the stack. I ran
Left as is:
Your call on the budget: I'm keeping 115 → 116 kB. With my fixes, Re-checked on desktop (1280×900) and phone (390×844) against a fake AI:
Generated by Claude Code |
A tophat of the questions in the drafting frame found the When control (One day / Several days / Not decided) never wrapped: in the frame's narrower panel it ran 14px past the edge at 768px, and at large text it cut "Not decided" off, as it already overlapped on a phone at 125% text. Its choices now wrap onto more rows as whole choices, and on a phone its columns are sized in rem, so normal text keeps them in one row and large text stacks them. The Drafting from card's header wraps too, so its "One left blank" badge no longer runs past the card at 200% text. The "A few details" row's grow-in cap is now in rem, so at large text the row isn't clipped while it grows and then snapped taller. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UW9ZpEu4MWkeqTv2Qe14ks
|
A second, independent tophat of 64fb51a: desktop 1280×900, 768px wide and phone 390×844, against a fake AI, with larger text up to 200%. Works as described:
Fixed in 6153bd5:
Left as is:
Generated by Claude Code |
From a review of this PR: - scripts/email-preview.ts parsed the request target with `new URL()`, which throws on `//[` and took the server down. It now splits on `?`. It also listens on every interface again, as react-email's preview did, so a phone or a browser outside a container can open it. - The magic-link sample had no `code`, a variant production never sends, so the code block was neither previewed nor checked. It now has one, and the render check looks for it. - Each sample now carries the strings its render must contain, so adding a template is one edit in scripts/lib/email-samples.ts. - worker-render.test.ts checks that `email:dev` uses the worker's tsx flags, which is what its "renders as the worker sends it" relies on. - The global `next` override goes. It only kept react-email 3's own Next.js in line, and pnpm applies overrides to direct dependencies too, so it would have overruled a hand-made bump of `next`. The lockfile still resolves next 15.5.28. Also merges main (Magic Compose questions, #572-#688). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013GLSJgi5BBQ8kdiDBG6Cbq
Part of #570, on top of the questions stack (#572 → #573 → #575 → #576 → #577). It's based on #577's branch.
Merge with #576 and #577, so the questions never ship with the old transition.
The problem
When Magic Compose answered with questions, the screen jumped:
The owner found it jarring while tophatting #577.
On phones, two more things:
surface-sunk(#eef1f5, 1.13:1 on white), which the design system keeps for borders and dividers, and its label was faded to 60%.The fix
One frame for the whole AI round. The waiting screen, the questions and drafting from the answers now share the waiting screen's frame.
rise,fade-in,grow-in), each 240–320ms, switched off underprefers-reduced-motionalongside the existing ones. The heading still takes focus.ink-softoutline (3.09:1, enough for a graphic) and anink-mutedlabel (5.97:1). This is in the shared step list, so the existing drafting screen's faint steps are fixed too: axe flagged them at 1.99:1 onmain.aria-current="step"marks the current step, and both step lists are named "Progress".Already fixed in the stack. The #576 tophat findings that touch this screen (the message out of sight on a phone, focus after Back) were fixed in #576 itself while this PR was open. This PR merges them in and keeps the stack's versions: a refused Draft my signup scrolls to and focuses its message, now at the top of the panel, and Back focuses the description.
Code.
Steps.tsxholds the shared frame, the draft steps, the step list and the sparkle.StepLine.tsxholds the phone's one-line progress and the "here" dot. Only the questions and drafting from their answers use them, so they load with the questions. The drafting screen importsStepLinelazily.Where it departs from the boards
On desktop, the questions now sit in the drafting frame's right-hand panel, not in the canvas's single-column board. The panel is about 690px wide, so the 680px questions card fits as it was. The questions, their order and their copy are unchanged.
Your call
/app/signups/new's budget goes from 115 to 116 kB. It measures 115.3 kB; #577's head measures 114.9 kB.Steps.tsxis shared by the page and by the lazily loaded questions, so webpack can't merge it into the page's own module. That costs about 0.2 kB on top of the new behaviour.aria-currentand the scroll to the top.Tests
Questions.test.tsx: the questions show "A few details" as the current step, and Back comes before the heading in the page. The stack's own tests cover the message scroll and the focus after Back.Drafting.test.tsx:pnpm lint && pnpm typecheck && pnpm knip && pnpm test(1990) pass, and so doespnpm build && pnpm budgets.🤖 Generated with Claude Code
Generated by Claude Code