feat: reports & dashboards module β part 1 (REP-01..04)#267
Merged
Conversation
The leadership / CEO single-pane view: one portfolio groups N projects and shows rolled-up progress, health and milestones from real data. Backend (Modules/Portfolio): - portfolios collection (8-edit registration; indexed deletedStatusKey). - helpers/portfolioRules.js (pure): done = statusType in (close,done), overdue = open task past DueDate, per-project summary, health (on/at-risk/off-track), portfolio totals, milestone split. 13 unit tests. - controller: CRUD + GET /api/v1/portfolio/:id/rollup β aggregates each project's tasks (isParentTask) + milestones into per-project + portfolio metrics. companyId-scoped; deleted/inaccessible projects skipped. - routes + init; JWT+company via setMiddleware (prefix /api/v1/portfolio). Frontend: top-nav Portfolio -> /:cid/portfolio (Portfolio.vue) - list / create / edit / delete, project picker, totals strip + per-project health cards (progress bar, done/total, overdue, milestones). Route + nav + i18n + env. Verify: 33 suites / 382 tests green (incl. 13 portfolio-rules); frontend build clean. Test cases: .claude/test-cases/Portfolio.md (14). Done-when met: a portfolio holds multiple projects and renders rolled-up progress / at-risk / milestones from real data. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Pick a dimension + metric + filters, preview live, and save a report that reloads β backed by a whitelisted query engine (no arbitrary fields/operators). Backend (Modules/CustomReports): - saved_reports collection (8-edit registration). - helpers/reportRules.js (pure): allow-listed dimensions (status/project/sprint), metrics (count/points), filters (project/status/sprint); validateConfig coerces bad values to safe defaults + drops non-listed filter keys; buildPipeline emits a safe $match/$group/$sort/$limit. 8 unit tests. - controller: POST /run (preview), CRUD on saved reports, GET /:id/run (reload); companyId-scoped. - routes + init; JWT+company via setMiddleware (prefix /api/v1/reports/custom). Frontend: top-nav Custom Report -> /:cid/custom-reports (CustomReports.vue): builder (group-by, measure, chart, project filter), live preview (bar / pie-share / table), save + saved-report list with reload + delete. Route + nav + i18n + env. Verify: 34 suites / 390 tests green (incl. 8 report-rules); frontend build clean. Done-when met: a user builds, previews and saves a custom report that reloads correctly. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds Tasks-by-Status, Tasks-by-Project and Total-Tasks cards to the widget dashboard β purely additive, existing cards untouched. - MetricSummaryCard.vue: one self-contained card that fetches its OWN data from the REP-02 engine (POST /reports/custom/run); config chosen by componentId; optional project filter from cardData. Renders bar lists or a single number. No dependency on the backend card-resolver. - getComponent: 3 additive cases -> MetricSummaryCard (HomePage.vue import). - utils/cardComponent.json: 3 appended catalog entries (the catalog is a static repo file, so this is the intended, version-controlled way to add cards; existing entries unchanged). JSON validated. - i18n: card titles/descriptions + no_data_available (en.js). Verify: cardComponent.json parses (19 cards); 34 suites / 390 tests green; frontend build clean. Done-when met: >=3 new card types are available and render real data. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Per-task estimate vs actual + rolled-up totals, with over/under highlighting. Backend (Modules/VarianceReport) β no new collection, reuses existing data: - estimate = tasks.totalEstimatedTime (minutes); actual = summed timesheets.LogTimeDuration by TicketID (minutes). - helpers/varianceRules.js (pure): per-task variance (over / under / on-track / no-estimate) + rollup totals. 7 unit tests. - controller: GET /api/v1/reports/variance?projectId=&sprintId= β tasks + timesheets -> per-task rows + project rollup. companyId-scoped. - routes + init; JWT+company via setMiddleware (/api/v1/reports/variance). Frontend: top-nav Variance Report -> /:cid/reports/variance: project picker, totals strip (estimated / actual / variance% / over / under) + per-task table with red(over)/green(under) variance + status badges. Route + nav + i18n + env. Verify: 35 suites / 397 tests green (incl. 7 variance-rules); module boot-checked; frontend build clean. Done-when met: report shows estimate vs actual per task and rolled up to the project. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the βοΈ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
β¨ 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 |
This was referenced Jun 20, 2026
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.
Reports & Dashboards (v14.5.0) β part 1
The first 4 of 9 Reports & Dashboards tasks (REP-01..04). High-value, additive, and each verified independently. Shipping now so they're testable on staging (especially the core-dashboard change in REP-03); REP-05..09 follow in a second PR.
What's included
portfolioscollection +Modules/Portfolio(pure rollup engine: per-project progress / health / overdue / milestones + portfolio totals) +GET /api/v1/portfolio/:id/rollup+ a Portfolio page (top-nav).saved_reportscollection + a whitelisted query engine (dimensions status/project/sprint Γ metrics count/points Γ project filter β config can't inject arbitrary fields/operators) + live-preview/save/reload API + a builder page (bar / pie-share / table).MetricSummaryCardthat fetches its own data from the REP-02 engine, wired viagetComponent+ 3 entries appended to the staticutils/cardComponent.json. Purely additive β existing dashboard cards untouched.tasks.totalEstimatedTimevs summedtimesheets.LogTimeDuration; per-task over/under variance + project rollup + a report page.New collections (full 8-edit registration each)
portfolios,saved_reports. (REP-03/04 add none.)Verification
cardComponent.jsonJSON-validated (it's backend-loaded).Reviewer note
REP-03 touches the dashboard (a core, highly-visible surface). The change is additive (new cards only) and build-verified, but it could not be browser-tested here β please verify the new cards render + existing cards/layout are unchanged on staging.
π€ Generated with Claude Code