Fix essay hand-in/monitor bugs, dark-mode UI issues, and add student password login#246
Conversation
…tudent password login Root causes and fixes: - Essay draft autosave crashed on QuotaExceededError, spamming logs — now caught silently. - "Assignment not found" on submit + broken live monitor: the "assign to whole class" flow reused one teacherKey across many students, but essay_assignments rows are 1:1 server-side, and nothing ever pushed those rows to Supabase. DB credentials are now only embedded when a save path actually exists, single-student assignments auto-save before their link is shareable, and the now-nonfunctional Monitor link is hidden for bulk-assigned groups. - Dark-mode dropdowns were black-on-black — missing `color-scheme` meant native option popups ignored our theme colors. - Essay editor's "A4 page view" was unreadable in dark mode (looked like typing didn't work) — its backdrop used theme vars while text stayed hardcoded dark; now always renders as a light page, consistent with the rest of that editor's chrome. - Large font size in a table cell forced the table wider than its column, silently clipped by the editor's own rounded-corner container — now scrolls within the table instead. - Table-insert throttled to survive an autoclicker without visible flicker. - Default theme changed to light. New feature: student password login (alternative to unreliable OTP email) - New set-student-password edge function lets a teacher set/reset a student's login password via the Supabase admin API, scoped to their own roster. - Students page: a key-icon action generates a password for one student, or a new "Generate password slips" action does it for a whole class at once — rendered as a printable slip sheet matching the existing essay slip-sheet's look and mechanics. - Landing page: new "Student login (password)" option alongside OAuth/OTP. - Docs, README, and i18n (all 5 locales) updated to match. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 29 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (24)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
CI's format:check failed on these two files from the previous commit. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
CodeQL flagged chars[byte % chars.length] as biased since 256 isn't a multiple of the 56-character alphabet. Switched to rejection sampling: bytes >= the largest multiple of 56 that fits in a byte are discarded and redrawn, so every character is equally likely. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Summary
Fixes several reported student-facing bugs and adds an alternative student login method.
Root-caused bugs:
QuotaExceededError(unhandled, spamming logs) — now caught silently, draft save just skipped that cycle.teacherKeyacross many students, butessay_assignmentsrows are 1:1 with ateacherKeyserver-side, and nothing ever pushed those rows to Supabase. DB credentials are now only embedded into a link when a save path actually exists; single-student assignments auto-save to Supabase before their link becomes shareable (previously required a separate, easy-to-skip "Save to DB" click); the now-permanently-broken "Monitor" link is hidden for bulk-assigned groups instead of dead-ending.<select>dropdowns rendered black-on-black — missingcolor-schememeant native option popups ignored the app's theme colors regardless of our CSS.New feature — student password login:
set-student-passwordedge function lets a teacher set/reset a student's login password via the Supabase admin API, scoped to their own roster (verified againstowner_id).Test plan
npm run typecheck— cleannpm run lint— 0 errors, only pre-existing warningsset-student-passwordto a real self-hosted Supabase instance and confirmed end-to-end (401 on missing auth, ready for real use)🤖 Generated with Claude Code