Skip to content

feat: phase 4 - reminders, post-study feedback, grade trends, weekly planner - #25

Merged
timh8127 merged 5 commits into
mainfrom
feat/phase4-intelligence
Jun 11, 2026
Merged

feat: phase 4 - reminders, post-study feedback, grade trends, weekly planner#25
timh8127 merged 5 commits into
mainfrom
feat/phase4-intelligence

Conversation

@timh8127

@timh8127 timh8127 commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Summary

Implements all four Phase 4 features from wsist-phase4-tasks.md:

  1. Missing grade reminders — home page strip listing past tests with no grade entered; clicking a chip opens the edit modal for that test.
  2. Post-study understanding update — each study card gets a "Studied it" button with an inline prompt to update understanding; recommendations re-run immediately so scores reflect the change.
  3. Grade trend chart — per-subject SVG sparklines (pure Razor-rendered SVG, no JS chart libraries) for subjects with 2+ graded tests, with guide lines at grades 4/5 and a first-to-latest delta.
  4. Weekly study planner — Today/This-week toggle on the study page; enter available hours per day and get a 7-day plan driven by PriorityCalculator.GetWeeklyPlan.

Notes

  • Added @using WSIST.Engine to Study.razor (required by the new markup referencing Test enums).
  • Added GetGradeClass to Study.razor.cs (weekly plan rows use it; it previously existed only on Home).
  • No migrations; dotnet build ran clean (0 errors) before each commit.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Weekly study planner that generates a 7‑day plan from per‑day hours
    • Grade trends visualization showing per‑subject progress and deltas
    • Missing grades reminders with quick edit action
    • Study tracking workflow to mark a test as studied and record understanding
    • Toggle between Today and This Week study modes with per‑day planning controls

timh8127 and others added 4 commits June 11, 2026 07:23
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 02f4ee61-098b-4f6c-9068-1119d237dc5c

📥 Commits

Reviewing files that changed from the base of the PR and between 41ec536 and 02e8820.

📒 Files selected for processing (3)
  • WSIST/WSIST.Engine/PriorityCalculator.cs
  • WSIST/WSIST.Web/Components/Pages/Study.razor
  • WSIST/WSIST.Web/Components/Pages/Study.razor.cs
🚧 Files skipped from review as they are similar to previous changes (2)
  • WSIST/WSIST.Web/Components/Pages/Study.razor
  • WSIST/WSIST.Web/Components/Pages/Study.razor.cs

📝 Walkthrough

Walkthrough

Adds date-anchored scoring and a 7-day weekly planner to PriorityCalculator; Home shows missing-grade reminders and SVG grade trends; Study page gains Today/This-week modes, studied-test feedback, per-day hour inputs, and a weekly plan view powered by the new planner.

Changes

Study Planning and Grade Tracking

Layer / File(s) Summary
Weekly Plan Calculator
WSIST/WSIST.Engine/PriorityCalculator.cs
Threaded optional asOfDate through scoring APIs; CalculateUrgencyScore uses asOfDate for due-date math; CalculateTotalScore and GetStudyRecommendations accept asOfDate; new GetWeeklyPlan returns a 7-day Dictionary<DateOnly, List<Test>> using hoursPerDay to decide per-day recommendations or empty lists.
Home Page – Grade History and Missing Tests
WSIST/WSIST.Web/Components/Pages/Home.razor.cs, WSIST/WSIST.Web/Components/Pages/Home.razor, WSIST/WSIST.Web/wwwroot/app.css
Adds MissingGrades (overdue tests with unset Grade) and GetGradeHistory() (per-subject chronological graded tuples for subjects with ≥2 grades). Home renders a missing-grade strip with Edit actions and a Grade trends SVG card (polyline + markers, guide lines, count/delta footer). Styles for chips and trend cards added.
Study Component – Imports, Toggle, and State
WSIST/WSIST.Web/Components/Pages/Study.razor, WSIST/WSIST.Web/Components/Pages/Study.razor.cs
Adds @using WSIST.Engine, a study-mode toggle (Today vs This week), and state for studied-test editing and weekly planning (studiedTestId, updatedUnderstanding, weeklyMode, weeklyHours, weeklyPlan, weeklyCalculated).
Study Component – Studied Test and Weekly Planning Workflows
WSIST/WSIST.Web/Components/Pages/Study.razor, WSIST/WSIST.Web/Components/Pages/Study.razor.cs, WSIST/WSIST.Web/wwwroot/app.css
Today mode: recommendation cards show a studied-test prompt (understanding select + Save/Cancel) or “✓ Studied it” opener. This week mode: per-day hours inputs, CalculateWeekly() calling PriorityCalculator.GetWeeklyPlan, and a weekly plan display listing each day’s tests with scores and “days away” text. Includes studied-prompt handlers (OpenStudiedPrompt, CancelStudiedPrompt, SaveStudiedUnderstanding), helpers (DayLabel, GetGradeClass), and related CSS for post-study feedback and the weekly planner.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐇 I hop from card to chart and plan,
Seven days sorted by a careful scan,
Remind the missing, trace the trend line,
Save how you learned — one test at a time! 🎓

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title clearly summarizes the four main Phase 4 features being implemented: missing grade reminders, post-study feedback, grade trends, and weekly planner.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/phase4-intelligence

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@WSIST/WSIST.Engine/PriorityCalculator.cs`:
- Around line 96-110: GetWeeklyPlan builds the 7-day plan using
GetStudyRecommendations but GetStudyRecommendations currently uses
DateTime.Today as its reference (causing tests to be considered relative to
today rather than each iterated date), so change GetStudyRecommendations to
accept a reference date parameter (e.g., DateOnly referenceDate) and update its
internal filtering/scoring to use that referenceDate instead of DateTime.Today;
then call GetStudyRecommendations(allTests, hours, date) from GetWeeklyPlan
(where date is the loop variable) so each day's recommendations are computed
relative to that day.

In `@WSIST/WSIST.Web/Components/Pages/Study.razor.cs`:
- Around line 75-90: After reloading allTests in SaveStudiedUnderstanding,
invalidate or recompute the weeklyPlan so the UI doesn't show stale weekly rows:
after allTests = management.LoadAllTests(CurrentUserId) call the existing weekly
planner recompute (e.g. weeklyPlan = weeklyPlanner.CalculateWeeklyPlan(allTests,
/*hours/dates*/ ) or set weeklyPlan = null and invoke the method that builds it
(or call RecalculateWeeklyPlan()) so weeklyPlan reflects the updated data before
StateHasChanged(); reference SaveStudiedUnderstanding, management.TestEditor,
LoadAllTests, weeklyPlan, and StateHasChanged in the change.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 544ce4b5-f8b5-4f14-93d6-c9b3078be082

📥 Commits

Reviewing files that changed from the base of the PR and between f8cd8e9 and 41ec536.

📒 Files selected for processing (6)
  • WSIST/WSIST.Engine/PriorityCalculator.cs
  • WSIST/WSIST.Web/Components/Pages/Home.razor
  • WSIST/WSIST.Web/Components/Pages/Home.razor.cs
  • WSIST/WSIST.Web/Components/Pages/Study.razor
  • WSIST/WSIST.Web/Components/Pages/Study.razor.cs
  • WSIST/WSIST.Web/wwwroot/app.css

Comment thread WSIST/WSIST.Engine/PriorityCalculator.cs
Comment thread WSIST/WSIST.Web/Components/Pages/Study.razor.cs
…stale weekly plan after study feedback

Addresses CodeRabbit review on PR #25:
- GetStudyRecommendations/CalculateTotalScore/CalculateUrgencyScore accept an
  optional asOfDate so GetWeeklyPlan scores and filters each day relative to
  that day instead of today
- weekly plan rows display per-day scores
- SaveStudiedUnderstanding recomputes the weekly plan when one is shown

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@timh8127

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@timh8127
timh8127 merged commit 53e0eef into main Jun 11, 2026
2 checks passed
@timh8127
timh8127 deleted the feat/phase4-intelligence branch June 11, 2026 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant