Skip to content

feat(ui): user-story alignment — operator view, point sources, chat consume entry, multi-key failover - #22

Merged
argszero merged 1 commit into
mainfrom
feat/ui-alignment
Aug 14, 2026
Merged

argszero merged 1 commit into
mainfrom
feat/ui-alignment

Conversation

@argszero

Copy link
Copy Markdown
Owner

Summary

Align the UI prototype (ui/) with docs/user-stories.md per the host's instruction (rant 2026-08-14T22:07:50.623250 — "按用户故事评估并修改 UI 原型 — 补齐 6 处差距"). Closes gaps G1, G2, G4, G5 (G3 already shipped in #20, G6 verified clean — no 1 USD = 1000 点 residue).

  • G1 — 平台运营者视图(US-运营1 / US-运营2): new "平台运营 Operator" tab in the Admin view. ① Platform overview: online status, user count, shared-key count, trade volume, point inflow/outflow; ② top up a user: locate by username/email → enter points (fractional allowed) → confirm → permanent points added + a topup transaction recorded.
  • G2 — 点数来源与有效期(US-22 / US-23): point sources shown grouped with validity badges in both Wallet and Dashboard — gift (每日 1 点 · 当日有效 · 剩 N 天), earn (永久有效), top-up (永久有效).
  • G4 — 消费入口(US-6): each marketplace row gets a "使用 / 消费" button opening a chat-mock modal; sending deducts fractional points (输出参考价 × 0.19M tokens, 2-decimal), records a consume transaction, blocks when balance is insufficient.
  • G5 — 多 key 自动故障转移(architecture.md v0.2 §4.2.1): models with multiple upstream keys show a "多 key · 自动故障转移" badge in the marketplace.

Related Issue

Rant 2026-08-14T22:07:50.623250 (host instruction; no GitHub issue). Docs: docs/user-stories.md v1.7, docs/architecture.md v0.2.

Verification

  • node --check ui/js/data.js / ui/js/app.js pass
  • All app.js selectors exist in index.html (id cross-check)
  • Balance math sanity: POINT_SOURCES sum (1+12470+0) == USER.balance (12471)
  • G6: no stale "1 USD = 1000 点" copy in ui/
  • cargo test passes
  • cargo fmt --check passes

Notes

  • Branch: feat/ui-alignment (per CONTRIBUTING.md). One commit, squashed on merge.
  • Static prototype only — no backend changes.

…, chat consume entry, multi-key failover label
@argszero
argszero merged commit 9a3ff3e into main Aug 14, 2026
1 check passed
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