Move trophy definitions next to each game and type trophy ids
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 55/100
- issue の種類
- リファクタリング
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript, vite
調査の方向性
Start with shared/achievements.ts and games/registry.json to understand the trophy list and game registry, then read src/hub/trophies-panel.ts for how games without trophies are displayed. The issue proposes four steps, including adding tests despite noting that no test suite exists; first run npm run typecheck and npm run build to establish the baseline. Done means mistyped trophy IDs fail typechecking and adding a game no longer requires editing shared/achievements.ts.
索引モデルが issue の本文から書いたものです。
説明
Summary
All 43 trophies live in one hand-maintained list in a shared module, so every new game edits shared code, and the set of games is stated twice (registry and the trophy list). Trophy ids are bare strings at call sites.
Where
shared/achievements.ts:22-76,shared/achievements.ts:110-111,shared/achievements.ts:143-144src/hub/trophies-panel.ts:26-27(games with no trophies are skipped, hiding their stats)
Impact
- A mistyped id in
unlock('...')compiles and silently never unlocks. - A game added without trophies is excluded from the "play every game" trophy and from the stats panel.
shared/achievements.tschanges in every game-add commit.
Suggested fix
Each step leaves the build working:
- Add tests for
unlock,addCounter,recordPlayand a registry consistency test. - Derive a
TrophyIdunion from the list (as const) and typeunlock(id: TrophyId). No behaviour change. - Move each game's rows to
games/<slug>/trophies.tsand build the list withimport.meta.glob(Phaser-free, so the hub still loads it cheaply). - Derive the "play every game" set from the registry, and render a stats-only section for games with no trophies.
Acceptance criteria
- A mistyped trophy id fails typecheck
- Adding a game does not require editing
shared/achievements.ts
Getting started
- Relevant files:
shared/achievements.ts,games/registry.json,src/hub/trophies-panel.ts - Run locally:
npm install, thennpm run dev - Checks:
npm run typecheckandnpm run build(there is no test suite yet) - Related docs:
README.md
Related: #1
Filed by repo-audit/full-audit at b001f5d. Severity: medium. Effort: M. audit-key: tech-debt|shared/achievements.ts|TROPHIES
- 主要言語
- TypeScript
- スター
- 3
- フォーク
- 3
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
TMHSDigital/GH-Arcade のほかの issue
-
enhancement good first issue severity: low
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
TMHSDigital/GH-Arcade#50 ·
-
enhancement good first issue severity: medium
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
TMHSDigital/GH-Arcade#47 ·
-
documentation good first issue severity: low
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
TMHSDigital/GH-Arcade#34 ·
-
documentation good first issue severity: low
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
TMHSDigital/GH-Arcade#33 ·
-
dependencies good first issue severity: low
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
TMHSDigital/GH-Arcade#27 ·
TMHSDigital/GH-Arcade の issue をすべて見る
似ている issue
-
automated-triage type/bug type/ci
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
📦 expo-router Android contributor: external needs review sdk-58 severity: medium
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
Translate the READMEオープンdocumentation good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
asasemahmed/openboard#68 ·
メンテナーはふだん 1 日以内に返信
-
bug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
Document PowerShell shell semantics and read-only Bash deduplication in Built-in Tools referenceオープンdocumentation
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100