Skip to content

Add Needs-grading queue and Class CEFR bars to the Dashboard#340

Open
NesiciCoding wants to merge 3 commits into
mainfrom
claude/rubricmaker-option-b-0eef23
Open

Add Needs-grading queue and Class CEFR bars to the Dashboard#340
NesiciCoding wants to merge 3 commits into
mainfrom
claude/rubricmaker-option-b-0eef23

Conversation

@NesiciCoding

@NesiciCoding NesiciCoding commented Jul 22, 2026

Copy link
Copy Markdown
Owner

Summary

  • Implements the Dashboard portion of the "RubricMaker Option B" design mockup (Claude Design project).
  • Adds a greeting header + a "This week" chip, a 4th "Needs grading" stat card (with real week-over-week trend badges on all 4 cards), a "Needs grading" list (essay submissions with no graded StudentRubric yet), and a "Class CEFR — Writing" per-criterion average card scoped to the global active-class selector (settings.activeClassId).
  • The existing "At-Risk Students" panel is left untouched, per product decision — it serves a different purpose (flagging low scorers) than the new Needs-grading queue (surfacing pending work).
  • Adds matching i18n keys to all 5 locales (en/nl/fr/de/es).

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 typecheck passes
  • npm test — full suite passes (618 tests)
  • npm run lint — no new warnings/errors
  • Locale key-parity tests pass
  • Manually verified in the dev server with seeded demo data, in both light and dark theme, including active-class scoping on the Class CEFR card

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Enhanced the dashboard with time-based greetings, relative “time ago” labels, and dynamic header metadata.
    • Added weekly trend badges and “Needs grading” queue indicators, including an empty state and a clickable queued-items list.
    • Updated the “Recent Activity” panel layout with clearer activity grouping and navigation actions.
    • Improved “Class CEFR — Writing” progress summaries using class-scoped averages, with empty states.
    • Expanded dashboard translations in English, German, Spanish, French, and Dutch.

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>
@github-actions

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@NesiciCoding, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 42 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 4cae3384-ba9f-4835-b75a-fd54a05a6fd8

📥 Commits

Reviewing files that changed from the base of the PR and between f940f7a and ab29626.

📒 Files selected for processing (3)
  • src/pages/Dashboard.tsx
  • src/utils/classCriterionAggregator.test.ts
  • src/utils/classCriterionAggregator.ts
📝 Walkthrough

Walkthrough

The dashboard now displays localized greetings and metadata, weekly trend badges, a needs-grading queue, updated recent activity, and class-scoped CEFR writing averages.

Changes

Dashboard expansion

Layer / File(s) Summary
Dashboard localization strings
src/locales/{de,en,es,fr,nl}.json
Adds translated greetings, metadata, trend, grading queue, Class-CEFR, and relative-time dashboard labels.
Dashboard metrics and derived data
src/pages/Dashboard.tsx
Calculates relative times, greeting keys, recent grading items, weekly counts, and class-scoped criterion averages.
Header and summary cards
src/pages/Dashboard.tsx
Expands the header and stat-card grid with metadata, trend badges, and a needs-grading card.
Queue, activity, and CEFR panels
src/pages/Dashboard.tsx
Adds the needs-grading list and updates recent activity and Class-CEFR rendering.

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
Loading

Suggested reviewers: claude

Poem

A rabbit hops through metrics bright,
With grading queues lined up right.
Trends bloom green and greetings cheer,
CEFR bars grow clear and near.
Translations sparkle, dashboard awake! 🐇

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.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 title clearly matches the main Dashboard additions: the needs-grading queue and Class CEFR bars.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/rubricmaker-option-b-0eef23

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.

❤️ Share

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

@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🟢 Lines 69.82% (🎯 65%) 8923 / 12780
🟢 Statements 67.87% (🎯 65%) 10164 / 14975
🟢 Functions 60.12% (🎯 60%) 3103 / 5161
🟢 Branches 60.25% (🎯 58%) 7539 / 12512
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/pages/Dashboard.tsx 52.47% 39.18% 46.15% 58.53% 45, 46, 47, 52, 54, 70-83, 156, 166, 185-204, 206, 215, 228, 240, 242, 258, 266-273, 285-294, 300-336, 344-693, 772, 784-874, 907-1010
src/utils/classCriterionAggregator.ts 100% 86.66% 100% 100%
Generated in workflow #994 for commit ab29626 by the Vitest Coverage Report Action

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between ff98175 and ef2ffbe.

📒 Files selected for processing (6)
  • src/locales/de.json
  • src/locales/en.json
  • src/locales/es.json
  • src/locales/fr.json
  • src/locales/nl.json
  • src/pages/Dashboard.tsx

Comment thread src/pages/Dashboard.tsx Outdated
Comment thread src/pages/Dashboard.tsx
Comment thread src/pages/Dashboard.tsx
Comment thread src/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>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between ef2ffbe and f940f7a.

📒 Files selected for processing (6)
  • src/locales/de.json
  • src/locales/en.json
  • src/locales/es.json
  • src/locales/fr.json
  • src/locales/nl.json
  • src/pages/Dashboard.tsx

Comment thread src/pages/Dashboard.tsx Outdated
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>
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