Skip to content

Fix canvas Repeater live data binding by wiring iframe to builder store#809

Draft
surajair with Copilot wants to merge 2 commits into
devfrom
copilot/fix-collection-bound-repeater-editor-canvas
Draft

Fix canvas Repeater live data binding by wiring iframe to builder store#809
surajair with Copilot wants to merge 2 commits into
devfrom
copilot/fix-collection-bound-repeater-editor-canvas

Conversation

Copilot AI commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Collection-bound Repeater blocks could resolve through deploy/render paths but remained empty in the editor canvas because canvas-side async data hooks were not reading the same builder props store. This caused getBlockAsyncProps to remain effectively unavailable in the iframe render tree.

  • Canvas store propagation

    • Wrapped the canvas iframe subtree in JotaiProvider with builderStore so hooks inside canvas blocks resolve chaiBuilderPropsAtom (including getBlockAsyncProps) from the same source updated by the editor watchers.
    • Kept existing layout/typography provider behavior intact by aliasing and nesting the prior balancer provider.
  • Stable async provider fallback

    • Replaced inline getBlockAsyncProps fallback in useAsyncProps with a module-level constant stub.
    • Prevents fallback function identity churn and aligns provider resolution behavior when real editor props become available.
  • Regression coverage

    • Added a focused StaticCanvas test that mounts the component under a different parent Jotai store and verifies canvas-rendered blocks still resolve chaiBuilderPropsAtom from builderStore.
<JotaiProvider store={builderStore}>
  <BalancerProvider>
    <Canvas>
      <StaticBlocksRenderer />
    </Canvas>
  </BalancerProvider>
</JotaiProvider>

Copilot AI requested review from Copilot and removed request for Copilot July 6, 2026 05:38
@vercel

vercel Bot commented Jul 6, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
sdk Error Error Jul 6, 2026 5:46am

Request Review

Copilot AI requested review from Copilot and removed request for Copilot July 6, 2026 05:45
Copilot AI changed the title [WIP] Fix collection-bound repeater rendering in editor canvas Fix canvas Repeater live data binding by wiring iframe to builder store Jul 6, 2026
Copilot AI requested a review from surajair July 6, 2026 05:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Collection-bound Repeater renders empty in editor canvas (getBlockAsyncProps never invoked for canvas blocks)

2 participants