feat: integrate invite API and improve notification handling

- Add invite code display and binding functionality via API
- Fix notification unread count sync on auth state change
- Improve notification mark read with server state validation
- Add auth state listener to trigger notification refresh
- Add YaoCoinConverter for coin-to-yao type conversion
- Remove YaoLegend from divination screens (UI cleanup)
- Abbreviate relation labels in yao detail view
- Add re-register notice to account delete screen
- Update 'coins' terminology to 'points' in localization
- Fix backend points consumption to only run in CHAT mode
- Add HttpxAuthNoiseFilter to suppress auth endpoint logging
- Fix notification static_schema import path
- Add test coverage for notification bloc error handling
- Update AGENTS.md page header rules and image handling
- Delete deprecated run-dev.sh script
This commit is contained in:
qzl
2026-04-13 14:52:22 +08:00
parent da947f9f08
commit 1e22f27de2
52 changed files with 1419 additions and 307 deletions
@@ -91,6 +91,34 @@ Protocol verification status:
- `yaoLines` item enum: `少阳 | 少阴 | 老阳 | 老阴`
- Additional fields are forbidden.
### Frontend coin-face to `yaoLines` derivation rules
This section is normative for frontend collection flows (`手动起卦` and `自动起卦`).
- Both manual and auto flows MUST use the same canonical conversion logic.
- Conversion baseline is manual flow semantics (`huaCount` baseline).
- Auto flow (`ziCount` baseline) MUST be converted to `huaCount` before mapping.
- Do not maintain separate mapping tables per page/screen.
Canonical mapping (`huaCount` -> `yaoType`):
- `0` -> `老阴`
- `1` -> `少阳`
- `2` -> `少阴`
- `3` -> `老阳`
Equivalent auto mapping (`ziCount` -> `yaoType`):
- `0` -> `老阳`
- `1` -> `少阴`
- `2` -> `少阳`
- `3` -> `老阴`
Implementation requirement:
- Frontend should centralize this conversion in one reusable converter and use it in both manual and auto screens.
- `yaoLines` sent to backend MUST always be derived from this canonical mapping and keep order `初爻 -> 上爻`.
### `runtime_mode` rules
- Allowed values: `chat | follow_up`.