docs: rendered-output pitfalls (diamond exits, pixel-exact pins, labels) + DOM verification workflow - #132
Conversation
…ixel-exact pins, labels)
The three edited references arrived as CRLF, so GitHub showed a 459/413 whole-file rewrite where the real change is 46 added lines. Restore LF and leave the added sections untouched. Also correct the first decision-diamond row: the inward first segment that crosses the rhombus's own interior reproduces with the pin on the shape's left/right side (`exitX=0;exitY=0.25`, target at the same height). At the exact vertex (`exitY=0.5`) the router detours around the whole shape instead. Both read wrong, and the documented fix (straight lines from the lower edge midpoints) is unchanged.
Feature PRs carry their bullet under Unreleased, and the release commit owns the version bump.
|
Thanks @xiaoraoxiaorao. I verified the geometry claims against the renderer's own output and pushed three small commits onto your branch. 1. Line endings. The three references arrived as CRLF (GitHub renders every line as trailing whitespace), so the PR diffed as a 459/413 whole-file rewrite while the real change was 46 added lines. Restored LF; the added sections are untouched. The diff is now +56/-0 across 4 files. 2. 3. First decision-diamond row reworded. I could not reproduce an interior crossing from the exact left/right vertex. With What I verified independently (drawio CLI SVG export, same renderer core as the viewer):
One caveat on the DOM recipe: on Chrome 152 here |
Agents365-ai
left a comment
There was a problem hiding this comment.
Verified the three added sections against the renderer's own output (details in my comment above), restored LF line endings, and added the Unreleased changelog entry. CI (unittest) is green on a7e2d00. Approving.
- CHANGELOG: cut 3.4.0 (GraphQL importer Agents365-ai#131, rendered-output pitfalls Agents365-ai#132, 365-skills distribution removed Agents365-ai#133) - SKILL.md metadata.version 3.3.0 -> 3.4.0 - tests: align hardcoded declared version
Context
While generating and reviewing a bilingual (Chinese) government geodata-pipeline flowchart with this skill, several edge/label defects slipped through both
validate.pyand visual review. Every rule below was verified against the renderer's actual output (viewer URL + headless--dump-dom, reading<path d>segments and labelforeignObjectanchors), not by eye.What this adds
references/xml-authoring.md— new section Decision-diamond branches, pixel-exact pins, and labels:edgeStyle=noneline per branch from the lower-left / lower-right edge midpoint (exitX=0.25;exitY=0.75/exitX=0.75;exitY=0.75, both on the rhombus outline) to the target's top center is simpler and crosses nothing.entryX/exitXpins must be computed with full precision ((sourceCenterX − target.x) / target.width, e.g.0.0652); a 1–2 px mismatch renders as an S-shaped double curve (twoQbends) just before the arrowhead. Style values accept more than two decimals.endArrow=block;endSize=8for main flow edges —blockThintips flush against the border read as "piercing the box" to reviewers.Yes/No) on the line: the white label chip severs its own edge, and near a corner cuts both segments. Offset longer labels into verified empty space; shorten any label wider than the corridor it annotates.references/troubleshooting.md— new section Verifying the rendered output: dump the viewer DOM and assert per-edge<path>segments and label anchors by script; retryERR_CONNECTION_CLOSEDwith a fresh--user-data-dirand gate screenshots on palette-pixel counts (error pages pass naive "has content" checks, and vision models both miss geometry defects and hallucinate new ones). Two new table rows for these failure modes.SKILL.md— creation-workflow step 5 now points to the DOM-verification fallback when the drawio binary is unavailable or a visual check is inconclusive.All content is cross-platform (any recent Chromium works for
--dump-dom).