Repository navigation
Fix/kind partial filter range - #141
Merged
Merged
Conversation
The editor writes a range filter's bounds independently, starting from both empty, and pf-plots applies only the bounds that are set. The kind required both, so a template saved with a partially filled range filter could not be applied. Unset bounds (absent or null) are now accepted; the range object is kept even when empty so the editor's chip does not fall back to 0..0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment on lines
+38
to
+60
| minimumReleaseAgeExclude: | ||
| - "@milaboratories/*" | ||
| - "@platforma-sdk/*" | ||
| - "@platforma-open/*" | ||
| - '@aws-sdk/checksums@3.1002.0' | ||
| - '@aws-sdk/core@3.979.0' | ||
| - '@aws-sdk/credential-provider-env@3.972.79' | ||
| - '@aws-sdk/credential-provider-http@3.972.81' | ||
| - '@aws-sdk/credential-provider-ini@3.973.24' | ||
| - '@aws-sdk/credential-provider-login@3.972.86' | ||
| - '@aws-sdk/credential-provider-node@3.972.91' | ||
| - '@aws-sdk/credential-provider-process@3.972.79' | ||
| - '@aws-sdk/credential-provider-sso@3.973.23' | ||
| - '@aws-sdk/credential-provider-web-identity@3.972.85' | ||
| - '@aws-sdk/middleware-sdk-s3@3.972.84' | ||
| - '@aws-sdk/nested-clients@3.997.53' | ||
| - '@aws-sdk/token-providers@3.1160.0' | ||
| - '@babel/parser@7.29.12' | ||
| - '@grpc/grpc-js@1.14.7' | ||
| - '@smithy/core@3.38.0' | ||
| - '@smithy/node-http-handler@4.14.0' | ||
| - '@smithy/signature-v4@5.7.5' | ||
| - rolldown@1.2.16 |
Contributor
There was a problem hiding this comment.
We should try to only have our packages here, not 3rd party ones.
Contributor
Author
There was a problem hiding this comment.
removed extra packages
Comment on lines
+272
to
+278
| const min = parseRangeBound(selectedFilterRange.min, `${at}.selectedFilterRange.min`); | ||
| const max = parseRangeBound(selectedFilterRange.max, `${at}.selectedFilterRange.max`); | ||
| // Kept even with neither bound set: without a range object the editor's chip | ||
| // shows 0..0, and editing one bound would then save the other as 0. | ||
| parsed.selectedFilterRange = { | ||
| min: selectedFilterRange.min, | ||
| max: selectedFilterRange.max, | ||
| ...(min === undefined ? {} : { min }), | ||
| ...(max === undefined ? {} : { max }), |
There was a problem hiding this comment.
The existing test only runs a block without template parameters. It cannot catch partial ranges being rejected again or empty ranges being dropped. Add tests through kind.parseInitializationParams for min-only, max-only, empty, and null bounds. Also check that zero survives and strings and non-finite numbers are rejected.
Prompt To Fix With AI
This is a comment left during a code review.
Path: kind/src/index.ts
Line: 272-278
Comment:
**New range cases lack tests**
The existing test only runs a block without template parameters. It cannot catch partial ranges being rejected again or empty ranges being dropped. Add tests through `kind.parseInitializationParams` for min-only, max-only, empty, and null bounds. Also check that zero survives and strings and non-finite numbers are rejected.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
The pinned third-party exclusions came from resolving the lockfile on the day those packages were released. Re-resolved from a clean lockfile so third-party packages respect the release-age gate again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The PR appears safe to merge, with a non-blocking request to test the new range behavior.
Fix with agent prompt
Summary
This PR lets template range filters carry either bound, both bounds, or neither.
Important touched types:
SeedFilterRange: A range filter’s optional numericminandmax. Newly introduced to represent partial and empty ranges.SeedFilterSelector: A selected source and its filter settings. ItsselectedFilterRangenow usesSeedFilterRangeinstead of requiring both bounds.SeedOptionsState: A chart’s saved input bindings. Its shape is unchanged, but nested filter selectors now allow partial ranges.No blocking defect was established. Add regression tests for the new parser behavior. Builds and tests were not run.
Reviews (1) · Last reviewed commit: "update sdk dependencies" · Reviewed by Greptile