test(dashboard): prove BigInt column values no longer break native filter config - #41840
Conversation
…lter config (#35087) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Code Review Agent Run #8eec04Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #41840 +/- ##
=======================================
Coverage 64.78% 64.78%
=======================================
Files 2689 2689
Lines 148936 148936
Branches 34365 34365
=======================================
Hits 96481 96481
Misses 50690 50690
Partials 1765 1765
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
SUMMARY
Test-only PR that proves #35087 is fixed on master, and closes it.
The issue reported
Unexpected error: TypeError: Do not know how to serialize a BigIntwhen clicking "Add or edit filters" on a dashboard where a chart had queried a BigInt column. The crash came fromJSON.stringify(charts)in auseMemodependency array inFiltersConfigForm, evaluated on every render of the filters config modal — chart data responses containing integers beyondNumber.MAX_SAFE_INTEGERare parsed into nativeBigIntvalues byparseResponse(parseMethod: 'json-bigint'), andJSON.stringifythrows on anyBigInt.That stringify call was fixed by #34539 (merged Aug 2025), which serializes only the chart ids. However, #34539's regression test only covered opening the modal onto an existing filter configuration (
createNewOnOpen: false), while the issue's repro is the fresh "Add or edit filters" flow that auto-creates a new filter. This PR adds a test for that exact path and strengthens the shared fixture with a value aboveNumber.MAX_SAFE_INTEGER(9007199254740993n), mirroring whatparseResponseactually produces for large integer columns.The new test passes on master, confirming the reported path no longer throws. No production code changes.
closes #35087
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A (test-only change)
TESTING INSTRUCTIONS
The new test is
creates a new filter when a chart contains BigInt values. To see it fail as it would have before the fix, revert the #34539 change inFiltersConfigForm.tsx(restoreJSON.stringify(charts)in theinitiallyExcludedChartsdependency array) and re-run — the render throwsTypeError: Do not know how to serialize a BigInt.ADDITIONAL INFORMATION
🤖 Generated with Claude Code