Skip to content

chore: update ui-builder to latest#54

Open
olliethedev wants to merge 12 commits intomainfrom
feat/uibuilder-latest-2
Open

chore: update ui-builder to latest#54
olliethedev wants to merge 12 commits intomainfrom
feat/uibuilder-latest-2

Conversation

@olliethedev
Copy link
Collaborator

@olliethedev olliethedev commented Feb 12, 2026

Note

Medium Risk
Touches core UI Builder editing flows (store state, event binding resolution, code generation, and layer operations), so regressions could affect runtime behavior and exported output, but changes are scoped to builder internals and are additive behind optional registries.

Overview
The UI Builder now supports bindable functions via an optional functionRegistry, introducing Variable.type: "function" and resolving function bindings both at runtime (resolveVariableReferences) and in exported code (pageLayerToCode now emits functions props and infers function signatures from Zod schemas / typeSignature).

Editing UX is expanded with a new layer clipboard + context menu system: global clipboard state and context-menu coordinates are added to editor-store, useGlobalLayerActions centralizes copy/cut/paste/duplicate/delete with permission checks and paste validation, and a portal-based context menu is rendered inside the iframe; layer menus and tree actions are refactored to use this shared action hook and a shortcut registry.

Additional changes include adding radix-ui, updating react-day-picker, filtering internal __function_* metadata props out of renderers, improving children/variable binding field overrides (including function-prop dropdowns), handling variable-reference children in the layers tree, adding a Toaster, and bumping @btst/stack to 2.1.0 with updated UI Builder docs to match the new APIs.

Written by Cursor Bugbot for commit c86d10c. This will update automatically on new commits. Configure here.

@vercel
Copy link

vercel bot commented Feb 12, 2026

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

Project Deployment Actions Updated (UTC)
better-stack-docs Ready Ready Preview, Comment Feb 13, 2026 8:34pm

Request Review

];
}, [isSelected, handleCopy, handleCut, handlePaste, handleDuplicate, handleDelete, getCanPaste, isInputFocused]);

useKeyboardShortcuts(keyCombinations);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keyboard shortcuts won't fire inside iframe canvas

High Severity

The LayerContextMenu registers copy/cut/paste/duplicate/delete keyboard shortcuts via useKeyboardShortcuts, which attaches listeners to the parent window. However, AutoFrame renders canvas content inside an iframe using createPortal. After clicking to select a layer in the canvas, focus moves to the iframe, and keyboard events fire on the iframe's window, not the parent window. The shortcuts will never trigger in the primary use case. The LayerContextMenuPortal correctly uses frameContext.document for its escape handler, showing awareness of this issue, but LayerContextMenu doesn't follow the same pattern.

Additional Locations (1)

Fix in Cursor Fix in Web

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

label: 'Paste',
shortcutDisplay: '⌘V',
category: 'edit',
},
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shortcuts match unintended modifier key combinations

Medium Severity

The copy, cut, paste, and duplicate shortcut definitions only specify metaKey: true without constraining other modifiers like shiftKey, ctrlKey, or altKey. Since useKeyboardShortcuts treats undefined modifiers as "any value matches," combinations like Cmd+Shift+C (browser DevTools) and Cmd+Shift+V (paste unformatted) incorrectly trigger these shortcuts and call e.preventDefault(), blocking expected browser behavior. The delete, undo, and redo shortcuts correctly specify all relevant modifier constraints.

Additional Locations (1)

Fix in Cursor Fix in Web

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.

1 participant