Skip to content

Comments

feat: builder performance optimizations, state persistence, and registry refactoring#48

Merged
ladparth merged 4 commits intomainfrom
feat/builder-sync-no-remount
Feb 19, 2026
Merged

feat: builder performance optimizations, state persistence, and registry refactoring#48
ladparth merged 4 commits intomainfrom
feat/builder-sync-no-remount

Conversation

@ladparth
Copy link
Contributor

Key Changes

1. Builder Performance and Stability

  • Deterministic Synchronization: Replaced the full form remounting logic with a deterministic sync approach to eliminate UI flickers and improve update speed.
  • Rendering Optimization: Memoized the EditableNode component and implemented granular store selectors to significantly reduce unnecessary re-renders in the canvas.
  • State Persistence: Fixed an issue where UI states would reset by persisting the "collapsed" state within the store.

2. Registry and Layout Refactoring

  • Option Group Logic: Refactored the option-group layout logic to be inlined, simplifying the component architecture and improving maintainability within the registry.
  • Code Cleanup: Streamlined internal logic for better consistency across field layout components.

Issues:

Closes #42
Closes #44
Closes #45

- Extract syncRuntimeForm + computeSchemaSignature to lib/core/sync.ts
- Replace key={schemaKey} remount with BuilderFormStateSync component
- Memoize schema derivation pipeline (nodesToFields, createSchema, extractDefaults)
- Move collapsed state from local useState to Zustand store (collapsedNodes)
- Update Collapsible, Group, and Array layouts to read/write store state
- Ensure collapsed state survives re-renders and schema updates
- Exclude UI-only collapsed state from undo/redo history and persistence
- Wrap EditableNode in React.memo to prevent full-tree re-renders
- Change selectedId selector to boolean (s.selectedId === id) for precise updates
- Fix DragOverlayItem subscribing to entire store with no selector
- inline layout resolver into checkbox-group.tsx and radio.tsx so each renderer owns its flex/grid decisions without an extra shared file
- adjust builder metadata and docs to keep columns tied to horizontal/card layouts
- keep responsive behavior consistent while removing the unused shared helper files
@ladparth ladparth self-assigned this Feb 19, 2026
@ladparth ladparth added the bug Something isn't working label Feb 19, 2026
@vercel
Copy link

vercel bot commented Feb 19, 2026

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

Project Deployment Actions Updated (UTC)
buzzform Ready Ready Preview, Comment Feb 19, 2026 4:11pm

@ladparth ladparth merged commit d06d72a into main Feb 19, 2026
3 checks passed
@ladparth ladparth deleted the feat/builder-sync-no-remount branch February 19, 2026 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

1 participant