The wizard asked for the account name again and a "Tell us about yourself" form, and the focus answer in the main conversation was never saved. The main bot now gets to know the user in the main conversation instead, one card after each answer. - UserOnboarding keeps the pending step, the focus and when onboarding finished. - onboarding-intake.ts declares the steps (focus, goal, rhythm, quiet hours, notifications) as cards plus what their answers change; onboarding.ts commits an answer, the focus app suggestions and the next card or the closing line in one transaction. - The choice block gains a step, an optional text input and the typed answer; choose takes the step, the text and whether the device can still turn push on. - The focus answer becomes a goals fact; the goal, rhythm and quiet-hours effects and the push seam are placeholders until the coach and notification modules are merged. - The wizard drops the preferences step and fills time zone, locale and language from the browser; the main bot's prompt notes open onboarding cards; agent history shows a card's question and answer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MRtGG9ARfqqhma3t85Ro2u
15 lines
570 B
TypeScript
15 lines
570 B
TypeScript
/**
|
|
* Push for the onboarding notifications card. The server offers the card only when the browser
|
|
* that answered the card before it could still turn push on, and tapping "Turn on" is the user
|
|
* gesture that subscribes before the card is answered. Both wait for the web push client
|
|
* (`lib/web-push.ts`); until it lands the card is never offered.
|
|
*/
|
|
export async function canOfferPush(): Promise<boolean> {
|
|
return false;
|
|
}
|
|
|
|
/** Subscribes this browser; true when push is on afterwards. */
|
|
export async function turnOnPush(): Promise<boolean> {
|
|
return false;
|
|
}
|