Skip to content

feat(growth-loop): redemption lifecycle resilience and W4 sound effects integration - #112

Draft
WardLu wants to merge 23 commits into
mainfrom
feat/growth-loop-redemption-lifecycle
Draft

feat(growth-loop): redemption lifecycle resilience and W4 sound effects integration#112
WardLu wants to merge 23 commits into
mainfrom
feat/growth-loop-redemption-lifecycle

Conversation

@WardLu

@WardLu WardLu commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • 兑现生命周期容错与状态恢复:解决此前 QA Review 中指出的中危阻塞项——在 src/learning-growth-loop-controller.jsreconcileUnconfirmed() 中增加 redemption_fulfill 处理;针对终态失败/冲突清理本地 fulfill_requested 并记录 sync_error,UI 避免永久卡在“兑现已请求”,并支持重试与补偿退款。
  • W4 音效引擎与设备级设置:基于 Web Audio API 实现五类固定程序化无随机合成音效(action_completed / points_earned / try_again / points_deducted / reward_fulfilled),每类支持 2~3 种变体;设备级设置(总开关、音量、事件级变体与试听、重置)保存于 localStorage,不同步云端。
  • 界面入口与 E2E 修复:在 index.html 主导航中补充设置入口,打卡与积分事件均接入音效。

Verification

  • npm run verify:通过;48 个测试文件、409 项用例全部通过,build / public / security / static checks 均通过,代码覆盖率 76.35%。
  • Playwright E2E:tests/e2e/sounds.spec.js(7/7 通过)与 tests/e2e/growth-loop.spec.js(5/5 通过),共 12 项用例通过。

Merge Gates

  • 等待独立 Code Review。
  • 真实设备音量/听感/TTS 互斥仍需真机人工验收。

Closes: SHA-6

@vercel

vercel Bot commented Sep 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
shadow-mate Ready Ready Preview Sep 7, 2026 3:10pm UTC

…d dynamic compression for all 15 sound variants
…ve shaper for distinct 60%-200% volume scaling
…d unblock retry

- Align refund ledger request_id with server RPC to prevent duplicate rows on merge
- Deduplicate legacy :refund rows in mergeGrowthLoopSnapshot
- Track session fulfillment requests to avoid playing reward sounds on hydrate/background sync
- Reset fulfill_requested/cancel_requested on sync failure and display sync error with retry/cancel actions
- Connect throttle and non-overlap check to sound preview
- Remove unintended sound effects from math quiz submit
- Update README and user-guide to include Settings top-level navigation
…authenticated local-only mode

- Immediately confirm redemptions and refunds when scope has no cloud household
- Allow parents to mark rewards fulfilled or cancelled locally without waiting for server sync
- Trigger completion celebration sound directly on local fulfillment
- Refine grow page stats and descriptions to distinguish local-only mode from cloud-connected sync
- Add documentation in architecture.md, user-guide.md, and README
- Add unit and E2E coverage for unauthenticated and authenticated redemption lifecycles
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.

1 participant