feat(02-05): wire compost beat toast (Plan 02-04 deferral)
- src/ui/settings/compost-toast.tsx: thin transient toast (D-07,
GARD-04). Reads a rotating line from uiStrings[1].post_harvest_beat
on each compost dispatch; fades out after 3.5s. Co-located with
PersistenceToast as the plan specified ('folded into the persistence-
toast UI surface').
- src/store/session-slice.ts: compostBeatTick monotonic counter +
bumpCompostBeat action. Counter (vs boolean) ensures consecutive
composts re-fire the toast without dedup.
- src/game/scenes/Garden.ts: handleTilePointerDown's compost branch
calls bumpCompostBeat after enqueueCommand.
- src/App.tsx: mounts <CompostToast />.
- 4 new compost-toast tests; 312/312 vitest green; e2e still 1.6s
green; npm run ci exits 0.
Implementation choice (per plan 'surfaced in SUMMARY'): minimum-viable
toast surface chosen over the Ink runtime path. The Ink-authored
compost-acknowledgements.ink content remains compiled + runtime-
loadable via loadInkStory + InkRenderer, so a future plan can swap
this component for the richer voice without touching sim or store.
This commit is contained in:
@@ -4,6 +4,10 @@
|
||||
* Plan 02-05 ships:
|
||||
* - Settings: D-28 save-management modal (Export / Import / Restore)
|
||||
* - PersistenceToast: D-30 one-time soft toast in voice
|
||||
* - CompostToast: D-07 + GARD-04 thin transient toast (Plan 02-04
|
||||
* deferral landed here — co-located with PersistenceToast since
|
||||
* both share the same toast UX shape).
|
||||
*/
|
||||
export { Settings } from './Settings';
|
||||
export { PersistenceToast } from './persistence-toast';
|
||||
export { CompostToast } from './compost-toast';
|
||||
|
||||
Reference in New Issue
Block a user