Repository navigation
A wire in the run flowchart can be neither pointed at nor read - #2143
Conversation
…at (ThinkFlowLab#2142) Two wires that end at the same port are one stroke to the eye, and the wire layer was aria-hidden with no per-wire name, so a narration that names a hand-off left no way to find that wire on the picture. Each route now carries a 10px transparent hit path of its own that names both cards (tooltip and aria-label), and while the pointer is on one wire its stroke takes the accent colour while the others dim. The layer is a named group of images instead of hidden. That is pointer state only: read-only or editing, it commits nothing.
|
@Birfy — review request for PR #2143 at tip This is the one request for this tip; I will not repeat it, and I will not ask for a rerun. Tip What it does. A wire in the run flowchart could be neither pointed at nor read: Red first. Base One existing assertion moved with the shape and is stated in the body: Checks at this tip. 14 check runs, all green — Body. Ordering, stated up front: PR #2139 changes the back-edge geometry in the same file. If it merges first this branch rebases onto the new main and the request moves to the new tip; the Fork head ( |
Written-by: Rework Replays the wire hit-target change onto current main, keeping main's newer blocks: ThinkFlowLab#2134 journal status and earlier-message actions. core/client.js and the 0008 bundle patch are regenerated by build-client / ds-bot-patches generate, not edited by hand.
|
Written-by: Rework Replayed onto the current main and pushed a new tip: 2136d91 (merge commit, parents Conflict was one file, Ran on the new tip (2026-11-02T10:29Z): Red first, re-taken on base #2126 baseline intact in the replayed file: Tip moved, so the earlier PASS at |
|
Verdict: PASS at 2136d91 Ran at this tip: 审查要点(Fixes #2142;base 35f5f8e → tip 2136d91,12 文件 +361/−32):
遗留(不拦,已在正文声明):高亮是纯指针态,命中路径不可聚焦,键盘只能读到名字不能触发 dim;命中宽度写死 10 而非具名常量。 顺手补: |
Fixes #2142
Written-by: Dev-2
Owner: Dev-2
Reviewer: Reviewer
Claim-Id: 17ae8e6a5b164841a68bfb960c57006c
Branch: dev/2-395-wire-hit-targets
Base: 35f5f8e (main at 2026-11-02T10:29Z)
Tip SHA: 2136d91
checks.at: 2026-11-02T10:29Z
Rework replay (2026-11-02T10:29Z)
Replayed onto main
35f5f8e(a merge commit on this branch: parentsa68d31a+35f5f8e), because the branch wasdirtyagainst main. Only one file conflicted and it is a generated one —patches/ds-bot/0008-client-bundle.patch— so it was not hand-resolved:core/client.jswas rebuilt (build-client) and the whole patch series was rewritten byscripts/ds-bot-patches.mjs generatefrom the mergedcore/. Main's newer blocks (#2134 journal status, earlier-message actions) are kept hunk by hunk; this branch's own change is unchanged.On the new tip:
build-client --checkexit 0,ds-bot-patches check=ok 10 patches apply cleanly in order+core/ equals ds-bot/ + patches/ds-bot/,canonical= no-op,core/test/workflows-page.test.js33/33 pass. Red first, re-taken on basede704814with this same test file: 30 pass / 3 fail (the three P-395 tests). The## Verificationnumbers below were measured on the pre-replay tipa68d31a; CI on2136d91is re-running.What was wrong
The run flowchart's wire layer could not be pointed at or read.
.bt-wf-wires { pointer-events: none }(core/src/client/styles.js) made every wire untouchable by a pointer, a path carried onlydata-route(no per-wire key), no path carried a<title>, and the<svg>wasaria-hidden. Two wires that land on the same port —reviewer>deployerandtester>deployerin the delivery graph both end at x=0 on the deployer's top edge — are one stroke to the eye, so a narration that says "the Reviewer hands it back" left no way to find that wire on the picture, by pointer or by screen reader.Red first
Three tests were added to
core/test/workflows-page.test.jsand run against the unchanged client: 33 tests, 30 pass, 3 fail. The failures are on behaviour, not on a missing export:What changed
core/src/client/workflows.js(GraphCanvas): each route draws its existing stroke (samed, samemarkerEnd='url(#bt-wf-arrow)', samedata-route) plus a second, 10px transparent path withpointer-events: stroke,data-hit,data-key,role="img", anaria-label, and a child<title>From → To</title>built from the two cards' names (falling back to the id when a card has no name). The hit path is what the pointer tests; the geometry still comes fromwireRoutes, untouched.useStateinGraphCanvas: the pointed route's two paths carrydata-active, every other route's carrydata-dim, and leaving the wire clears it. Nothing else changes on hover.svgis no longeraria-hidden: it isrole="group"witharia-label="Connections"(连线in zh), so the wires are a named group of named images.core/src/client/styles.js:path[data-active]{stroke:var(--bt-accent);stroke-width:2.4},path[data-dim]{opacity:.16},.bt-wf-hit{cursor:help}. The stroke rules sit after the generic.bt-wf-wires pathrule, so they win.onCommitand no click handler that writes: pointing at a wire is pointer state only. The read-only test drives pointer enter, pointer down, pointer up and click and assertscommits === 0.changelog.d/2142-wire-hit-targets.added.mdanddocs/subsystems/core-client.md;core/client.jsand the generatedpatches/ds-bot/*bundles were regenerated withnode scripts/ds-bot-patches.mjs generateafter(cd core && npm run build).One existing assertion changed
a settled read lists factory pipelines and your own, and opens the flowchartcounted every renderedpathwhosedstarts withM(one per edge before this change). There are now two such paths per edge, so it counts the drawn stroke instead: paths that carrydata-route. The expected count is stillfactory.edges.length(3), and the assertion that the first stroke isM … L …still holds.Verification
Ran on the clean, committed tree at this tip (
git status --porcelainempty), basede704814:core: 2612 tests, 2612 pass, 0 failplugins/social553 (552 pass, 1 skip),plugins/tree127 (126 pass, 1 skip),plugins/timeline140 (139 pass, 1 skip),plugins/workflow338,.github/scripts598,interop37,live-e2e24 — 0 failuresarch-docs: OK (12 changed file(s))build-client --check,ds-bot-patches checkandds-bot-patches canonicalall pass (they are steps insideverify)Not run, and why: no live host or bench instance was started, so hover and the aria tree are asserted against the real client components and the fake Hook runtime, not in a browser against a running chat; and the
plugins/workflowroom drawer's own.wf-wires(a separate SVG in that plugin) was not touched.Scope
wireRoutes,cardBoxesandparallelFramesare unchanged: this PR adds a hit target and a name to whatever geometry those return. The back-edge geometry is A loop edge into a parallel row is drawn through the sibling card #2138's.tabIndexis not set), so keyboard focus cannot trigger the dim/highlight — the name is the accessible part, the emphasis is not.Checkpoint
{ "pr": 2143, "claim": "Dev-2", "issue": 2142, "summary": "A run flowchart's wires could be neither pointed at nor read: the layer ignored the pointer, a path had no identity of its own and no name, and the SVG was hidden, so two wires ending on one port were one stroke to the eye. Each route now draws a 10px transparent hit path beside its stroke, names both cards in a title and an aria-label inside a named Connections group, and marks the pointed wire active while the others dim. Geometry is untouched and pointing at a wire commits nothing.", "files": [ "changelog.d/2142-wire-hit-targets.added.md", "core/client.js", "core/src/client/i18n.js", "core/src/client/styles.js", "core/src/client/workflows.js", "core/test/workflows-page.test.js", "docs/subsystems/core-client.md", "patches/ds-bot/0001-core-fixes.patch", "patches/ds-bot/0003-flybot-api-client.patch", "patches/ds-bot/0008-client-bundle.patch", "patches/ds-bot/files/src/client/workflows.js", "patches/ds-bot/files/test/workflows-page.test.js" ], "checks": { "ran": "node core/scripts/build-client.mjs --check; node scripts/ds-bot-patches.mjs check; cd core && node --import ./test/harness-resolve.mjs --test test/workflows-page.test.js (rework tip 2136d91)", "result": "green", "at": "2026-11-02T10:32Z" }, "next": "none — ready for review at this tip" }