Skip to content

Add saved drill presets to opening selection#307

Merged
ashtonanderson merged 1 commit into
mainfrom
saved-drills-presets
Jun 6, 2026
Merged

Add saved drill presets to opening selection#307
ashtonanderson merged 1 commit into
mainfrom
saved-drills-presets

Conversation

@ashtonanderson
Copy link
Copy Markdown
Member

Summary

Adds a saved-drill preset system to the opening/endgame selection modal, persisted to localStorage.

  • New src/lib/savedDrills.ts — read/write/upsert presets keyed by a per-selection signature (opening, variation, rating, color, move count, endgame traits), plus signature and default-name helpers with normalization and de-duplication.
  • Saved Drills category in the browse panel, filtered by the active category and search term, with select/remove.
  • Save behavior: acts on the queue when it has drills, otherwise on the drill currently configured in the preview — so loading a saved preset, tweaking a setting (e.g. rating), and hitting Save creates a distinct saved drill rather than doing nothing. The signature already keys on settings, so same opening at different ratings = different saved drills.
  • Title hierarchy: selection titles now show the variation as the primary label and the opening family as the secondary label, in both the saved-drills list and the queue.

Testing

  • npx tsc --noEmit — clean
  • npm run lint — clean (one pre-existing unrelated warning in _app.tsx)

🤖 Generated with Claude Code

Introduce a saved-drill preset system in the opening/endgame selection
modal, persisted to localStorage and keyed by a per-selection signature
(opening, variation, rating, color, move count, endgame traits).

- New src/lib/savedDrills.ts: read/write/upsert presets, signature and
  default-name helpers, with normalization and de-duplication.
- Saved Drills category in the browse panel, filtered by the active
  category and search term, with select/remove.
- Save acts on the queue when it has drills, otherwise on the drill
  currently configured in the preview, so tweaking a loaded preset's
  settings (e.g. rating) saves as a distinct drill rather than a no-op.
- Selection titles show the variation as the primary label and the
  opening family as the secondary label, in both the saved-drills list
  and the queue.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
maia-platform-frontend Ready Ready Preview, Comment Jun 6, 2026 5:37pm

Request Review

@ashtonanderson ashtonanderson merged commit 1eabef0 into main Jun 6, 2026
6 checks passed
@ashtonanderson ashtonanderson deleted the saved-drills-presets branch June 6, 2026 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant