A legal FEN is not a game: state identity in a browser chess extension
说明与用途
ChessNavio 扩展通过检查 FEN、boardEpoch、configRevision、jobId 和平台游戏 ID,确保仅在真实游戏状态下显示 Stockfish 建议,避免在大厅或重赛中误显示箭头。
问题
A browser chess extension must reliably identify when a board represents a live game, avoiding false positives on lobbies, broadcasts, or rematches that share the same FEN.
结果
By combining DOM signals, engine state, and platform identifiers, the extension now accurately distinguishes live games from non‑game boards, preventing misleading move suggestions.
工作流
- 1. Verify the current URL matches a known game route for the site.
- 2. Ensure exactly one visible board of the expected type exists.
- 3. Check that the game has started (e.g., presence of move list or controls).
- 4. Retrieve the platform game ID if available.
- 5. Capture the board’s FEN, boardEpoch, configRevision, and jobId from the DOM and engine state.
- 6. Store a PresentationIdentity object with these values.
- 7. When the engine returns a bestmove, compare its FEN, epoch, jobId, and configRevision to the stored identity.
- 8. If all match, render the suggested move and caption; otherwise discard the result.
证据
If any of that is missing, nothing renders. I'd rather the panel sit there doing nothing than draw an arrow on a lobby or a broadcast.
The type we compare at presentation time isn't a FEN and isn't a session snapshot: ...
- 记录日期: 2026-09-17T20:30:24.639Z