feat(dashboard): paginate /api/v1/overview and pass an accessibility review (issue #76) - #88
Merged
Conversation
…review (issue #76) Two of #76's smaller, well-bounded items, tackled together since both touch the same overview panel and templates. Pagination: - GET /api/v1/overview accepts providers_limit/providers_offset and workloads_limit/workloads_offset query params (bounded: providers capped at 500, workloads at 200; both default to the exact prior hardcoded LIMIT/offset-0 behavior, so an existing caller that never sends these params sees no change). - ProvidersTotal/WorkloadsTotal are now true COUNT(*) values, not len(page) -- previously a client had no way to tell "500 providers, that's everyone" from "500 providers, an unknown-size page of more". - Dashboard UI gained prev/next controls for the providers table, showing "X–Y sur Z". Accessibility pass (WCAG-informed, not a full audit): - Skip-to-content link, landmark id on <main>. - Every warning/status region now carries role="alert"/role="status" with aria-live so a screen reader announces degraded-data states (the "partial", "unavailable" language ADR-011 already requires visually) without the user having to find it. - <caption class="sr-only"> on every data table, <th scope="col"> throughout (previously bare <th>). - <label> for the validator-score provider_id input (previously an unlabeled placeholder-only input). - Visible :focus-visible outlines and a :disabled state for buttons (previously only styled by browser default, or not at all for the new pagination buttons). Not a full accessibility audit -- no automated tooling (axe, Lighthouse) run in this sandbox; this is a manual pass against common WCAG failures visible in the existing markup, not a certified conformance pass. Still leaves #76's E2E test suite and formal accessibility tooling as open items. Tested: new unit tests for boundedQueryInt/parseOverviewPagination (defaults, clamping, honoring explicit values); a live-Postgres integration test proving loadOverview's LIMIT/OFFSET + COUNT(*) pairing actually pages non-overlapping rows in the right order against a real database. gofmt, go vet, go build, and the full control-plane test suite (including every OPENINFRA_TEST_*-gated live-chain/ Postgres/Redis test) ran clean. Leaves #76 open: user/operator views, RBAC, secret-redaction audit, E2E tests, and the decentralized-hosting migration doc are still outstanding -- RBAC and the full view model need a design pass before implementation given their size, per the issue's own note. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Two of #76's smaller, well-bounded items, tackled together since both touch the same overview panel and templates.
Pagination
GET /api/v1/overviewacceptsproviders_limit/providers_offsetandworkloads_limit/workloads_offsetquery params (bounded: providers capped at 500, workloads at 200; both default to the exact prior hardcodedLIMIT/offset-0 behavior, so an existing caller that never sends these params sees no change).ProvidersTotal/WorkloadsTotalare now trueCOUNT(*)values, notlen(page)— previously a client had no way to tell "500 providers, that's everyone" from "500 providers, an unknown-size page of more".Accessibility pass (WCAG-informed, not a full audit)
<main>.role="alert"/role="status"witharia-liveso a screen reader announces degraded-data states (the "partial", "unavailable" language ADR-011 already requires visually) without the user having to find it.<caption class="sr-only">on every data table,<th scope="col">throughout (previously bare<th>).<label>for the validator-scoreprovider_idinput (previously an unlabeled placeholder-only input).:focus-visibleoutlines and a:disabledstate for buttons (previously only styled by browser default, or not at all for the new pagination buttons).Not a full accessibility audit — no automated tooling (axe, Lighthouse) run in this sandbox; this is a manual pass against common WCAG failures visible in the existing markup, not a certified conformance pass.
Testing
boundedQueryInt/parseOverviewPagination(defaults, clamping, honoring explicit values).loadOverview'sLIMIT/OFFSET+COUNT(*)pairing actually pages non-overlapping rows in the right order against a real database.gofmt,go vet,go build, and the full control-plane test suite (including everyOPENINFRA_TEST_*-gated live-chain/Postgres/Redis test) ran clean.This leaves #76 open: user/operator views, RBAC, secret-redaction audit, E2E tests, and the decentralized-hosting migration doc are still outstanding — RBAC and the full view model need a design pass before implementation given their size, per the issue's own note.
🤖 Generated with Claude Code