Skip to content

fix(platform): make the PR-data marker readable on touch and keyboard - #293

Merged
cpenaforte-clickbus merged 9 commits into
fix/pr-data-incomplete-polishfrom
fix/pr-data-incomplete-a11y
Oct 8, 2026
Merged

cpenaforte-clickbus merged 9 commits into
fix/pr-data-incomplete-polishfrom
fix/pr-data-incomplete-a11y

Conversation

@cpenaforte-clickbus

@cpenaforte-clickbus cpenaforte-clickbus commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Contexto e Motivação

A revisão final das correções de plataforma (#292) apontou o que ainda dependia de passar o mouse: quem usa toque ou teclado não via quais passos da leitura falharam, nem na comparação nem no badge da página do repositório, porque essa informação estava só no title. O ponto âmbar tinha contraste de cerca de 2,2:1 sobre fundo claro, abaixo dos 3:1 do WCAG 1.4.11 para o único indicador da linha. E o tooltip dizia que a merge strategy não é classificada quando o enriquecimento falha, o que, com a degradação por estado do engine, só vale para os PRs mergeados.

Refs #236

Mudanças

  • Os passos que falharam aparecem como texto visível, traduzido, na linha da tabela de comparação, no card do celular — numa linha própria, para não espremer o nome do repositório — e ao lado do badge da página do repositório. O leitor de tela ouve uma frase só por layout, sem repetição; o badge perde o title que repetia os passos.
  • O ponto passa a bg-amber-600 no tema claro, que dá cerca de 3,2:1 sobre o card, com variante escura própria; o card do celular perde um espaçamento dobrado.
  • O tooltip passa a dizer "quando o enriquecimento dos PRs mergeados falha" e cita as métricas de ciclo de vida do PR e de PRs abertos entre as que podem faltar ou sair distorcidas, espelhando o aviso do engine.
  • O rótulo do passo fetch passa a "leitura inteira" / "entire read": antes a frase dizia "A leitura de PRs desta execução falhou em: leitura de PRs" — achado numa verificação manual de ponta a ponta.
  • O motivo do cast nas linhas do resumo fica ao lado do próprio cast.
  • Um teste de renderização fixa o marcador, os passos visíveis e o texto para leitor de tela na comparação.

Plano de Teste

  • npx vitest run — inclusive o teste de renderização da comparação: passos visíveis nos dois layouts, uma única frase para leitor de tela por layout, passos fora da linha do nome no celular — rodado em 8e83ca4: 431 passed
  • npm run lint, npx tsc --noEmit, npm run test:coverage, npm run build — os passos do job platform do CI — rodado em 4911e6d: lint 0 erros, tsc ok, test:coverage 431 passed, build ok; depois da correção do rótulo, em 8e83ca4: vitest 431, tsc e lint de novo, e o CI verde
  • Manual: navegar a comparação só com teclado e num celular, e abrir a página de um repositório degradado; conferir os passos sem passar o mouse — verificado de ponta a ponta em 4911e6d, com o rótulo corrigido conferido depois em 8e83ca4: plataforma rodando sobre as migrações reais e um PostgREST, com payloads do engine em sete cenários de falha, no Playwright em desktop, celular (390 px), só teclado, leitor de tela, tema escuro, pt-BR, en-US e es-ES; os passos ficam visíveis sem mouse, o leitor de tela ouve uma frase por linha e o rótulo corrigido de fetch ("leitura inteira") foi conferido no navegador

A verificação roda fora da máquina de quem construiu: o job platform do CI (RFC 0029, PM-4).

Impacto e Risco

  • Áreas afetadas: comparação, badge da página do repositório e strings de tradução.
  • Compatibilidade: sem o campo no payload, nada aparece, como antes.
  • Performance: nenhuma mudança.
  • Segurança: nenhuma superfície nova; os passos continuam passando pela lista de valores permitidos.
  • Acessibilidade: é o objetivo deste PR — informação sem depender de cor nem de title, contraste de pelo menos 3:1 e uma única leitura por layout no leitor de tela.
  • Custo AWS: N/A.

Tamanho (RFC 0028 §2.4): 247 linhas, faixa 51–250.

Plano de Rollback

git revert do merge. Volta o comportamento do #292; nada a migrar.

Referências

Autoria Assistida

  • Agente: Claude Code — Claude Opus 5.5 nos commits, na orquestração e nas revisões finais; Claude Sonnet 5.5 numa das re-revisões
  • Escopo da assistência: achados da revisão final e implementação guiada por testes
  • Revisão humana: pendente — o autor revisa antes do merge

🤖 Generated with Claude Code

cpenaforte-clickbus and others added 8 commits October 7, 2026 21:00
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 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reason for the `as unknown as` cast in getOrgReposSummary sat two
lines above the query, away from the cast it explains. The query
result is now bound first and the cast returned on its own line, with
the reason right above it. No behavior change.

Refs #236

Assisted-by: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Renders the compare view with one degraded and one clean repo and
checks what the last fixes changed: the mobile card shows the failed
steps as text after an sr-only prefix, the full sentence stays
screen-reader text only in the table, the card marker has no margin,
and the dot is amber-600 with amber-500 only on dark. All four fail
against the previous marker.

Refs #236

Assisted-by: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A failed open list, or a failed enrichment or reviews pass for open
PRs, leaves open-PR fields out of the run, and the engine's report
caveat now says so. The tooltip on the PR-data badge and marker listed
only flow, review and in-PR metrics; it now names open-PR metrics too,
in both locales.

Refs #236

Assisted-by: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A failed merged list omits the PR lifecycle fields (counts, time to
merge, cycle time), and a partial read skews them. The engine's report
caveat now says so; the PR-data tooltip mirrors it in both locales.

Refs #236

Assisted-by: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The repo-page badge now has the failed steps as visible text beside
it, yet kept a title with the same steps in a sentence. Screen readers
may read a title as a description, so the steps could be announced
twice. The title goes; the visible text carries the steps.

Refs #236

Assisted-by: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The desktop compare table kept the failed PR-read steps in a hover
title and screen-reader text only, so sighted keyboard users could not
see them, and on the mobile card the steps sat inline with the
truncating repo name, where a long list squeezed it.

Both layouts now put the amber dot and the localized steps on a line
of their own under the repo name. The dot and the steps are
aria-hidden, carrying the full sentence as their hover title, and
screen readers read that sentence once as sr-only text, in both
layouts alike (the card's short sr-only prefix gives way to it).

Refs #236

Assisted-by: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cpenaforte-clickbus cpenaforte-clickbus added type: tech-debt Código sub-ótimo conhecido, workaround, ou cleanup pendente ai-assisted PR gerado total ou parcialmente com auxílio de agente de IA (RFC 0028 §2.2.7) labels Oct 8, 2026
@vercel

vercel Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
clickbus-iris Ready Ready Preview Oct 8, 2026 1:09pm UTC

Request Review

The label for the `fetch` step read "PR read" / "leitura de PRs", so the
step sentence said "This run's PR read failed at: PR read." It now says
"entire read" / "leitura inteira". Found in a manual end-to-end check.

Refs #236

Assisted-by: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@cpenaforte-clickbus
cpenaforte-clickbus merged commit 4628df7 into fix/pr-data-incomplete-polish Oct 8, 2026
4 checks passed
@cpenaforte-clickbus
cpenaforte-clickbus deleted the fix/pr-data-incomplete-a11y branch October 8, 2026 14:37

This branch was successfully deployed

1 active deployment
Preview — 8e83ca45 Deployed Oct 8, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-assisted PR gerado total ou parcialmente com auxílio de agente de IA (RFC 0028 §2.2.7) type: tech-debt Código sub-ótimo conhecido, workaround, ou cleanup pendente

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant