Repository navigation
Conversation
Code Review Agent Run #427a8fActionable 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 #43589 +/- ##
==========================================
+ Coverage 65.92% 66.20% +0.27%
==========================================
Files 2945 2946 +1
Lines 176858 176959 +101
Branches 40973 41022 +49
==========================================
+ Hits 116600 117153 +553
+ Misses 57754 57310 -444
+ Partials 2504 2496 -8
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:
|
|
Note for whoever picks this up: the one red check ( The run reports 1863 warnings and 94 errors, and none of the 94 are in either file this PR touches. The tell is the duration, this job finished in 1m14s, where passing runs of the same job take 3m20s–3m35s. Running oxlint directly against both changed files reports zero findings. The other 67 checks pass. I don't have permission to re-run the job myself, so I'll refresh it with a rebase if that's easier than a maintainer re-run. |
rusackas
left a comment
There was a problem hiding this comment.
Nice fix — matches what rollingWindowOperator.ts already builds and what the backend's dict[str, str] signature for diff/cum/rolling expects. The lint-frontend failure looks unrelated to this diff (import-resolution errors scattered across the whole tree, nothing in the two touched files); I'll see if I can get that working.
7bffa07 to
567ab28
Compare
Code Review Agent Run #be61ebActionable 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 |
|
Friendly ping, this has been approved since Sept 8. The only red checks are the Netlify docs-preview ones, which aren't required and are unrelated to this change (it touches |
|
We'll get it merged, but hopefully the docs CI checks will clear themselves now :D Thanks for your persistence/patience :) |
|
Bito Automatic Review Skipped – PR Already Merged |
SUMMARY
PostProcessingRolling,PostProcessingCumandPostProcessingDiffdeclareoptions.columnsasstring[], but all three operations take a string-to-string mapping. This corrects the exported types toRecord<string, string>.The mapping is what the runtime has always required. Each operation takes
columns: dict[str, str]and indexes the frame by its keys:rolling()columns: dict[str, str]df.loc[:, columns.keys()]cum()columns: dict[str, str]df[columns.keys()]diff()columns: dict[str, str]df[columns.keys()]An array reaching any of them calls
list.keys()and raisesAttributeError.It is also what the frontend already emits.
rollingWindowOperatorbuilds a mapping and sends it for both operations it produces:and the existing tests pin that object shape,
rollingWindowOperator.test.tsandplugin-chart-echarts'sMixedTimeseries/buildQuery.test.tsboth assertcolumns: { 'count(*)': 'count(*)', ... }. The onlystring[]in the tree was the fixture block inPostProcessing.test.ts, which used arrays because the type asked for them; those are updated here.Why this never broke the build.
columns.map(col => [col, col])widens each pair to(string | undefined)[]instead of a tuple, so overload resolution picks the untypedObject.fromEntries:columnsMapis thereforeany, which assigns tostring[]without complaint. Annotating the tuple explicitly surfaces the underlying conflict:That is the error the corrected types now raise if an array is reintroduced.
Follow-up to the discussion on #43225, which restored
rolling.columnsto the published OpenAPI spec and made the divergence visible to typed clients. That PR is Python-only; this is the frontend half.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Not applicable, type declarations only.
TESTING INSTRUCTIONS
No runtime behaviour changes: the emitted payloads are unchanged, and the
isPostProcessing*guards only inspect.operation, so their results are unaffected.To confirm the corrected types actually constrain, change any
columnsvalue inPostProcessing.test.tsback to an array and re-runnpm run type; it fails with theTS2322above.ADDITIONAL INFORMATION