Uh oh!
There was an error while loading. Please reload this page.
feat(derived): encrypt flashcards, study guides, room summaries (#518) - #528
Conversation
Warning Review limit reached
Next review available in:53 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. 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: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (13)
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 |
This pull request has been ignored for the connected project Preview Branches by Supabase. |
Deploying with |
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs | frontend-staging | 6bf1b18 | Commit Preview URL Branch Preview URL | Aug 06 2026, 01:36 AM |
AndresL230
commented
Aug 6, 2026
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance: every encrypt/decrypt boundary traced (both flashcard insert paths return plaintext to the client; study-guide ETags stay on 🤖 Generated with Claude Code |
8ab0866 to
1bc62c2Comparee167d28 to
add403bCompareb09c0e8 to
3e78b3eCompareadd403b to
80a5a17Compare) Both flashcards insert row-builders (AI-generated /generate, imported /import/commit) now encrypt front/back before the row reaches Supabase. The list read (GET /user/{user_id}) decrypts front/back for every returned row, tolerating legacy plaintext rows via decrypt_if_present's raw-value fallback. dedup_against_existing decrypts each existing row's front before normalizing, so dedupe still matches against ciphertext (and legacy plaintext) rows. /generate's response is built from a decrypted copy of the inserted rows (mirroring notes_service's write/read split) so the frontend still sees plaintext front/back for cards it just generated, instead of the ciphertext written to the row-builder. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Task 10 of the encryption-coverage epic: study_guides.content is now ciphertext at write (encrypt_json) and decrypted at both readers (get_cached_guides' list loop and the /guide cached-row return) via decrypt_json_column, which also tolerates legacy plaintext dict rows. The ETag on /cached still derives from id+generated_at only, computed before decrypt. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…t encryption (#518) Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…hed list (#518) get_cached_guides ran decrypt_json_column unguarded per row — one corrupt study_guides.content 500ed the WHOLE list instead of degrading just that entry. Wrap the per-row decrypt in try/except, log a warning, and fall back to content={} (exam_title/overview blank for that row only) so the rest of the list still renders. Extends tests/test_study_guide_encryption.py with a mixed-row case: one good encrypted guide + one corrupt-content guide returns 200 with the good guide's exam_title intact and the corrupt one's exam_title == "" (verified to fail via stash/run/pop when the guard is reverted). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
80a5a17 to
6bf1b18CompareUh oh!
There was an error while loading. Please reload this page.
Closes#518.
Derived content no longer leaks its encrypted sources:
flashcards.front/back— both insert paths (generated + imported); dedupe decrypts before Levenshteinstudy_guides.content— encrypt_json; ETags unaffected (id+generated_at)room_summaries.summary— cache keys on member_hash, unaffectedStacked on #521's PR.
🤖 Generated with Claude Code