Skip to content

fix(web): add accessible legend to dashboard trends - #1819

Open
misaelalves99 wants to merge 1 commit into
DouglasNeuroInformatics:mainfrom
misaelalves99:fix/1782-dashboard-trend-legend
Open

misaelalves99 wants to merge 1 commit into
DouglasNeuroInformatics:mainfrom
misaelalves99:fix/1782-dashboard-trend-legend

Conversation

@misaelalves99

Copy link
Copy Markdown

Fixes #1782.

Summary

The dashboard's Records & Sessions Trend chart previously relied on color and hover tooltips to identify its two data series.

This change:

  • Adds a visible Recharts legend identifying Records and Sessions without requiring hover.
  • Localizes series names in English, Spanish, and French.
  • Differentiates Records and Sessions through solid and dashed line styles.
  • Adds unit and Playwright regression tests for the legend.

Validation

  • Targeted unit tests: 34/34 passed.
  • Dashboard Playwright suite: 12/12 passed in Chromium.
  • Global unit tests: 4,348 passed, with four expected failures.
  • Instrumented coverage: 100% statements, branches, functions, and lines.
  • Read-only lint-equivalent validation: 27/27 tasks passed. The literal root pnpm lint command was not run because it can invoke code-modifying generators or fixers.

Known E2E environment limitation

The isolated full Playwright run finished with 278 passed and 1 failed.

The sole failure was in testing/src/specs/record-file-deletion.spec.ts, which expected HTTP 201 when creating a FILE instrument record but received HTTP 503.

The isolated environment had STORAGE_ENABLED=false. Existing InstrumentRecordsService.create() logic explicitly rejects FILE records when storage is disabled.

This test is outside the files changed by this PR. The failure is documented as an environment/configuration limitation, and the complete E2E suite is not claimed to be passing.

A separate cross-browser smoke run produced 41/42 passes due to a Chromium subject-detail interaction timeout. A targeted Chromium rerun subsequently passed 7/7. The intermittent cause was not established.

Scope

Only three files are modified:

  • apps/web/src/routes/_app/dashboard.tsx
  • apps/web/src/routes/_app/__tests__/dashboard.test.tsx
  • testing/src/specs/dashboard.spec.ts

No new dependencies or unrelated source changes.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dashboard Records & Sessions chart has no legend, so its two series can only be told apart by colour

1 participant