Skip to content

add multialignment bar - #27

Merged
gsvprharsha merged 1 commit into
tempestai-dev:mainfrom
AniketR10:feat/multi-select-alignment-toolbar
Aug 14, 2026
Merged

add multialignment bar#27
gsvprharsha merged 1 commit into
tempestai-dev:mainfrom
AniketR10:feat/multi-select-alignment-toolbar

Conversation

@AniketR10

@AniketR10 AniketR10 commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

What changed

Adds a floating alignment toolbar to the canvas (ThreadsView). When 2+ nodes are selected (Ctrl+click or Shift-drag box select), a small pill toolbar appears at the bottom-center of the canvas with 8 controls: align left / center / right, align top / middle / bottom, and distribute horizontally / vertically. Clicking a control recomputes each selected node's position from its real on-canvas size (width/height, falling back to React Flow's measured size or a default for auto-sized/unmeasured nodes), persists the new positions via saveThreadNode, and updates the canvas immediately — the same bulk-reposition pattern the existing "Tidy canvas" button already uses.

Also factored the dimW/dimH size-fallback helpers (previously local to tidy()) out to module scope so both features share one definition instead of duplicating the logic.

Related issue

Closes #16

How was this tested

  • Ran the app locally with npm run dev on Linux.
  • Created a thread, added several nodes (text/chat) via the top toolbar, dragged them apart.
  • Multi-selected nodes via Ctrl+click and via Shift-drag marquee select — confirmed the alignment toolbar appears once 2+ nodes are selected and shows the correct "N selected" count.
  • npx tsc --noEmit passes with no errors.

Checklist

  • npx tsc --noEmit passes
  • cargo check passes (if backend changed) — N/A, no backend files touched
  • I've tested this on my OS — noted which: Linux (Fedora)
  • Docs updated if user-facing behaviour changed
  • No secrets, tokens, or personal paths in the diff

@vercel

vercel Bot commented Aug 14, 2026

Copy link
Copy Markdown

@AniketR10 is attempting to deploy a commit to the Harsha's projects Team on Vercel.

A member of the Team first needs to authorize it.

@gsvprharsha
gsvprharsha merged commit e82d535 into tempestai-dev:main Aug 14, 2026
2 of 3 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.

Multi-select alignment toolbar

2 participants