Skip to content

fix: Group into new area lands at the members' position, not the triggering click - #221

Merged
alicoding merged 1 commit into
mainfrom
group-placement
Aug 18, 2026
Merged

fix: Group into new area lands at the members' position, not the triggering click#221
alicoding merged 1 commit into
mainfrom
group-placement

Conversation

@alicoding

Copy link
Copy Markdown
Owner

Owner-hit: grouping jumped the new area to the bottom of the board. Root cause (traced, different from the initial hypothesis): the container anchored at the triggering UI element's screen point — a member's right-click, or worst-case the selection tray's own bottom-center Group button / bare-G anchor. The new pure computeEnclosedBoundingBoxOrigin anchors it at the grouped members' own bounding-box top-left (freeMoves-aware), click-point fallback only when no member box resolves. Regression proof is real: the new e2e assertion was verified to FAIL with the fix reverted (459px off vs 250px tolerance).

🤖 Generated with Claude Code

https://claude.ai/code/session_01FW5GkkAG8du7tNdYLk2zSd

…e trigger click

The reported "jumps to the bottom of the board" bug was NOT the
hypothesized nil-Position packer path -- select-then-group always
persists a real Position. The actual bug: the new container's Position
came from the triggering UI element's screen point (a member's
right-click, or worst case the selection tray's own bottom-center
Group button / bare-G, both anchored at the floating tray's rect) via
screenToFlowPosition, never the grouped members' own rendered spot.

useAtlasCreation's groupRequest effect now anchors the new container
at computeEnclosedBoundingBoxOrigin's bounding-box top-left over the
enclosed members' current freeMoves-aware boxes (AtlasBoard.tsx's
topLevelBoxes/noteBoxes, hoisted above useAtlasCreation so they're
available when the request is handled), falling back to the click
point only if no member box resolves.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FW5GkkAG8du7tNdYLk2zSd
@alicoding
alicoding enabled auto-merge (squash) August 18, 2026 03:47
@alicoding
alicoding merged commit 7904e8b into main Aug 18, 2026
25 checks passed
@alicoding
alicoding deleted the group-placement branch August 18, 2026 03:55
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