Fix global objectLimit handling after filters#216
Open
radiantjade wants to merge 1 commit into
Open
Conversation
The objectLimit prop was already present, but it limited each object bucket separately and calculated the warning from the already-limited count. This makes the cap apply once across the rendered object groups after layer, step, and viewport filtering while preserving the pre-limit count for the red warning. Constraint: Issue tscircuit#42 requires layer/step filters to run before counting objects toward the display limit. Rejected: Keep per-type slicing | it can still render more than objectLimit total objects. Confidence: high Scope-risk: narrow Tested: bun run format Tested: bun test Tested: bun run build
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Author
|
Demo video for the claim requirement: https://github.com/radiantjade/graphics-debug/releases/download/graphics-debug-216-demo-20260515/graphics-debug-216-demo.mp4 It summarizes the global objectLimit behavior, preview URL, and passing verification for this PR. |
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.
Fixes #42
This keeps the existing
objectLimitprop, but applies it as a single render budget after layer, step, and viewport filtering. The red warning now compares against the pre-limit filtered object count, so it appears only when the limit is actually truncating visible objects.I split the limit logic into a small helper and added focused regression coverage for global ordering, zero limits, no-limit behavior, and normalization.
Verification:
bun run formatbun testbun run build/claim #42