Add Needs-grading queue and Class CEFR bars to the Dashboard#340
Add Needs-grading queue and Class CEFR bars to the Dashboard#340NesiciCoding wants to merge 3 commits into
Conversation
Implements the Dashboard portion of the "RubricMaker Option B" design mockup: a greeting header, a 4th "Needs grading" stat card with real week-over-week trend badges, a Needs-grading list (essay submissions awaiting a grade), and a "Class CEFR — Writing" criterion-average card scoped to the global active-class selector. The At-Risk Students panel is kept as-is alongside the new Needs-grading list per product decision. Adds matching i18n keys to all 5 locales. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
|
Warning Review limit reached
Next review available in: 42 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 (3)
📝 WalkthroughWalkthroughThe dashboard now displays localized greetings and metadata, weekly trend badges, a needs-grading queue, updated recent activity, and class-scoped CEFR writing averages. ChangesDashboard expansion
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant AppState
participant Dashboard
participant DashboardUI
AppState->>Dashboard: provide classes and essaySubmissions
Dashboard->>Dashboard: derive queue, trends, and CEFR averages
Dashboard-->>DashboardUI: render cards and dashboard panels
DashboardUI->>Dashboard: navigate from queue or activity item
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ 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 |
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 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 `@src/pages/Dashboard.tsx`:
- Around line 472-489: Make all three interactive Dashboard elements
keyboard-accessible: at src/pages/Dashboard.tsx lines 472-489 update the
needs-grading stat card, lines 599-605 update the “view queue” span, and lines
612-626 update each needs-grading queue row. Add button semantics, keyboard
focusability, and an onKeyDown handler that triggers the existing click
navigation for Enter and Space, or replace each non-interactive element with a
button while preserving its current behavior and styling.
- Around line 701-722: Update the React.Fragment key in the recentActivity map
to use the existing stable composite deduplication key computed near the
recentActivity preparation logic instead of idx, while preserving the current
grouping and rendering behavior.
- Around line 588-684: Update the timeAgo helper used by the Needs-grading queue
to accept or access the dashboard translation function and return translated
keys for every user-visible relative-time variant instead of hardcoded English
strings. Add matching translation keys to all five locale files, using the
English locale as the source of truth, and keep the existing time calculations
and display behavior unchanged.
- Around line 219-243: Update the classCriterionAverages candidateGradings
selection to include only writing gradings, using the existing subject or
cefrSkill metadata convention. Keep the active-class, graded, and handed-in
filters intact so the card selects the latest eligible writing rubric only.
🪄 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: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 4f6d4360-21ea-4939-a4ec-81534714029c
📒 Files selected for processing (6)
src/locales/de.jsonsrc/locales/en.jsonsrc/locales/es.jsonsrc/locales/fr.jsonsrc/locales/nl.jsonsrc/pages/Dashboard.tsx
- Class CEFR — Writing card now filters to rubrics with cefrSkill === 'writing' instead of picking whichever rubric was most recently graded regardless of skill (was incorrectly showing any subject). - Add keyboard/screen-reader support (role="button", tabIndex, onKeyDown) to the three new clickable elements: the needs-grading stat card, the "view queue" link, and each needs-grading queue row. - Localize timeAgo() (used by both Recent Activity and the new needs-grading queue) instead of hardcoded English strings; adds time_just_now/minutes_ago/ hours_ago/days_ago keys to all 5 locales. - Use a stable composite key (matching the existing dedup key) instead of array index for recentActivity list items. Not changed: CodeRabbit's "Docstring Coverage" pre-merge warning (0% vs. an 80% threshold) — this project's convention is no comments/docstrings unless the WHY is non-obvious (see CLAUDE.md), so satisfying that generic threshold would go against the codebase's own style rather than fix a real defect. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@src/pages/Dashboard.tsx`:
- Around line 226-229: Extract the complete writing-rubric selection and CEFR
criterion-average aggregation from Dashboard into a pure utility under
src/utils/, keeping the existing graded, handed-in, active-class, and
writing-skill filtering behavior unchanged. Update Dashboard to call the utility
rather than performing aggregation inline, and add colocated tests covering the
filtering and average-calculation behavior.
🪄 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: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: fb7f4ef1-eb1b-476c-9275-a2e9a61cd858
📒 Files selected for processing (6)
src/locales/de.jsonsrc/locales/en.jsonsrc/locales/es.jsonsrc/locales/fr.jsonsrc/locales/nl.jsonsrc/pages/Dashboard.tsx
Addresses CodeRabbit's remaining finding on the Dashboard PR: the writing-rubric selection and per-criterion class-average calculation was pure domain logic living inline in Dashboard.tsx. Moved it to src/utils/classCriterionAggregator.ts with colocated tests, per this repo's convention of keeping pure business logic in src/utils/ (gradeCalc, cefrStudentAggregator, activityDashboardAggregator, etc.). Dashboard.tsx now just calls the extracted aggregateClassCriterionAverages(). No behavior change — verified identical dashboard output before/after in the browser. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Summary
StudentRubricyet), and a "Class CEFR — Writing" per-criterion average card scoped to the global active-class selector (settings.activeClassId).Design research (not shipped as code, recorded in the wiki instead)
Research before implementing found the mockup's foundational layer (colors, fonts, two-tier nav) already shipped in this app (Phase 9.5). The remaining page-content backlog — Rubrics/Tests view toggles, CEFR/Statistics polish, a Students roster redesign, a Grading page redesign, a Student Portal navigation redesign, Vocabulary Insights consolidation, plus two smaller items — was written up as new phases in the GitHub wiki's Roadmap (Phases 36–38, 40–42, plus additions to Phases 28/29), and a new "Design System — Option B UI Conventions" section was added to the wiki's Architecture page so future phases follow the same patterns.
Test plan
npm run typecheckpassesnpm test— full suite passes (618 tests)npm run lint— no new warnings/errors🤖 Generated with Claude Code
Summary by CodeRabbit