Past games with the same moves merge, losing the newer game's date and opponent
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 84/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- javascript
調査の方向性
js/game-store.js の addToArchive と、js/game-ui.js のアーカイブ読み込みフロー(handleArchiveClick)から始めてください。js/notation.js では指し手テキストの比較を定義しています。tests/unit/archive.test.js を読み、npm test を実行して既存のアーカイブ動作を確認してください。完了条件は、同じ指し手の別々の対局が別々のまま保たれ、対局を再度開いてアーカイブすると、その対局自身のエントリーが置き換わることです。対局終了後も同様です。
索引モデルが issue の本文から書いたものです。
説明
Summary
addToArchive treats two past games as the same game when their FEN and their movetext match. The merge is meant for a game that was opened from the list and put back. But separate games with identical moves also merge, and the newer game's date and opponent are lost.
Where
js/game-store.js:79-83(addToArchive)js/notation.js:203(pgnMovetext)
Details
const same = (entry) => pgnMovetext(entry.pgn) === pgnMovetext(game.pgn);
const entry = archive.find(same) || game; // the older entry wins
The comparison ignores the player names, the date and the time control.
Impact
- Short games merge: every game abandoned after
1. e4, a quick resignation, or the same short line against different levels. The list shows one entry, with the first game's date and opponent. - In the other direction, a game archived while unfinished (
*) and later reopened and finished stays in the list twice, because the movetext differs.
Steps to reproduce
- Start a game, play 1.e4, then press New Game twice to discard it.
- Change the opponent level and repeat.
- Open Load. There is one "1 move" entry, with the first game's opponent and date.
Suggested fix
Remember which archive entry a game was opened from, for example by keeping that entry's date in gameStart when handleArchiveClick loads it. Merge only with that entry, and replace it, so a finished version replaces its unfinished copy. As a simpler alternative, add the White/Black tags and the date to the comparison key.
Acceptance criteria
- Two separate games with the same moves are kept as two entries
- A game opened from the list and put back replaces its own entry (also when it was finished meanwhile)
Getting started
- Relevant files:
js/game-store.js,js/game-ui.js(handleArchiveClick),tests/unit/archive.test.js - How to run tests:
npm ci && npm test
Filed by repo-audit/full-audit at 73cd279. Severity: low. Effort: S. audit-key: bug|js/game-store.js|addToArchive
- 主要言語
- JavaScript
- スター
- 4
- フォーク
- 2
- 平均マージ
- 6時間 13分
- マージ済み PR(30日)
- 4
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
TMHSDigital/Static_Chess のほかの issue
-
enhancement good first issue severity: low
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
TMHSDigital/Static_Chess#163 ·
メンテナーはふだん 1 日以内に返信
-
good first issue performance severity: low
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
TMHSDigital/Static_Chess#157 ·
メンテナーはふだん 1 日以内に返信
-
documentation good first issue severity: low
難易度 1/5 1〜3時間 初心者へのやさしさ 90/100
TMHSDigital/Static_Chess#155 ·
メンテナーはふだん 1 日以内に返信
-
good first issue reliability severity: low
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
TMHSDigital/Static_Chess#150 ·
メンテナーはふだん 1 日以内に返信
-
bug good first issue severity: low
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
TMHSDigital/Static_Chess#145 ·
メンテナーはふだん 1 日以内に返信
TMHSDigital/Static_Chess の issue をすべて見る
似ている issue
-
marketing
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
[Bug] Account menu (footer ⚙) doesn't dismiss on outside click — stays open and covers the Bot listオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
Fei2411/DeepSeek-Bot#1693 ·
-
area-templates triage:bot-seen triage:needs-human
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
microsoft/aspire#22356 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
HarperFast/skills#153 ·