fix: Group into new area lands at the members' position, not the triggering click - #221
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
computeEnclosedBoundingBoxOriginanchors 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