Add 4 UX improvements to spelling/flashcards panel

- Assign → button on each list row opens a popup to pick a kid directly
  without scrolling up to the assignment dropdowns
- Hide/Unhide button on built-in lists (stored in localStorage) keeps
  UNGROUPED clean; Show hidden toggle reveals them dimmed when needed
- Mastery progress bar on each kid showing X/Y words mastered for their
  current assigned list (server now returns listProgress in /api/overview)
- Filter-lists / filter-decks search input for fast lookup by name

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
nmemmertandClaude Sonnet 4.6 committed 2026-07-27 13:47:27 -04:00
1 parent 5c2b5baec2
commit 774979f2e4
4 files changed
+152 -21

No files matched your search

+9
View File
@@ -436,6 +436,15 @@ app.get('/api/overview', requirePin, (req, res) => {
s.mastered = db.prepare(
`SELECT COUNT(*) AS n FROM progress WHERE student_id = ? AND box >= ${MASTERED_BOX}`
).get(s.id).n;
if (s.assignment) {
s.listProgress = db.prepare(`
SELECT COUNT(*) AS total,
SUM(CASE WHEN COALESCE(p.box, 0) >= ${MASTERED_BOX} THEN 1 ELSE 0 END) AS mastered
FROM words w
LEFT JOIN progress p ON p.word_id = w.id AND p.student_id = ?
WHERE w.list_id = ?
`).get(s.id, s.assignment.id);
}
s.tests = db.prepare(`
SELECT t.id, t.score, t.total, t.at, l.name AS list
FROM tests t JOIN lists l ON l.id = t.list_id