fix(canvas): WORKSPACE_PROVISIONING grid origin offset — prevent viewport clipping - #122
Merged
Merged
Conversation
…port clipping New nodes were placed at (0,0) or close to it, causing them to spawn behind the toolbar/palette chrome and require manual panning to find. Add GRID_ORIGIN_X/Y = 100 offset so the first node lands in clear canvas space, and update the position assertion in the unit test accordingly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This was referenced Apr 15, 2026
Closed
molecule-ai Bot
pushed a commit
that referenced
this pull request
Apr 21, 2026
fix(canvas): WORKSPACE_PROVISIONING grid origin offset — prevent viewport clipping
1 task
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.
Summary
(0,0)(or close to it), placing them behind the left toolbar/palette chrome and the top bar, requiring users to manually pan to find themGRID_ORIGIN_X = 100/GRID_ORIGIN_Y = 100constants so the first deployed node lands in clear canvas spacecanvas-events.test.tsposition assertion from{ x: 0, y: 0 }→{ x: 100, y: 100 }to matchFiles changed
canvas/src/store/canvas-events.ts— WORKSPACE_PROVISIONING new-node branch: introduceGRID_ORIGIN_X/Y, rename spacing constants toCOL_SPACING/ROW_SPACING, useidx = nodes.lengthcanvas/src/store/__tests__/canvas-events.test.ts— update position assertion for first provisioned nodeTest plan
canvas-events.test.ts— 30/30 passing (run:npx vitest run src/store/__tests__/canvas-events.test.ts)npm run build— clean, no errors🤖 Generated with Claude Code