No description
Find a file
Joey Yakimowich-Payne 2d1efb1b3a
fix(chess/ui): visual-builder drag/nesting/editing UX gaps
Addresses four user-reported gaps in the visual mode authoring surface:

1. × button and expand chevron triggered a drag instead of their own
   action. dnd-kit listeners were spread on the outer SortableBlockItem
   wrapper, so any pointerdown on a descendant started a sort. Fixed by
   routing only `listeners` to a new dedicated grip-handle icon on the
   card header; the rest of the card (× / expand / inspector / body)
   no longer competes with drag. `attributes` still go on the wrapper
   so keyboard drag + screen-reader announcements keep working.

2. No way to add primitives INSIDE a trigger — palette clicks always
   appended at the top level. Fixed by computing an addTargetInfo when
   the selected block is a container (has childPrimitives + a params
   .primitives array): the palette now shows an "Adding inside: {label}"
   banner with an "Add at top level instead" escape button, and
   handleAddPrimitive routes the new node into the parent params. The
   parent auto-expands and selection stays on the parent so repeated
   palette clicks stack children under it.

3. Inspector was read-only — ParamField.onChange was a documented
   no-op. Fixed by adding onParamsChange through the wire
   (VisualBuilderPane.handleParamsChange → BlockList.onParamsChange
   → SortableBlockItem.onParamsChange → BlockCard.onParamsChange →
   ParamField.onChange). Editing a number/string/enum field now
   immediately updates descriptor.primitives[index].params.

4. Nested children could not be removed — nested BlockList was given
   onRemove={() => {}}. Fixed by adding onNestedRemove to BlockListProps;
   VisualBuilderPane supplies handleNestedRemove which filters the
   matching parent params.primitives[] without mutating siblings.

Additional polish:
- Inspector now opens when a block is selected (previously needed
  selected AND expanded), so children and docs show up on first click.
- Child block list renders whenever the parent is expanded OR selected
  for the same first-click visibility.
- Expand button gains aria-label="Expand|Collapse" so accessibility
  tooling (and Playwright getByRole) can target it by name.
2026-04-21 19:46:37 -06:00
.github/workflows chore(root): scaffold monorepo — Phase 0 complete 2026-04-16 13:32:21 -06:00
.sisyphus docs: add T24 QA notes 2026-04-21 18:38:50 -06:00
docs feat(ui): AttrCombobox declare vs. consume semantics 2026-04-21 13:07:27 -06:00
packages fix(chess/ui): visual-builder drag/nesting/editing UX gaps 2026-04-21 19:46:37 -06:00
scripts feat(rete): add replay engine + state-hash determinism verifier (P3.3) 2026-04-16 15:25:13 -06:00
.gitignore chore(sisyphus): Rule Variants Final Verification Wave — all reviewers APPROVE 2026-04-21 10:15:18 -06:00
eslint.config.js feat(engine): damage-resistance modifier descriptor 2026-04-18 22:22:31 -06:00
lefthook.yml chore(root): scaffold monorepo — Phase 0 complete 2026-04-16 13:32:21 -06:00
LICENSE chore(root): scaffold monorepo — Phase 0 complete 2026-04-16 13:32:21 -06:00
package.json feat(rete): add replay engine + state-hash determinism verifier (P3.3) 2026-04-16 15:25:13 -06:00
playwright.config.ts fix(rete): inject clock into EventLog; use tsc for DTS; fix cycle.test.ts private access; add Playwright worker limit 2026-04-16 18:25:49 -06:00
README.md chore(root): scaffold monorepo — Phase 0 complete 2026-04-16 13:32:21 -06:00
tsconfig.base.json chore(root): scaffold monorepo — Phase 0 complete 2026-04-16 13:32:21 -06:00
tsconfig.json chore(root): scaffold monorepo — Phase 0 complete 2026-04-16 13:32:21 -06:00
vitest.workspace.ts chore(root): scaffold monorepo — Phase 0 complete 2026-04-16 13:32:21 -06:00

@paratype

A Doorenbos-style Rete II rules engine for TypeScript games, with an authoritative WebSocket chess demo.

Packages

Docs

Getting Started

bun install && bun run check