From f52697551f73bd77618c619df57d9e12b6f91841 Mon Sep 17 00:00:00 2001 From: Carlos Penaforte Date: Wed, 7 Oct 2026 21:00:40 -0300 Subject: [PATCH 1/9] fix(platform): raise the PR-data dot contrast and fix copy The amber dot is the only per-row cue on the compare page, and amber-500 sits near 2.1:1 on the light card, below the 3:1 WCAG 1.4.11 asks of it. The dot and its legend now use amber-600 on light (about 3.2:1) and keep amber-500 on dark (well above 3:1). The PR-data tooltip said merge strategy isn't classified "when enrichment fails"; the engine only skips it when enrichment fails for merged PRs, so the copy now says so, in both locales. Refs #236 Assisted-by: Claude Code Co-Authored-By: Claude Opus 5.5 --- platform/lib/translations.ts | 4 ++-- platform/src/app/[tenant]/compare/compare-view.tsx | 8 +++++--- platform/tests/pr-enrichment.test.ts | 11 +++++++++++ 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/platform/lib/translations.ts b/platform/lib/translations.ts index 3eb23ea..2cfcac2 100644 --- a/platform/lib/translations.ts +++ b/platform/lib/translations.ts @@ -630,7 +630,7 @@ export const translations = { fetch: "PR read", }, incompleteTooltip: - "This run's PR read failed at: {steps}. Merge strategy isn't classified when enrichment fails, and flow, review and in-PR metrics may be missing or skewed.", + "This run's PR read failed at: {steps}. Merge strategy isn't classified when enrichment fails for merged PRs, and flow, review and in-PR metrics may be missing or skewed.", }, dora: { title: "DORA", @@ -2204,7 +2204,7 @@ export const translations = { fetch: "leitura de PRs", }, incompleteTooltip: - "A leitura de PRs desta execução falhou em: {steps}. A estratégia de merge não é classificada quando o enriquecimento falha, e métricas de flow, de review e de commits em PR podem faltar ou sair distorcidas.", + "A leitura de PRs desta execução falhou em: {steps}. A estratégia de merge não é classificada quando o enriquecimento dos PRs mergeados falha, e métricas de flow, de review e de commits em PR podem faltar ou sair distorcidas.", }, dora: { title: "DORA", diff --git a/platform/src/app/[tenant]/compare/compare-view.tsx b/platform/src/app/[tenant]/compare/compare-view.tsx index dbd3ab6..02a16d8 100644 --- a/platform/src/app/[tenant]/compare/compare-view.tsx +++ b/platform/src/app/[tenant]/compare/compare-view.tsx @@ -222,7 +222,9 @@ function MergeStrategyCell({ * Amber dot next to a repo whose latest run read PR data only partially. The * dot is decorative (hover title for sighted users); the step list is also in * the DOM as screen-reader text, and a legend under the list says what the dot - * means, so nothing hinges on colour or on a tooltip. + * means, so nothing hinges on colour or on a tooltip. Amber 600 on light and + * 500 on dark keep the dot, the only per-row cue, above 3:1 against the card + * (WCAG 1.4.11). */ function PrDataMarker({ repo, label }: { repo: RepoSummary; label: string }) { if (repo.pr_degraded_steps.length === 0) return null; @@ -231,7 +233,7 @@ function PrDataMarker({ repo, label }: { repo: RepoSummary; label: string }) { @@ -633,7 +635,7 @@ export function CompareView({ repos }: CompareViewProps) {

diff --git a/platform/tests/pr-enrichment.test.ts b/platform/tests/pr-enrichment.test.ts index 4a75224..20898f7 100644 --- a/platform/tests/pr-enrichment.test.ts +++ b/platform/tests/pr-enrichment.test.ts @@ -38,6 +38,17 @@ describe("PR data badge strings", () => { expect(prData.incomplete).toBeTruthy(); expect(prData.incompleteTooltip).toContain("{steps}"); }); + + // Enrichment failing for open or closed PRs leaves the merge strategy + // classified; only merged PRs feed it. + it("ties the unclassified merge strategy to merged PRs", () => { + expect( + translations["en-US"].repos.detail.prData.incompleteTooltip, + ).toContain("when enrichment fails for merged PRs"); + expect( + translations["pt-BR"].repos.detail.prData.incompleteTooltip, + ).toContain("quando o enriquecimento dos PRs mergeados falha"); + }); }); describe("prDegradedSteps duplicates", () => { From 6135669e203a96a4ff660356262a3abd4abea503 Mon Sep 17 00:00:00 2001 From: Carlos Penaforte Date: Wed, 7 Oct 2026 21:02:21 -0300 Subject: [PATCH 2/9] fix(platform): show failed PR steps as text on touch and keyboard The failed PR-read steps lived only in a hover title and screen-reader text, on the compare dot and on the repo-page badge, so touch and keyboard users could see that the read was incomplete but not where. The mobile compare card now shows the localized steps as muted text next to the dot, and the repo page shows them next to the badge. On the card the visible steps replace the dot's sr-only sentence, so screen readers read them once, after a short sr-only "PR data incomplete:" prefix. The card marker also drops its ml-2: the row already spaces its items with gap-2. The desktop table is unchanged. Refs #236 Assisted-by: Claude Code Co-Authored-By: Claude Opus 5.5 --- .../src/app/[tenant]/compare/compare-view.tsx | 58 +++++++++++++++---- .../app/[tenant]/repos/[repoName]/page.tsx | 27 +++++---- 2 files changed, 63 insertions(+), 22 deletions(-) diff --git a/platform/src/app/[tenant]/compare/compare-view.tsx b/platform/src/app/[tenant]/compare/compare-view.tsx index 02a16d8..93224e5 100644 --- a/platform/src/app/[tenant]/compare/compare-view.tsx +++ b/platform/src/app/[tenant]/compare/compare-view.tsx @@ -220,21 +220,48 @@ function MergeStrategyCell({ /** * Amber dot next to a repo whose latest run read PR data only partially. The - * dot is decorative (hover title for sighted users); the step list is also in - * the DOM as screen-reader text, and a legend under the list says what the dot - * means, so nothing hinges on colour or on a tooltip. Amber 600 on light and - * 500 on dark keep the dot, the only per-row cue, above 3:1 against the card - * (WCAG 1.4.11). + * dot is decorative (hover title for sighted users), and a legend under the + * list says what it means, so nothing hinges on colour or on a tooltip. Amber + * 600 on light and 500 on dark keep the dot, the only per-row cue, above 3:1 + * against the card (WCAG 1.4.11). + * + * In the table the failed steps are screen-reader text. The mobile card shows + * them as text instead (`visible`), since touch and keyboard users get no + * hover; screen readers then read that text once, after a short sr-only + * prefix, rather than the full label on top of it. */ -function PrDataMarker({ repo, label }: { repo: RepoSummary; label: string }) { +function PrDataMarker({ + repo, + label, + visible, +}: { + repo: RepoSummary; + label: string; + visible?: { prefix: string; steps: string }; +}) { if (repo.pr_degraded_steps.length === 0) return null; + const dot = ( +