chore: remove Habit models, fix docs, add calendar task editing - #47
Merged
Conversation
Faza 3 — Szybkie wygrane: - Interleaving: checkbox "Przeplataj tematy" w modal egzaminu; planner domyślnie blokowy (A→A→B→B), z opcją przeplatania (A→B→C→A→B→C); odznaka Shuffle w exam-card; pole interleaved w schemacie Prisma - Technika Feynmana: po ocenie ≥ 3/5 modal oceny przechodzi do kroku 2 (wyjaśnienie tematu własnymi słowami), AI ocenia i daje feedback; nowe pole reflection w StudySession; endpoint /reflect/route.ts - Deep Work: przełącznik 🍅 25/5 ↔ 🧠 90/20 w timerze Pomodoro; powiadomienie przeglądarki po zakończeniu 90-minutowej pracy - Sleep Consolidation: nowy cron 21:30 UTC wysyłający push z listą przerobionych dziś tematów; dodany do vercel.json Faza 4 — Analityka nauki: - /api/stats/flashcards: retencja (% Good+Easy 30d), liczba dojrzałych kart, aktywność powtórek (14d), statystyki per talia - /api/stats/confidence: mapa pewności per egzamin i temat - /stats/page.tsx: sekcja "Fiszki analityka" (KPI, wykres słupkowy aktywności, tabela talii) + sekcja "Mapa pewności" (kolorowe kwadraty per sesja per temat) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- prisma: drop Habit + HabitCompletion models and User relation; db push applied - CLAUDE.md: mark email reminders and PWA as completed [x] - README.md: remove stale habit-reminders cron entry - calendar: fetch categories; add "Edytuj" button in detail sheet; wire up TaskModal so tasks can be edited directly from the calendar Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Empty string from TaskModal when no category selected was passed to the API instead of null, causing P2003 foreign key constraint error. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
deadline = end of work. A task due at 16:30 taking 30 min now shows 15:30–16:30 instead of 16:30–17:00. Clip logic prevents blocks from going above the visible grid for very early deadlines. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Only tasks with explicit estimatedMinutes extend backward from deadline. Tasks with no duration get a 1-slot forward marker at the deadline slot, so a midnight task (clamped to 22:00) shows at 22:00, not 21:30. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…clamp to 22:00 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
API routes: - All Prisma handlers wrapped in try/catch with Polish error messages - HTTP status codes extracted to named constants (HTTP_UNAUTHORIZED etc.) - serverError() helper added per route file - findOwnedTask/Exam/Deck/Card helpers extracted to remove auth duplication - Explicit Promise<NextResponse> return types on all handlers Named constants (magic number extraction): - lib/fsrs.ts: MS_PER_DAY, MS_PER_MINUTE, AGAIN/HARD/GOOD_DELAY_MS, EASY_GRADUATE_MULTIPLIER, HARD_PENALTY_FALLBACK - lib/study-planner.ts: MS_PER_DAY, NOON_HOUR, DAYS_BUFFER_BEFORE_EXAM - app/calendar/page.tsx: MS_PER_DAY, MONTH_GRID_CELLS, DEFAULT_DROP_HOUR, MAX_RECURRENCE_EXPANSIONS, MONTH_CELL_MAX_VISIBLE, UNSCHEDULED_SIDEBAR_LIMIT - app/api/exams/[id]/sessions/route.ts: MS_PER_DAY, DEFAULT_REVIEW_INTERVAL_DAYS Type annotations: - lib/utils.ts: explicit return types on cn(), daysBetween() - lib/google-calendar.ts: Promise<calendar_v3.Calendar> return type Minor: renamed single-letter locals (r→row, s→subtask, r→retrievabilityScore) Fix: fsrs.ts AGAIN/HARD/GOOD_DELAY_MS — remove invalid `as const` on expressions Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
setVapidDetails() moved inside getWebPush() helper so it runs at call-time, not at module load — fixes next build failing on /api/cron/reminders. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
HabitiHabitCompletionze schematu Prismy i bazy danych[x](były gotowe, tylko nieoznaczone)habit-remindersTest plan
🤖 Generated with Claude Code