Skip to content

Widget grid UX: drag to move, Add-widget picker, create-via-chat - #24

Merged
kateebonner merged 1 commit into
local/amicodefrom
kate/widget-dnd-create
Jul 15, 2026
Merged

Widget grid UX: drag to move, Add-widget picker, create-via-chat#24
kateebonner merged 1 commit into
local/amicodefrom
kate/widget-dnd-create

Conversation

@kateebonner

@kateebonner kateebonner commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

What

Stacked on #23 (merge that first). Rebuilds the dashboard customization flow around Kate's live design direction — the ⋯ menu is the only chrome; everything else is direct manipulation.

⠿ Move — drag replaces buttons

  • One Move entry in the card's ⋯ menu flips move mode: light scrim + dashed ring, no control pill, no name overlay — the cards look exactly like themselves and become draggable. The dragged card follows the pointer (no ghost, no fade); neighbors slide out of the way.
  • @thisbeyond/solid-dnd (already used 4× in the app) — move mode only, where the scrims make the whole grid surface host-owned so no sandboxed iframe can eat a pointermove.
  • Bug found live and fixed: the rendered list must not reorder mid-drag — solid-dnd previews the shuffle with transforms, and a DOM reorder moves the active card's transform origin, detaching it from the pointer. The array commit lands once at drop (applyBucketOrder) — important anyway, since every save is a POST that remounts all widget iframes.
  • Hero/tile buckets are separate sortable groups; cross-bucket drops are no-ops. Arrow keys on a focused card remain the invisible keyboard path.

+ Add widget — opens the tray

The tray is the one place every available widget collects (Kate's call): ⋯ → Add widget opens it directly. Hidden entries restore, never-pinned registry widgets pin (same entry shape the chat's "Pin to dashboard" appends — chat-authored widgets now surface here instead of being invisible until pinned from chat), and create new widget… hands off to a fresh chat via startWithPrompt() with the composer prefilled (not auto-sent); amicode_author_widget takes it from there and the preview card's Pin closes the loop. An all-hidden board shows a quiet "Add widget…" line so the flow is never dead-ended.

Removed (Kate's calls)

Fork (UI entry only; server route stays) · Arrange dashboard… · the edit-mode control pill + name overlay · Move up/Move down · the interim in-menu add picker. Dead code swept: posInRow, onFork/forkWidget, orphaned pill/name/picker CSS.

Verification

  • bun turbo typecheck (app+ui) clean; bun test ui 221 / app 388, 0 fail
  • Every iteration exercised live by Kate in the installed VSIX (drag attach/detach, menu flows, move mode visuals, tray)
  • CSS diff kept semantic — no formatting churn

🤖 Generated with Claude Code

@kateebonner
kateebonner force-pushed the kate/widget-dnd-create branch 2 times, most recently from 906b9e6 to 1d05fc1 Compare July 15, 2026 05:51
@kateebonner
kateebonner changed the base branch from kate/nav-defaults-capsule to local/amicode July 15, 2026 05:54
…eate-via-chat

Reorder is now DRAG: each card's ⋯ menu gains one ⠿ Move entry that flips
move mode — light scrim + dashed ring, no control pill, no name overlay
(Kate: cards must look the same while dragging) — and the cards become
draggable. solid-dnd sortables (the dep packages/app already uses 4×),
move mode only: the scrims make the whole grid surface host-owned, so no
sandboxed iframe can eat a pointermove. The rendered list must NOT
reorder mid-drag — solid-dnd previews the shuffle purely with transforms,
and a DOM reorder moves the active card's transform origin, detaching it
from the pointer (bug found live) — so the array commit lands ONCE at
drop via applyBucketOrder (each save is a POST that remounts every
widget iframe). Buckets (hero/tile) stay separate sortable groups;
cross-bucket drops are no-ops. Arrow keys on a focused card are the
invisible keyboard path; move-up/move-down buttons are gone.

+ Add widget (replaces New widget…, per Kate) drills the ⋯ menu into a
picker: restore hidden entries, pin registry widgets never added (same
entry shape the chat's Pin-to-dashboard appends), or "Create new
widget…" — which hands off to a fresh chat via startWithPrompt() with
the composer prefilled (not auto-sent); amicode_author_widget takes it
from there and the preview card's Pin closes the loop. The move-mode
tray keeps restore + create; an empty board (everything hidden) shows a
quiet Add widget… line so the flow is never dead-ended.

Removed per Kate: the fork option (server route stays; no UI entry),
Arrange dashboard…, the edit-mode control pill and name overlay, and the
old Move up/Move down menu items. Dead code swept: posInRow, onFork
prop + home's forkWidget, and the orphaned pill/name CSS.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@kateebonner
kateebonner force-pushed the kate/widget-dnd-create branch from 1d05fc1 to 3d1d971 Compare July 15, 2026 05:56
@kateebonner
kateebonner merged commit 6793673 into local/amicode Jul 15, 2026
0 of 4 checks passed
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