Repository navigation
feat(analytics): add planning cockpit - #309
Conversation
…ing-insights # Conflicts: # packages/core/src/work/cycle-service.ts # packages/core/src/work/issue-service.ts # packages/core/tests/work/cycle-service.test.ts # packages/shared/src/validators/cycle.ts
|
@greptile-apps please review the full pull request. Focus on analytics number reconciliation, date and sprint filters, sprint history and burndown semantics, authorization, migrations, and chart accessibility. |
|
Too many files changed for review (150 files, 100 file limit). Bypass the limit by tagging |
|
Production rollout completed safely. The additive analytics catchup was applied without db:push, so the undeclared legacy GitHub and Standup tables were preserved. Production remained at 585 issues, 12 sprints, and 4 Git links. The first baseline captured 254 sprint memberships, 254 scoped issues, 15 completed issues, 501 total points, and 41 completed points. The production deployment is ready, protected routes enforce authentication, CRON_SECRET is recognized, and the PR/main build, migration, static, unit, CodeQL, and preview checks are green. Final main Playwright is still finishing. |
|
Final merged-main verification is complete: Unit and integration tests passed, and Playwright passed in 8m29s. Every main CI and CodeQL job is green. |
What this changes
Replaces the basic Analytics page with a zero-configuration planning cockpit modeled on Linear: Overview, Sprints, Projects, and People lenses; shared date/project/person filters; issue and points measures; previous-period comparison; exact hover and keyboard chart evidence; accessible drilldowns; saved defaults; semantic CSV export; and realtime refresh.
It also adds durable sprint membership, close outcomes, daily and final snapshots, workspace sprint support, previous and personal burn, and the same Sprint Insights surface on
/sprints.Why
The existing page could not answer planning questions by date, project, sprint, milestone, or person. Its burndown reconstructed mutable current rows, did not refresh after live issue changes, and could stay flat after completed or moved work. Historical sprint and employee reporting needed durable facts, explicit coverage, and formulas users can audit.
How you know it works
packages/dbcatchup cleanup-hook timeout at 30 seconds. That exact file passed alone immediately afterward: 10 passed, 0 failed in 321 ms.Screenshots
Before
The previous page was a basic issue distribution and flat burndown surface without planning filters, exact chart evidence, project planning, or individual employee burn. The original screenshots are attached to the implementation task.
After, dark
After, light
Checklist
bun run verifyis green, all four checksany, no non-null assertions@orbit/sharedpackages/shared/src/policy, not only in the UIAnything reviewers should know
packages/db/catchup/workspace-sprints-catchup.sqlfor workspace sprint consolidation.CRON_SECRET. The analytics snapshot job runs every six hours and requires a Vercel plan that supports more-than-daily cron schedules.Greptile Summary
The PR replaces the basic analytics page with a shared planning cockpit and introduces durable sprint history, snapshots, semantic drilldowns and exports, saved views, and realtime refresh.
Confidence Score: 4/5
The timezone mismatch in cycle burndown must be fixed before merging because non-UTC sprints can display missing or shifted actual values.
The shared sprint service emits dates in the sprint timezone, but cycleBurndown compares them with UTC-derived keys and consequently misclassifies valid local-day points as future.
Files Needing Attention: packages/core/src/analytics/burndown.ts
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart LR Q[Validated analytics query] --> L[Core lens loaders] I[Issue and sprint lifecycle] --> M[Membership and close outcomes] M --> S[Daily and final snapshots] S --> L L --> A[Analytics API and hydration] A --> C[Planning cockpit] C --> D[Semantic drilldown and CSV] R[Realtime changes] --> V[Analytics cache invalidation] V --> CPrompt To Fix All With AI
Reviews (1): Last reviewed commit: "fix(analytics): clarify sprint filters a..." | Re-trigger Greptile