Skip to content

fix(web): stop the cycle burndown line at today - #10287

Open
burrows99 wants to merge 1 commit into
makeplane:previewfrom
burrows99:fix/burndown-future-days
Open

burrows99 wants to merge 1 commit into
makeplane:previewfrom
burrows99:fix/burndown-future-days

Conversation

@burrows99

@burrows99 burrows99 commented Nov 15, 2026 •

Copy link
Copy Markdown

Description

In a cycle that is still running, the burndown chart draws the "Current work items" line straight down to zero from tomorrow until the end of the cycle. A cycle with three open work items looks as if nothing will be left the next day.

The API already says these days are unknown: burndown_plot returns null for every date after today. For the cycle in the recording, the response had 4 numbers (Nov 12 to 15, all 3) and 11 null values. ProgressChart then turned each null into 0 with distribution[key] ?? 0, so the chart plotted them as real zeros.

This change passes the value through as it is. Recharts leaves a gap for null, so the current line ends at today and the ideal line still runs to the end of the cycle. The chart data type is narrowed from TChartData<string, string> to TChartData<"name", "current" | "ideal"> because the wide form does not allow null in a series.

ProgressChart is used in two places, the active cycle card on the Cycles page and the Progress section of the cycle side panel. Both are fixed by this one change.

flowchart TD
    A[API sends null for days after today] --> B{ProgressChart builds the current series}
    B -->|Before| C[null becomes 0 and the line drops to zero]
    B -->|After| D[null is kept and the line ends at today]
Loading

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Improvement (change that would cause existing functionality to not work as expected)
  • Code refactoring
  • Performance improvements
  • Documentation update

Screenshots and Media (if applicable)

Narrated recording, before then after (sound on):

evidence.mp4

The recording is the web app (react-router dev) running locally against the dev API container, first on preview and then on this branch, with the same workspace and the same steps (Home, the project, Cycles).

Test Scenarios

Steps to reproduce on preview: create a cycle that started a few days ago and ends in the future, add work items to it, open the project's Cycles page and look at "Work item burndown".

Edge cases and unchanged behaviour checked. All of these were checked in the running app on this branch and are in the recording:

  • The chart in the cycle side panel (the same component on another screen) also ends at today.
  • Marking a work item as Done lowers today's point from 3 to 2, so real values and real drops are still drawn.
  • Light theme, switched with the command palette from the keyboard: same result.
  • Narrow window (1000 px wide): same result.
  • The Progress card, the assignee and label tabs and the Upcoming and Completed cycle sections next to the chart look the same, and the Completed cycle section still expands. A pixel comparison of the Cycles page before and after the change, with the same data, differs only inside the burndown chart.

Also checked in the running app but not in the recording: on a future day the tooltip lists only the ideal value, and the current series has 4 plotted points where the ideal series has 15.

Not covered: apps/web has no unit test runner, so there is no automated test for this. Cycles that use estimate points go through the same line of code but I did not set up estimates to try them. I could not set up a completed cycle with work items to compare, because work items cannot be added to a cycle that has already ended. Completed cycles have no null values, so this change should not affect them.

Checks run locally:

  • pnpm run check:types in apps/web: passes. It failed with the one-line change alone (null is not assignable to TChartData<string, string>), which is why the type is narrowed.
  • oxfmt --check and oxlint on the changed file: no errors, no warnings.
  • I did not run the full pnpm check across the monorepo or the backend tests. The change is one frontend file.

References

I did not find an existing issue or pull request for this. #9968 touches the same file for the tooltip precision of the ideal line and does not change this behaviour.

AI assistance (Claude Code) was used to find, fix and record this.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Progress charts now preserve missing distribution values instead of displaying them as zero, making gaps in the data visible rather than implying a zero value.

The API returns null for days that have not happened yet, but the chart
turned every null into 0, so the current line dropped to zero from
tomorrow until the end of the cycle. Pass the value through unchanged so
the line ends at today.
Copilot AI balanced review requested due to automatic review settings November 15, 2026 02:14
@CLAassistant

CLAassistant commented Nov 15, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@coderabbitai

coderabbitai Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The progress chart now uses specific types for chart data keys. It assigns the distribution entry’s value directly instead of replacing a nullish value with 0.

Changes: Progress chart data

Layer / File(s) Summary
Chart data typing and assignment
apps/web/components/core/sidebar/progress-chart.tsx
chartData uses "name" and "current" | "ideal" key types. The current value is assigned directly from distribution[key], without a nullish fallback.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Bug fix

Merge Risk: Minimal · up to 5394b

The cycle burndown chart's current line now ends at today instead of dropping to zero for future days. The change is small and reversible. No concrete merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "fix(web): stop the cycle burndown line at today" matches the main change. The diff in progress-chart.tsx keeps null values for future days, so the current burndown line ends at today instea…
Description check Passed The description follows the repository template. It includes a detailed Description, a Type of Change with the Bug fix box checked, Screenshots and Media with a narrated recording link, Test Scenarios…
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.
Full details: Title check

Explanation

The title "fix(web): stop the cycle burndown line at today" matches the main change. The diff in progress-chart.tsx keeps null values for future days, so the current burndown line ends at today instead of dropping to zero. The title is specific and follows the conventional-commit style.

Full details: Description check

Explanation

The description follows the repository template. It includes a detailed Description, a Type of Change with the Bug fix box checked, Screenshots and Media with a narrated recording link, Test Scenarios with reproduction steps and checks run, and References, which states that no existing issue was found. It explains the root cause (null coerced to 0 by the nullish fallback), the fix, the type narrowing, and the affected components. Mandatory sections are complete.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • 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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d191e5c9-0925-4fc6-995d-066606814893
Commits

Reviewing files that changed from the base of the PR and between 290383d and 5394bf0.

Files selected for processing: 1

  • apps/web/components/core/sidebar/progress-chart.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

This branch has not been deployed

No deployments
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.

3 participants