Repository navigation
Draw the drawer Edit plane's frame and wires from its laid-out cards - #1697
Conversation
The laid-out plane shrinks a card to the panel (98x72, or 98x96 once the rows are measured), but the parallel frame and the wires were still drawn from the fixed 168x72 card: a 3-way step's frame spanned x = -22..386 and the clipped canvas cut both uprights, its bottom edge ran through the cards, and a wire's single fold crossed the cards of the other line (8 of 13 edges on the 6-way fixture). The laid-out rows are now `flowLayout`'s own — one copy of the row geometry: the cards are its boxes, the dashed frame is the band it drew, and the wires are the `flowWires` routing around those boxes. The fitted plane keeps its scaled cards, its frame and its single fold unchanged, and `parallelFrameStyle` reads the drawn `node.w` / `node.h`. Fixes ThinkFlowLab#1693
|
@Birfy Review PR #1697 at 8424a3d Fixes #1693 — the drawer's Edit plane now draws what it shows: |
Merge main d534703 into the branch: this commit only moves the ThinkFlowLab#1693 change onto the current main — it picks up ThinkFlowLab#1686's plane hint (a drag in the laid-out plane commits no coordinates) and adds the ThinkFlowLab#1693 frame and wire geometry, with no other behaviour change. Docs-not-needed: docs/subsystems/workflow.md is updated in this merge. Fixes ThinkFlowLab#1693
|
@Birfy Review PR #1697 at 7de43e3 Fixes #1693 — the drawer's Edit plane now draws what it shows: This tip is a rebase onto live main |
|
Verdict: PASS at 7de43e3 Ran at this tip: Red first (same command, The branch sits on b58ad68 and is stale against main d534703, so I replayed the tip's change set (plugins/workflow/client.js, its test, docs/subsystems/workflow.md, changelog.d/1693-drawer-frame-wires.fixed.md) onto main d534703 and ran the changed directory's test file there — 97/97 with the fix, the five #1693 tests red without it (frame left of the first card -22 !== 13; no band frame; frame -22..386 outside the 364px panel; 32 wire crossings). Not run: the rest of Check-runs at the tip: tests-ok, plugins (workflow/tree/social/timeline), package, merge-gate, Node 24 all success; enqueue-guard failure is the fork shape (no agent-pr), not a test red. Checkpoint{ |
Fixes #1693
Owner: Dev3
Written-by: Dev-3
Reviewer: Reviewer
Branch: dev/3-wrapped-frame-wires
Base: b58ad68
Tip: 8424a3d
Tree: 865e9529dd3f38d38294fae75331f766ebb56118
Claim: aa5f58ca1a89429ba0f03f9922dce163
What and why
The drawer's Edit plane has two shapes: a fitted plane while a parallel step's cards still stay apart (
fitPlane: scaled centres, 168x72 cards) and a laid-out one once they cannot (editPlane: cards shrunk to the panel, 98 wide at a 364px drawer and 96 or 72 high once measured). The frame and the wires were still drawn from the fixed 168x72 card in both.parallelFrameStyle(client.js:652) tookleft/widthfromNODE_Wandright/bottomfromnode.y + NODE_H, never from the drawn box. On the 3-way panel-364 fixture (cards 98 wide at centres 72/182/292) that is x = -22..386, so the drawer canvas clipped both uprights (overflow:hidden). Its height also added onlypadwhile its top sits 20px above the cards, so the dashed bottom edge ran 10px through the cards at the 72px height and 34px at 96px. It now readsnode.w ?? NODE_Wandnode.h ?? NODE_Hand takes its bounds from the cards it wraps.wirePath(from, to, 0), one fold at the midpoint of the two rows. On the 6-way fixture that put the fold through cards on 8 of 13 edges (c>r4/c>r6through r1..r3,r1>d/r3>dthrough r4..r6). The laid-out plane now drawsflowWires' own paths, computed from the boxes and bandsflowLayoutalready lays out — the function wrote itself for exactly this failure mode (a straight run across a band cuts through the other line's cards, workflow: wrap an over-wide drawer layer inside its frame #1659), which is why the Read-only plane has 0 crossings today.editPlaneno longer computes its own rows: the laid-out branch takesflowLayout's boxes for its cards, its bandframesfor the dashed frame, and itswires. The fitted plane keeps its scaled cards, itsparallelFrameStyleframe and its single-foldwirePath, so a graph whose cards still fit draws exactly what it drew before.Scope:
plugins/workflow/client.jsand its test, one subsystem-doc row, one changelog fragment. Nocore/, nopatches/**.Acceptance
the parallel frame reads the drawn card size, not the fixed 168x72 (#1693): frame 13..351 for cards 23..341;the laid-out Edit plane paints the parallel frame inside the panel and around the cards (#1693)asserts the same on the rendered planethe laid-out frame encloses every card inside the 364px panel at card height 72 / 96 (#1693): frames 120..230 at 72 and 144..278 at 96, both 13..351 wide, both enclosing every card boxthe laid-out Edit plane routes every wire around the cards of a 6-way step (#1693): 12 edges, 0 segments inside any card box and 0 inside any out-port dot. See the note below on the remove-button box.client.test.js:1145-1171unchanged and passingBASE_PLANES(read:delivery@368,read:fork3/4/6@368,edit:delivery@364,edit:fork2@364)BASE_PLANESentries —flowWirespaths byte-identical;flowLayout/flowWiresare not edited at all, only called by the Edit planeTZ=UTC ARCH_DOCS_BASE=<base> npm run verifyexit 0, red first for (a)-(c)client.jsbelow; green at the tip, counts belowNote on (c) and the remove button. The
.wf-minibox rides 8px above its card (top:-8px,client.js:2238) and the out-port dot 5px below it, while a wrapped line's wrap gap isFLOW_WRAP_GAP = 12px: 5 + 8 > 12, so any horizontal run that crosses that gap into the second line enters one of the two boxes. The routesflowWirespicks are exactly the Read-only plane's (byte-identical, criterion (e)), and on the 6-way fixture they touch the remove-button box with 6 segments at y=226 — the wrap seam. The wire is painted under the card (the svg is the plane's first child) and under the opaque button, so the button keeps its click; the card box and the out-port dot, which sit on the card, are clear. The test asserts those two and documents the button case in place. If the team wants the button box clear as well, the wrap gap has to grow, which moves the Read-only plane and breaks (e) — that is a separate decision, not this fix.Red first
The new tests run against the pre-fix source: worktree at
dcaae9bbwith onlyplugins/workflow/test/client.test.jsreplaced.plugins/workflow/client.jsis blob4bd73e46atdcaae9bb, at4e0fa9c5and atb58ad688, so this is the same source this branch now sits on.At the tip the same file is 94/94.
What I ran
TZ=UTC ARCH_DOCS_BASE=b58ad688 npm run verify— exit 0: core 1981,plugins/social539,plugins/tree125,plugins/timeline129,plugins/workflow269 (+5 new),.github/scripts549, interop 37, live-e2e 24, all fail 0;arch-docs: OK (4 changed file(s));ok 10 patches apply cleanly in order;ok core/ equals ds-bot/ + patches/ds-bot/; oxlint 0 errors (64/36/9/2/15/0 warnings, all pre-existing).node --import ./test/resolve.mjs --test test/client.test.jsinplugins/workflow, at the tip (94/94) and on the pre-fix source (89/94, five red).node .github/scripts/changelog.mjs check— well formed.Not run: the browser/smoke bench and a visual check in the drawer UI (no host here);
npm ci/npm run harnessin this worktree (the shared install is linked, unchanged). No push tomain, nocore/orpatches/**change, so the generated-file recipe does not apply.{
"pr": 1697,
"claim": "Dev3",
"issue": 1693,
"summary": "The drawer's laid-out Edit plane now takes its rows from flowLayout: the cards are its boxes, the dashed parallel frame is the band frame it drew, and the wires are the flowWires routing around those boxes, so a 3-way step at a 364px panel keeps its frame inside the canvas and no wire folds through a card of the other line. parallelFrameStyle reads node.w/node.h. The fitted plane keeps its scaled cards, its frame and its single fold, and the Read-only plane is byte-identical.",
"files": ["plugins/workflow/client.js", "plugins/workflow/test/client.test.js", "docs/subsystems/workflow.md", "changelog.d/1693-drawer-frame-wires.fixed.md"],
"checks": { "ran": "TZ=UTC ARCH_DOCS_BASE=b58ad688 npm run verify", "result": "green", "at": "8424a3d913e1cd483c3d347526fce2fcd5a57e1e" },
"next": "none — ready for review"
}