Skip to content

fix(dashboard): bound sparkline extrema scan - #7426

Merged
houko merged 4 commits into
mainfrom
fix/dashboard-sparkline-bounds
Aug 17, 2026
Merged

houko merged 4 commits into
mainfrom
fix/dashboard-sparkline-bounds

Conversation

@houko

@houko houko commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • replace Math.max(...data) and Math.min(...data) with a bounded single-pass extrema scan
  • prevent large sparkline data sets from exceeding the JavaScript function argument limit
  • add a regression that renders 150,000 points, above the local runtime spread limit

Inventory finding: F-a7b4a9b4917dc6d0

Verification

  • corepack pnpm@10.33.0 --dir crates/librefang-api/dashboard exec vitest run src/components/ui/Sparkline.test.tsx (2 passed)
  • corepack pnpm@10.33.0 --dir crates/librefang-api/dashboard test -- src/components/ui/Sparkline.test.tsx (101 files, 1076 tests passed)
  • corepack pnpm@10.33.0 --dir crates/librefang-api/dashboard typecheck
  • corepack pnpm@10.33.0 --dir crates/librefang-api/dashboard lint
  • corepack pnpm@10.33.0 --dir crates/librefang-api/dashboard build
  • git diff --check
  • pre-commit and pre-push hooks

Out of scope

  • chart downsampling or virtualized rendering for very large series
  • changing handling of non-finite input values
  • other dashboard chart components

@github-actions github-actions Bot added no-rust-required This task does not require Rust knowledge size/S 10-49 lines changed labels Aug 15, 2026
@houko
houko enabled auto-merge (squash) August 17, 2026 09:24
@houko
houko merged commit 7626ddc into main Aug 17, 2026
37 checks passed
@houko
houko deleted the fix/dashboard-sparkline-bounds branch August 17, 2026 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-rust-required This task does not require Rust knowledge size/S 10-49 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant