Skip to content

Fix global objectLimit rendering cap#214

Open
8npyvz5bd8-lang wants to merge 3 commits into
tscircuit:mainfrom
8npyvz5bd8-lang:main
Open

Fix global objectLimit rendering cap#214
8npyvz5bd8-lang wants to merge 3 commits into
tscircuit:mainfrom
8npyvz5bd8-lang:main

Conversation

@8npyvz5bd8-lang
Copy link
Copy Markdown

/claim #42

Summary:

  • Applies objectLimit once across all rendered InteractiveGraphics object groups after layer/step/viewport filters run.
  • Keeps the red limit warning based on the pre-limit filtered object count, so the "Received" value reports what was actually capped.
  • Adds regression coverage for global capping, no truncation within the limit, and zero-limit behavior.

Verification:

  • bun x biome format --write site/components/InteractiveGraphics/InteractiveGraphics.tsx site/components/InteractiveGraphics/applyObjectLimit.ts tests/applyObjectLimit.test.ts -> passed
  • bun -e "import { applyObjectLimit } from './site/components/InteractiveGraphics/applyObjectLimit.ts'; ..." -> applyObjectLimit smoke passed
  • bun run build -> passed
  • bun test tests/applyObjectLimit.test.ts -> blocked locally because the repo-level bunfig preload imports bun-match-svg, which loads sharp; bun install --frozen-lockfile failed on this Windows machine because node-gyp could not find Visual Studio C++ build tools. The focused helper was verified with the smoke check above.

Disclosure: AI-assisted with Codex; I reviewed the patch and kept it scoped to the object limit behavior.

Apply objectLimit after filtering across all rendered object groups and keep the warning count based on the pre-limit filtered total.
Add a typed helper that applies one global object cap and reports the pre-limit filtered count.
Cover global capping, no-limit truncation, and zero-limit behavior for InteractiveGraphics objectLimit.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 14, 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 14, 2026 2:45pm

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