Uh oh!
There was an error while loading. Please reload this page.
perf(studio): lazy-mount live block previews in the page designer canvas - #1852
Merged
Conversation
The page-designer canvas renders each block with the real runtime renderer. Data-bound blocks (object-grid, record:related_list, object-kanban, repeater) each fetch on mount, so a tall page fired every query at once and the canvas got sluggish as block count grew. Gate each BlockLivePreview behind an IntersectionObserver: off-screen blocks render a lightweight placeholder and mount the real component (and fire their query) only once they scroll within ~300px of the viewport. Once mounted they stay mounted, so re-scrolling never re-fetches. Renders immediately when there is no real IntersectionObserver or under vitest (import.meta.env.MODE === 'test'), so SSR and the existing canvas tests are unaffected. Verified in-browser: on a fresh load of a tall page only the in-viewport blocks mount (others show placeholders); scrolling a placeholder into view mounts it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
Uh oh!
There was an error while loading. Please reload this page.
os-zhuang pushed a commit
that referenced
this pull request
Sep 2, 2026
…tsAt The free plan's AI quota moved to a rolling 7-day window (cloud PR #1852), which added `resetKind: 'weekly'` to the usage endpoint. AiUsageIndicator only knew 'daily'/'monthly' and fell through to no reset copy for a weekly meter. It now renders "Resets in N days" (or N hours inside the final day), derived from the endpoint's `resetsAt` — never guessed client-side — with new @object-ui/i18n keys (base + _one/_other plural family, all ten packs). An unrecognized resetKind still fails soft: no crash, no reset line. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This was referenced Sep 2, 2026
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 freeto 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 page-designer canvas renders each block with the real runtime renderer. Data-bound blocks (object-grid, record:related_list, object-kanban, repeater) each fetch on mount, so a tall page fired every query at once and the canvas got sluggish as block count grew (surfaced during the designer option-sweep QA at ~30+ blocks).
Change: gate each
BlockLivePreviewbehind anIntersectionObserver. Off-screen blocks render a lightweight placeholder and mount the real component (and fire their query) only once they scroll within ~300px of the viewport. Once mounted they stay mounted, so re-scrolling never re-fetches.Renders immediately when there is no real
IntersectionObserveror under vitest (import.meta.env.MODE === \"test\"), so SSR and the existing canvas tests are unaffected.Verified in-browser on a tall page: fresh load mounts only the in-viewport blocks (4/7 deferred as placeholders, 3 mounted at a 577px viewport); scrolling a placeholder into view mounts it. No freeze regression (body pointer-events stays auto, 0 dialogs).
app-shell/previews suite green (121 tests).
🤖 Generated with Claude Code