Skip to content

feat: list saved PGN positions for active chapter - #25

Merged
levallem merged 1 commit into
mainfrom
feat/cms-024i-list-saved-pgn-positions
Sep 22, 2026
Merged

levallem merged 1 commit into
mainfrom
feat/cms-024i-list-saved-pgn-positions

Conversation

@levallem

Copy link
Copy Markdown
Owner

Closes #24

Summary

Implements CMS-024I by completing the first visible read path for persisted PGN positions.

Saved PGN position snapshots for the active chapter are recovered into a ProjectTab-owned cache and displayed read-only, separately from selected puzzles.

Motivation

CMS-024H completed the write path from PGN review to chapter-scoped persistence. CMS-024I makes that persisted material recoverable and visible after reopening a project, without introducing board loading, editing, deletion, export, or generic editorial abstractions.

Changes

  • Add a dedicated PGN positions cache in ProjectTab, contextualized by project path + chapter ID.
  • Refresh on project/chapter lifecycle changes and after a CMS-024H snapshot add.
  • Refresh Inserted and AlreadyExists from the SQLite source of truth.
  • Replace loaded data with a visible fail-closed state on read failure.
  • Add a separate read-only Saved PGN positions section with White, Black, Event, ply, and selected FEN.
  • Keep PGN positions separate from selected puzzles, target counts, reviews, and exports.
  • Add all six translations and document the persisted PGN workflow.

Validation

  • cargo fmt --check
  • cargo clippy --locked --all-targets -- -D warnings
  • cargo test --locked — 584 tests passed, 0 ignored
  • cargo check --locked --all-targets
  • cargo build --locked
  • git diff --check

Screenshots

Not required for this task; behavior is covered by ProjectTab state/integration tests.

Database / migration impact

None. CMS-024I reuses project schema v4 and list_pgn_position_snapshots_for_chapter(...); PROJECT_SCHEMA_VERSION remains 4.

Scope

Exactly 8 files: README.md, src/project_tab.rs, and six translation bundles.

No changes to src/main.rs, PGN review/import code, project persistence, schema/migrations, exports, puzzle persistence, engine, search, favorites, or dependencies.

@levallem levallem added the type:feature Feature work label Sep 22, 2026
@levallem
levallem merged commit 4cb7568 into main Sep 22, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:feature Feature work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CMS-024I — List saved PGN positions for active chapter

1 participant