Skip to content

Prevent burndown crashes for oversized chart widths - #4225

Merged
djmitche merged 1 commit into
GothenburgBitFactory:developfrom
jatinninety9:codex/burndown-unlimited-width
Nov 12, 2026
Merged

djmitche merged 1 commit into
GothenburgBitFactory:developfrom
jatinninety9:codex/burndown-unlimited-width

Conversation

@jatinninety9

Copy link
Copy Markdown
Contributor

Fixes #4224.

With defaultwidth=0, Context::getWidth() returns 65,536. Burndown generates thousands of historical bars before render() checks the chart dimensions, which can hit date-range assertions in daily, weekly, monthly, and annual reports.

Skip bar generation when the graph width already exceeds the renderer's 1,000-column limit. This preserves the existing "Terminal window too large to draw a graph." diagnostic. Add regression coverage for zero and explicit 65,536 widths across all four report periods.

Validation:

  • Reproduced assertion failures in all four periods before the fix; each returns successfully with the existing diagnostic after the fix.
  • GCC Debug build in WSL Ubuntu; full CTest run: 179/179 entries passed (ctest --test-dir build --output-on-failure -j 4 --timeout 600). Existing skipped and expected-failure subtests remain.
  • clang-format 21.1.8, Black 25.12.0, and git diff --check pass.

@djmitche djmitche left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks like a good fix -- thanks!

@djmitche
djmitche merged commit 34e5aee into GothenburgBitFactory:develop Nov 12, 2026
17 checks passed
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.

Burndown report crashes TaskWarrior when defaultwidth=0

2 participants