feat(onboarding): no hint toast after the first-chart star convergence
Independent Staging Quality Gate / validate (push) Failing after 10m40s
Independent Staging Quality Gate / publish (push) Skipped

Product 2026-09-29: drop 「这片天空在星盘页可以保存。」. The chart page entry is now replay + share.
Verified: tsc 0, lint 0 errors, npm test 4335/4280/24 (same 24 Docker/DB/deploy names),
quick gate (gate params) passed, / Static, first-screen JS gzip 651,512 -> 651,143.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N4f2nya58RoRu4yEmJgRGE
This commit is contained in:
Jesse_Chen
2026-09-29 09:24:00 +08:00
co-authored by Claude Opus 5.5
parent f51c830b52
commit 9686dfb945
6 changed files with 24 additions and 29 deletions
+4 -16
View File
@@ -1,25 +1,21 @@
"use client";
import { useCallback, useEffect, useRef, useState } from "react";
import { toast } from "sonner";
import { loadBirthSkyRevealSky, startBirthSkyReveal, type BirthSkyRevealSky } from "@/lib/birth-sky/reveal";
/** Shown once on the home page after the convergence ends (VOICE.md). */
export const BIRTH_SKY_REVEAL_HINT = "这片天空在星盘页可以保存。";
/**
* The one-time 「那一刻的天空」 convergence after the reader's own first chart
* (TASK-birth-sky-cover-20260928 T6 → TASK-birth-sky-followup-20260928 F4).
* Owns its state so Home only wires it: `begin` goes to the onboarding hook,
* `cover` / `close` to the overlay. `cover` is the sky plus the serif verdict,
* ready before the first frame. Saving one's own birth place happens once per
* account, so no "seen" flag.
* account, so no "seen" flag. Nothing follows the overlay: the hint toast was
* removed by the product on 2026-09-29.
*/
export function useBirthSkyReveal() {
const [cover, setCover] = useState<BirthSkyRevealSky | null>(null);
const cancel = useRef<(() => void) | null>(null);
const playing = useRef(false);
const begin = useCallback(() => {
cancel.current?.();
@@ -32,19 +28,11 @@ export function useBirthSkyReveal() {
]);
return sky;
},
onReady: (next) => {
playing.current = true;
setCover(next);
},
onReady: (next) => setCover(next),
});
}, []);
const close = useCallback(() => {
if (!playing.current) return;
playing.current = false;
setCover(null);
toast(BIRTH_SKY_REVEAL_HINT);
}, []);
const close = useCallback(() => setCover(null), []);
useEffect(() => () => { cancel.current?.(); }, []);