Repository navigation
fix(flow designer): a flow wider than the canvas opens zoomed out to fit its width - #27978
Merged
Merged
Conversation
…fit its width The flow canvas opened every flow at 100%, so a branching flow on a phone-width canvas had its outer branches cut off at both edges. The mount framing now zooms out until the diagram's width fits (floor MIN_ZOOM), never zooms in, and leaves a 0-wide hidden canvas at 100%. Claude-Session: https://claude.ai/code/session_01Utp6CZrsFMFmWFsxTaq2Bu Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
|
domain:ui#3 · os-bill · session_01Utp6CaJoinvGQSbHeDaWBe 席位核对ACCEPT · head
Generated by Claude Code |
This was referenced Oct 30, 2026
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.
Requested by Bill · project thread
维护者速读
FlowCanvas.tsx里挂载时居中的那个 effect(#27356 row 22注释处)。pnpm --dir ui exec vitest run packages/app-shell/src/views/metadata-admin/previews/FlowCanvas.openFit-27356.test.tsx,应见 4 passed。Part of #27356 (row 22, hotcrm#2320 Studio S11: the flow canvas opens fitted at phone width)
Clause-②: no
Metadata-protocol: none
What changes
FlowCanvasframed every flow at 100%, centred, on mount. On a phone-width canvas a branching flow's outer branch nodes hung off both edges until the author pressed fit-to-view. The mount framing now takesz = max(MIN_ZOOM, min(1, (canvasWidth - 32) / diagramWidth))and centres the diagram at that zoom.addNode/insertOnEdgecall sites (another card is changing those two).views/metadata-admin/previews/FlowCanvas.tsxis outside this order's declared Studio surface; the seat widened it to this one file for row 22.Tests
FlowCanvas.openFit-27356.test.tsx(4 tests) on the real canvas, with the viewport's box andResizeObserverdoubled as inFlowCanvas.resizeFit-11795: a three-branch flow at 390px opens below 100%, centred, its whole width inside the canvas, and the zoom readout shows that zoom; the same flow at 1400px opens at 100%, centred; a linear flow that fits 390px opens at 100%; a 0-wide canvas opens at 100%.Readings (head 881dbf5, run on bf7e1c77, the same tree before a message-only amend; branch rebuilt from origin/main bacb3e6 after #27927 merged; install and app-shell closure rebuilt)
FlowCanvas(19 files, including feat(studio): Update Records offers the triggering record as its target, starts on the trigger object, and picks keys by label #27930'sFlowCanvas.updateRecordSeed-27834): 19 passed, 293 passed.pnpm --filter @object-ui/app-shell run type-check: exit 0 (lock VERDICT command-exit 0).scripts/ablation-replace.mjs(anchor 1 to 0): the mount zoom back toconst z = 1;: 1 failed / 3 passed (the 390px branching case red); restored blob = HEAD blob776392e9d921,git diff HEADempty. vitest resolves@object-ui/*to source, so no rebuild leg.pnpm --dir ui run check:i18n-drift: no en value changed.Acceptance notes
highlightFields(ADR-0085):plugin-gridobjectGridGenerateColumnsandplugin-listListViewlead with them when the object declares them, and Studio's object Settings tab edits them. "Account Name (Normalized)" is a HotCRM field that is nothidden, on an object that declares nohighlightFields, so the default branch shows it. The fix is HotCRM's metadata (declarehighlightFields, or mark the field hidden), outside this repo.MIN_ZOOM. A diagram wider than 2.5 canvas widths still overflows at 40%; it was not measured on a real HotCRM flow.Verification
On head
881dbf54(tree identical tobf7e1c77, where they ran):dispatch-gates --commandsderived 34 families for this diff; all 34 were run locally, each exit 0, and--ranreconciled 34 run, 0 NOT-MEASURED, 0 UNRUN.check:new-line-citations: 0 new. CI check-runs were in progress when this was opened.Generated by Claude Code