Skip to content

feat(pm-stack): render flow analytics charts on Roadmap and Projects from the #4829 twin (#4830) - #8410

Merged
dezren39 merged 2 commits into
mainfrom
queue/6955-4830-flow-charts
Nov 11, 2026
Merged

dezren39 merged 2 commits into
mainfrom
queue/6955-4830-flow-charts

Conversation

@dezren39

@dezren39 dezren39 commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Closes #4830.

Step 3 of the #1281 split: the Projects/Roadmap pages now render the #4829 flow analytics as charts.

What renders, and where

  • New pure module src/flow-charts.ts: per group (project/epic subject, plus the explicit unassigned group) a weekly-throughput SVG bar chart and a time-in-status stacked bar with an exact-value legend, preceded by the stated computation window.
  • Wired into both surfaces the issue names: the Roadmap page (renderRoadmap, section appended after the roadmap body) and the Projects page — which since dashboard: clean up the page list (12 registered pages, overlaps to resolve) #1497 is the #projects-pool section of /program (renderProgram pool section). Both handlers compute the twin exactly as /api/flow-analytics.json does (computeFlowAnalytics(await itemHistoryStore.readAll())) and pass that object in; the renderers take it as an optional input, so other callers are unchanged.

Acceptance mapping

  • Charts per project and per epic from the feat(pm-stack): flow analytics computation — time-in-status + weekly throughput per project/epic, JSON-first with stated windows #4829 endpoints, window stated on each chart — one section per page stating the window (first → last cutoff, complete of total) and one chart pair per group in the twin.
  • Rendered values match the JSON twins — rendering only: the module reads numbers from the twin object and computes nothing (bar geometry aside). test/flow-charts-4830.test.ts asserts, for a fixture window, that every group/week/status value in the twin appears in the HTML with the twin's own number, including the known fixture values (Done 21 / In Progress 14 / Todo 7 item-days; completions 1, 1, 0).
  • Gap/coverage state visible; no silent zero or smoothed-over gap — gaps are named on the section (cutoff + incomplete/unavailable) with the exclusion rule stated; a gap cutoff is never drawn as a throughput week (asserted); a complete zero-completion week renders as a visible 0 bar (asserted); empty history renders an explicit empty-window statement, no invented charts.

Tests

  • bun test test/flow-charts-4830.test.ts test/flow-analytics-4829.test.ts — 10 pass.
  • Full aggregator suite: the failing set is identical to a pristine-baseline run at the same base commit (pre-existing failures in digest CLI / source boot / live-source facets; one date-sensitive ETA test flaked in opposite directions across runs) — no new failures from this change. Typecheck: no errors in any changed file (pre-existing errors elsewhere in the package).

Codex P2 fixes (head after first review)

  • Chart SVG styles defined in src/ui.css (bar/value/label/axis + a six-step time-in-status palette, dark base with light-theme overrides) and the committed src/assets/app.css regenerated via bun run build:css — the charts no longer render default-black on the dark page.
  • Throughput chart width now grows with the retained history (56-unit slot per week) inside a horizontally scrollable container, so a year-plus of weekly cutoffs keeps every bar and a readable date label; no week is dropped or merged. A 60-week fixture test pins this.

@dezren39
dezren39 requested a review from a team as a code owner November 11, 2026 01:59
@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Pre-merge checks: Passed 1 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Title check Pending This assessment has not completed. The check will be retried on the next pre-merge check run.
Passed Passed checks: 1 passed

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T02:09:48.685936Z 024933f New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@dezren39 dezren39 added the queue/parked Queue task is parked (waiting on CI, time, or an event) label Nov 11, 2026

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8431c4f1df

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread pm-stack/aggregator/src/flow-charts.ts Resolved
Comment thread pm-stack/aggregator/src/flow-charts.ts Resolved
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.

feat(pm-stack): render flow analytics charts on Projects/Roadmap — time-in-status + throughput with stated windows

1 participant