Skip to content

fix: apply objectLimit globally after filtering#220

Open
phanlehieu10 wants to merge 1 commit into
tscircuit:mainfrom
phanlehieu10:fix/issue-42
Open

fix: apply objectLimit globally after filtering#220
phanlehieu10 wants to merge 1 commit into
tscircuit:mainfrom
phanlehieu10:fix/issue-42

Conversation

@phanlehieu10
Copy link
Copy Markdown

/claim #42

Summary

  • apply objectLimit once across the combined post-filter object set instead of separately per object type
  • keep the warning based on the pre-limit filtered total
  • add regression coverage for global limiting and post-filter counting

Root cause

objectLimit was enforced independently inside each object array instead of once across the combined filtered result set. That let the UI render more than objectLimit total objects and made the limit warning bookkeeping inaccurate.

Validation

  • npm install
  • npx bun test tests/objectLimit.test.ts
  • npx bun test
  • npm run build

All passed locally.

Note

I know there are already other attempts/PRs on this issue. I'm submitting this implementation because it reproduces the same underlying bug on current main, fixes it with focused regression coverage, and may still be useful for review/comparison.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
graphics-debug Ready Ready Preview, Comment May 17, 2026 11:27pm

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant