Repository navigation
web: scale the automation canvas as one diagram - #1821
Merged
Merged
Conversation
The Build tab gave each way in an equal-width column and scaled each canvas to its own column. With several ways in, a column was narrower than its flow even at the minimum scale, so nodes were clipped inside a per-column scroll box, and columns could show different scales. Now a ZoomFrame scales the whole diagram (every way in, the agent stubs, the bus, the agent) with one transform. Each column is as wide as its canvas. "Fit" picks the largest scale in [50%, 100%] that fits the width and centres the diagram; below 50% the row scrolls. A drag on the empty ground pans. The zoom controls show the scale and step from the scale on screen. "Add another way in" moves to the toolbar as a popover, so it no longer takes width from the row. AgentBus takes the first and last column widths, because columns are no longer equal. Review pass: removed the per-canvas scroll and scale code from Canvas and its zoom prop; no other findings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Problem
The Build tab's canvas squished and clipped nodes when the canvas column was narrow. Each way in got an equal-width column, and each canvas scaled itself to its column. With several ways in, a column was narrower than its flow even at the minimum scale (50%). The nodes were then cut off inside a small per-column scroll box, and different columns could show different scales.
Change
The diagram is now one picture with one zoom.
ZoomFramescales every way in, the agent stubs, the bus and the agent node with one transform. Each column is as wide as its canvas, so no node is clipped.Canvasloses its own scroll box, scale andzoomprop. It now draws at its natural size.Validation
pnpm format:check,pnpm lint(no new warnings),pnpm build.vitest run src/pages/automations: 159 tests pass, including the newZoomFrame.test.tsx(fit, both limits, stepping, and returning to Fit).🤖 Generated with Claude Code