Skip to content

fix(web): keep session date filter directly accessible - #1367

Merged
tiann merged 2 commits into
tiann:mainfrom
techotaku39:fix/web-compact-date-filter
Aug 5, 2026
Merged

fix(web): keep session date filter directly accessible#1367
tiann merged 2 commits into
tiann:mainfrom
techotaku39:fix/web-compact-date-filter

Conversation

@techotaku39

@techotaku39 techotaku39 commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • keep the session date filter visible beside the compact search action
  • reuse the existing date picker in compact and expanded search modes
  • preserve active-range indicators and return focus to the appropriate control
  • add regression coverage for filtering by date without expanding text search

Problem

The date filter works independently of a text query, but it was only reachable after expanding search. This made an independent filter look like part of text search and added an unnecessary interaction before filtering sessions by date.

Following the review feedback on #1309, this PR extracts only the date-filter accessibility fix. It does not add toolbar customization, action ordering or visibility settings, Refresh, a Codex import shortcut, or a persistent-search layout preference.

Testing

  • bun typecheck
  • cd web && bun run test -- src/components/SessionList.directory-action.test.tsx src/components/SessionList.machine-filter.test.tsx (30 tests)
  • bun run test:web
  • git diff --check origin/main...HEAD
  • manually verified on the port 3016 test deployment

AI usage

AI-assisted with OpenAI Codex.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Findings

  • [Minor] Announce the active range in the persistent filter's accessible name - once a range is selected, the dot and title expose it visually, but the explicit aria-label remains only "Filter sessions by last activity". Because aria-label overrides title for the accessible name, screen-reader users cannot tell that filtering is active or which dates are applied. Evidence: web/src/components/SessionList.tsx:696.
    Suggested fix:
    aria-label={hasDateRange
        ? `${t('sessions.timeFilter.label')}: ${props.customStart} - ${props.customEnd}`
        : t('sessions.timeFilter.label')}

Summary
Review mode: initial

One minor accessibility issue found in the newly persistent date-filter affordance. The required test check is currently failing during typecheck at unchanged web/src/router.tsx:773; that line is present in the PR base and is not attributed to this diff.

Testing
Not run (automation). The required check stopped before tests because of the unrelated base type error above. Add an accessible-name assertion for the collapsed filter after selecting a range.

HAPI Bot

Comment thread web/src/components/SessionList.tsx Outdated
hasDateRange ? 'text-[var(--app-link)]' : 'text-[var(--app-hint)]'
)}
title={hasDateRange ? `${props.customStart} – ${props.customEnd}` : t('sessions.timeFilter.label')}
aria-label={t('sessions.timeFilter.label')}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[MINOR] Announce the active range to assistive technology

When a range is active, this explicit aria-label still resolves to only "Filter sessions by last activity". It overrides the date-bearing title, while the active dot has no accessible text, so the newly persistent control does not tell screen-reader users that a filter is active or which dates are applied.

Suggested fix:

aria-label={hasDateRange
    ? `${t('sessions.timeFilter.label')}: ${props.customStart} - ${props.customEnd}`
    : t('sessions.timeFilter.label')}

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Findings

  • No findings.

Summary
Review mode: follow-up after new commits

No issues found in the latest full diff. The prior accessible-name finding is addressed at web/src/components/SessionList.tsx:696 and covered at web/src/components/SessionList.directory-action.test.tsx:211. Residual risk is limited to browser-level layout and focus behavior not independently exercised in this review.

Testing
Not run (automation). The current CI check stops during typecheck at unchanged base code web/src/router.tsx:773, so the test suite did not start.

HAPI Bot

@techotaku39
techotaku39 force-pushed the fix/web-compact-date-filter branch from d46a439 to 060c560 Compare August 5, 2026 05:22

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Findings

  • No findings.

Summary
Review mode: follow-up after new commits

No issues found in the latest full diff. The collapsed date-filter trigger, picker reuse, focus restoration, and active-range accessible name are covered by the updated tests. Residual risk is limited to browser-level responsive positioning and focus behavior not exercised by the repository tests.

Testing
GitHub test check passed. Local focused tests not run because bun is unavailable in this runner.

HAPI Bot

@tiann
tiann merged commit 3eff0ec into tiann:main Aug 5, 2026
2 checks passed
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.

2 participants