Skip to content

feat(game-skin-admin): two-tier nav + unify KV schema to pieces - #28

Closed
joke-lx wants to merge 2 commits into
mainfrom
feat/chess-skin-admin-cascade-cleanup
Closed

feat(game-skin-admin): two-tier nav + unify KV schema to pieces#28
joke-lx wants to merge 2 commits into
mainfrom
feat/chess-skin-admin-cascade-cleanup

Conversation

@joke-lx

@joke-lx joke-lx commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #27: promote game-skin-admin two-tier nav that was not included in the first merge.

  • Rename chess-skin-admin -> game-skin-admin (git mv, preserving history).
  • game-skin-admin: single component with top-level tabs Games | Emoji.
    • Games -> GameListView (card grid from GAME_SKIN_REGISTRY) -> GameDetail
      (per-game 3 tabs: preview | replace | upload) + deep-link ?game=.
    • Emoji -> EmojiListView stub (Phase 3 emoji common- packs).
  • useSkinAdmin factory: parameterize 12 chess hard-codes + groupId/assetKeys;
    unify KV schema field name to pieces (fr-aligned).
  • Lint 0 errors; showcase vite build 31.72s green.

joke-lx and others added 2 commits September 2, 2026 00:56
deleteSkin 之前只移 KV index,文件资源保留 —— 与"删除"语义不一致,且长期累积
孤儿文件。现改为文件先删 + KV 后移:并发 DELETE 全部 pieces 与 boardBackground,
任一失败抛错中止(KV 不动);全部成功才移除 KV index。

replacePiece 同样会在 KV 持久化后 best-effort 清理被替换的旧 fileId(失败仅记
录,不影响主操作),避免每次换皮都留下一个孤儿文件。

UI 文案同步更新:删除 modal 描述移除"文件资源保留",按钮 tooltip 改为"联动删
除文件";替换 status 在新旧文件清状态之间给出三种文案分支。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Rename chess-skin-admin -> game-skin-admin (git mv, preserving history)
and restructure per user's spec:

- Two tabs at the top: Games | Emoji (Phase 3 emoji list stays as a stub
  EmojiListView until the emoji KV + Lua action pipeline lands).
- Games tab: GameListView (card grid from GAME_SKIN_REGISTRY) -> click
  through to GameDetail (per-game admin with 3 tabs: preview | replace |
  upload).  (?) store/restore scoped per detail entry; popstate sync
  keeps the ?game deep-link aligned.
- Emoji tab: EmojiListView placeholder for common-<game> emoji packs
  (tag-prefix <gameId>-emoji), wired next phase.
- Unified KV schema field name to pieces (was pieces|assets dual field
  + gameId==='chess' branches).  fr/lib/core/game_kit/skin/game_skin_meta.dart
  always serializes/deserializes pieces; gomoku now uses the same field.

Ve lint 0 errors; showcase vite build 31.72s green.
@joke-lx joke-lx closed this Sep 4, 2026
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