Archilyzer · Source

archilyzer

Archilyzer
git clone https://archilyzer.pages.dev/source/archilyzer.git
Log | Files | Refs | README | LICENSE

commit bdc6ffd2a3362fee0b2f35694d3e53d8a5d162cc
parent 0ca1d2b02fbe883d23a3681e1da7d55f8a8cfcf3
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Wed, 29 Jul 2026 12:17:36 -0400

My new buttons' aria-labels collided with the card's own locator

`getByLabel` matches by SUBSTRING. The duplicate-cluster card is labelled
`duplicate cluster <id>`, and I labelled the review buttons "confirm duplicate
cluster <id>" and "reject duplicate cluster <id>" — so the card's own locator
resolved to three elements and `duplicate-shorts.spec:328` died on a strict-mode
violation. Caught by the suite; fails and passes deterministically, so it was a
real break rather than the contention flake it first looked like.

Renamed to "confirm cluster <id>" etc., with a note on the component saying why
the substring is forbidden. This repo has now hit the identical collision three
times (deploy-page's "Build & deploy" vs "Build & deploy all sites", the
settings placeholder collision, and this), which is enough to be worth writing
down next to the labels rather than only in FACTS.md.

duplicate-shorts.spec: 3/3 green after the fix.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

Diffstat:
Meditor/app/actionable/components/DuplicateClusterReview.tsx | 20++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/editor/app/actionable/components/DuplicateClusterReview.tsx b/editor/app/actionable/components/DuplicateClusterReview.tsx @@ -14,6 +14,14 @@ type Status = | { kind: "done"; result: ReviewDuplicateClusterResult } | { kind: "error"; message: string }; +// NOTE ON THE aria-labels BELOW: none of them may contain the substring +// "duplicate cluster <id>". That is the CARD's own label, and Playwright's +// getByLabel matches by SUBSTRING, so a button labelled "confirm duplicate +// cluster <id>" makes the card's own locator resolve to three elements and +// every existing assertion on it dies with a strict-mode violation. That is +// exactly what happened here, and this repo has now hit the same collision +// three times (deploy-page's "Build & deploy" vs "Build & deploy all sites", +// the settings placeholder collision, and this). export function DuplicateClusterReview({ clusterId, override, @@ -53,7 +61,7 @@ export function DuplicateClusterReview({ type="button" onClick={() => decide("confirmed")} disabled={disabled || confirmed} - aria-label={`confirm duplicate cluster ${clusterId}`} + aria-label={`confirm cluster ${clusterId}`} className="px-2 py-1 rounded-md border border-border text-xs font-medium hover:bg-muted disabled:opacity-50" > {busy && status.decision === "confirmed" ? "Confirming…" : "Confirm"} @@ -62,7 +70,7 @@ export function DuplicateClusterReview({ type="button" onClick={() => decide("not-duplicate")} disabled={disabled || rejected} - aria-label={`reject duplicate cluster ${clusterId}`} + aria-label={`reject cluster ${clusterId}`} className="px-2 py-1 rounded-md border border-border text-xs font-medium hover:bg-muted disabled:opacity-50" > {busy && status.decision === "not-duplicate" ? "Rejecting…" : "Not a duplicate"} @@ -72,7 +80,7 @@ export function DuplicateClusterReview({ type="button" onClick={() => decide("clear")} disabled={disabled} - aria-label={`clear duplicate cluster decision ${clusterId}`} + aria-label={`clear cluster decision ${clusterId}`} className="px-2 py-1 rounded-md text-xs text-muted-foreground underline hover:text-foreground disabled:opacity-50" > {busy && status.decision === "clear" ? "Clearing…" : "Undo"} @@ -80,7 +88,7 @@ export function DuplicateClusterReview({ )} {status.kind === "done" && status.result.ok && ( <span - aria-label={`duplicate cluster review result ${clusterId}`} + aria-label={`cluster review result ${clusterId}`} className="text-xs text-muted-foreground" > {status.result.shared > 0 || status.result.misaligned > 0 @@ -94,7 +102,7 @@ export function DuplicateClusterReview({ {status.kind === "done" && !status.result.ok && ( <span role="alert" - aria-label={`duplicate cluster review error ${clusterId}`} + aria-label={`cluster review error ${clusterId}`} className="text-xs text-destructive" > {status.result.error} @@ -103,7 +111,7 @@ export function DuplicateClusterReview({ {status.kind === "error" && ( <span role="alert" - aria-label={`duplicate cluster review error ${clusterId}`} + aria-label={`cluster review error ${clusterId}`} className="text-xs text-destructive" > {status.message}