Skip to content

Study Stacks build-out: decks, admin, leaderboards, and UI polish#2

Open
LinaBell wants to merge 14 commits into
mainfrom
dev
Open

Study Stacks build-out: decks, admin, leaderboards, and UI polish#2
LinaBell wants to merge 14 commits into
mainfrom
dev

Conversation

@LinaBell

@LinaBell LinaBell commented Jul 9, 2026

Copy link
Copy Markdown

Summary

Rolls up all dev work since the last main merge into a single release into main.

  • Full Study Stacks app build-out (4311e3d)
  • Grades options update (6a64f83)
  • UI flow rework + assorted cleanup (35d17b6)
  • Admin features update + admin UI (07a9a8d, 4b248aa)
  • Per-deck leaderboards, study-mode picker modal, type-suffix rename, misc fixes (f141594)
  • Delete-deck bug fix (f70a83f)
  • CSS + UI updates (0b3bc49, e499120)
  • Cleanup passes + admin-view removal (d62ae28, 8701195, dd8a26e)
  • README update (e507a1d)

Test plan

  • Verify deck create / edit / delete flows
  • Verify study-mode picker modal + all study modes
  • Verify per-deck leaderboard writes and reads
  • Verify admin view removal doesn't leave dangling routes
  • Smoke-check every flow that touched the UI in this batch

🤖 Generated with Claude Code

notchjpl and others added 13 commits May 26, 2026 23:01
Replaces the SDK boilerplate with the full Study Stacks flashcard app:
decks (user + ecosystem scope), flip/quiz/sprint study modes, mastery
tracking, streaks, badges, results, and CSV/TSV card import.

Recent feature work included here:
- Optional per-card front image (URL) with editor preview, import column,
  and rendering on flip/quiz cards
- Subject-themed app background applied while a deck is selected
- Optional "Show hint" button instead of always displaying card hints

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…nd assorted fixes

Type system
- Rename exported interfaces/aliases to *Type suffix (Deck → DeckType, Card → CardType, etc.) across client + server + shared
- Drop unused createdAt/updatedAt on DeckType
- Scope createdByProfileId/createdByDisplayName/grades to ecosystem decks only (optional fields)
- Add DeckGrades sentinel union with ALL_GRADES_SENTINEL = "all"; helpers expandGrades, normalizeGrades, isAllGrades
- Add DeckResultsRowType + parseDeckResultsValue/formatDeckResultsValue for pipe-string per-deck results

Per-deck leaderboards
- Move results from a separate top-level field into deck.results[profileId] = "displayName|sessions"
- New DeckResultsModal with sortable per-deck table
- New openResultsInNewTab util (self-contained printable HTML) replaces CSV download — canonical pattern going forward
- Drop AssetResultsRow, fetchResults, updateResultsRow, EcosystemDataObjectType.studyStacksResults
- handleCompleteSession writes per-deck leaderboard only for ecosystem scope

Mode picker as modal
- Lift mode-pick state up to Home (pickingDeckId, playingMode); render ModePicker as a portal-mounted modal over Library
- Study no longer owns the "picking-mode" phase; accepts mode prop and starts session on mount
- onChangeMode callback used by "Study Again" to re-open the picker
- ModePicker owns Delete pipeline: ConfirmationModal + backendAPI.delete + dispatch SET_DECKS (matches DecksList)
- canEdit(deck) helper gates Edit + Delete in both ModePicker and DecksList

DecksList refresh
- Collapse AdminView to one-line <DecksList /> (no tabs)
- Icon buttons with tooltips: View Results, Edit, Duplicate, Delete

Save guards
- Reject saving a deck with zero cards (client + server)
- Reject saving any incomplete card via isCardComplete (client + server)
- Pluralized error messages on EditDeck

Bug fixes
- Quiz distractor dedup: case-insensitive trim against correct answer + sibling collisions (fixes "4+4 = 8" double-option)
- Prune null deck slots in fetchDecks (Topia's delete-by-null leaves null entries); defensive `d &&` guard in findDeckById to prevent "Cannot read 'id' of null" after delete

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants