3 次代碼提交 bf6470d09d ... 713a90029f

作者 SHA1 備註 提交日期
  Oleg Panashchenko 713a90029f chore: ignore raw word-bank candidate files 1 月之前
  Oleg Panashchenko 9a90e44038 docs: update project map for raw/11-14 1 月之前
  Oleg Panashchenko 27e480ea68 fix: reset stale guesses when the daily word changes 1 月之前
共有 4 個文件被更改,包括 28 次插入 和 17 次删除
  1. 3 0
      .gitignore
  2. 16 17
      _bmad-output/project-context.md
  3. 4 0
      client/src/App.tsx
  4. 5 0
      raw/14-new-word-clean.md

+ 3 - 0
.gitignore

@@ -15,3 +15,6 @@ raw/russian-5letter-freq-sortalpha.txt
 raw/russian-5letter-freq-sortfreq-wordsonly.txt
 raw/russian-5letter-freq-sortfreq.txt
 raw/russian-mnemonic-words-52.txt
+raw/ru-add/russian-new0718.txt
+.gitignore
+raw/ru-add/russian-newcandidates.txt

+ 16 - 17
_bmad-output/project-context.md

@@ -7,12 +7,12 @@ paradigm: 'SPA + stateless REST API'
 scope: 'Wordle clone — bilingual (EN/RU) game, solver engine, word bank'
 status: current
 created: '2026-08-14'
-updated: '2026-08-14'
+updated: '2026-08-17'
 sources:
   - '_bmad-output/planning-artifacts/prds/prd-wordle-2026-07-07/prd.md'
   - '_bmad-output/planning-artifacts/architecture/architecture-wordle-2026-07-07/ARCHITECTURE-SPINE.md'
   - '_bmad-output/planning-artifacts/epics.md'
-  - 'raw/01…13 (feature/bug change log)'
+  - 'raw/01…14 (feature/bug change log)'
 ---
 
 # Project Map — Wordle
@@ -190,7 +190,7 @@ run (~14 s, includes entropy) in a forked child** and upgrades the cache entry w
 | `briefs/brief-wordle-2026-07-07/brief.md` | Product brief (v1 scope, "computer ranking + guessing" as differentiators) |
 | `briefs/…/addendum.md` | Parked post-v1 features (tiered by solver dependency) + rejected ideas |
 | `prds/prd-wordle-2026-07-07/prd.md` | v1 PRD: FR-1…FR-19, user journeys UJ-1…5, glossary, non-goals |
-| `architecture/…/ARCHITECTURE-SPINE.md` | Architecture decisions AD-1…AD-12 (⚠ partly stale vs code — see §6) |
+| `architecture/…/ARCHITECTURE-SPINE.md` | Architecture decisions AD-1…AD-15 (reconciled with code — see §6) |
 | `epics.md` | Epic 1 (play the game) + Epic 2 (solver engine), stories 1.1–1.3, 2.1 |
 | `implementation-readiness-report-2026-07-07.md` | Pre-impl readiness check |
 
@@ -220,9 +220,10 @@ This is the **living docbase of post-v1 work**. Read these before touching a rel
 | 08 | Refactor | Remove `id` key from targets; use array index ✅ |
 | 09 | Bug | Histogram green bars show empty-or-full instead of proportional ⚠ |
 | 10 | Feature | Wordle Solver at `/solver` + `/ru/solver` (server-side filtering) ✅ |
-| 11 | Feature | **Daily-word replay**: restore same-day game / show results instead of blank board (in flight) |
-| 12 | Bug | `currentGame.wordId` not saved until first guess (in flight) |
-| 13 | Feature | Compact EN/RU language switch position (in flight) |
+| 11 | Feature | **Daily-word replay**: restore same-day game / show results instead of blank board ✅ |
+| 12 | Bug | `currentGame.wordId` not saved until first guess ✅ |
+| 13 | Feature | Compact EN/RU language switch position (switch onto the title row) ✅ |
+| 14 | Bug | Fresh guess screen when the daily word changes — clear stale previous-word guesses (in flight) |
 
 `_bmad/10-feature-wordle-solver.md` is a duplicate copy of `raw/10`.
 
@@ -282,20 +283,18 @@ spine as AD-2/AD-4/AD-9/AD-12/AD-13/AD-14):
 
 ---
 
-## 7. Current in-flight work (uncommitted, as of 2026-08-14)
+## 7. Current in-flight work (uncommitted, as of 2026-08-17)
 
-Git `status` shows these modified/untracked — they correspond to `raw/11`, `raw/12`, `raw/13`:
+raw/11–raw/13 were committed 2026-08-14 (`585a6f0` language switch, `bf6470d` daily-word
+replay + store-wordId-before-first-guess). raw/14 sits on top of them:
 
-- **Modified:** `shared/src/game.ts`, `client/src/App.tsx`, `client/src/hooks/useGame.ts`,
-  `client/src/screens/Screen3Results.tsx` — daily-word replay + store-wordId-before-first-guess
-  (raw/11 + raw/12).
-- **Modified:** `data/word-bank-ru.json` — RU word bank edits (hints / plurals).
-- **Untracked:** `raw/11-feature-daily-word-replay.md`, `raw/12-bug-store-current-word-before-first-guess.md`,
-  `raw/13-ui-language-switch-compact.txt`.
-- Also modified: `.claude/settings.local.json`, `.gitignore` (tooling).
+- **Modified:** `client/src/App.tsx` — raw/14: call `resetForNewGame()` in both new-word
+  branches so a changed daily word shows a fresh guess screen (the `useGame` hook seeds its
+  internal `guesses` once at mount, so clearing `currentGame` alone left stale guesses).
+- **Untracked:** `raw/14-new-word-clean.md` (spec).
+- Also modified (tooling, left uncommitted): `.claude/settings.local.json`, `.gitignore`.
 
-Recent commit `3ef3d49` "fix: replace plurals in word-bank targets and add hints" is the
-last landed change; the daily-replay work sits on top of it.
+Latest landed commit is `bf6470d` "feat: restore same-day daily game on return".
 
 ---
 

+ 4 - 0
client/src/App.tsx

@@ -46,6 +46,8 @@ export default function App() {
           else setScreen('game');
         } else {
           if (stored) updateState({ currentGame: undefined });
+          // New word — clear any guesses restored from the previous word (raw/14)
+          resetForNewGame();
           setWordId(res.wordId);
         }
       }).catch(() => {
@@ -67,6 +69,8 @@ export default function App() {
         } else {
           // New word — fresh start
           if (stored) updateState({ currentGame: undefined });
+          // Clear any guesses restored from the previous word (raw/14)
+          resetForNewGame();
           setWordId(res.wordId);
           setScreen('game');
         }

+ 5 - 0
raw/14-new-word-clean.md

@@ -0,0 +1,5 @@
+## clean new game start
+By now when daily-word API returns not the same word id as last guessed daily word in local storage, UI shows data for last solved daily word.
+Change the above. When daily-word id from API is not the same as last solved daily word, show fresh guess screen.
+When daily-word id is thr same as last solved, keep showing solved daily word.
+