Skip to content

Rosterhistory: fast heatmap tooltips (#137) + unit-visibility empty states (#136)#138

Merged
SyniRon merged 4 commits into
mainfrom
feat/rosterhistory-triage-wave
Jun 5, 2026
Merged

Rosterhistory: fast heatmap tooltips (#137) + unit-visibility empty states (#136)#138
SyniRon merged 4 commits into
mainfrom
feat/rosterhistory-triage-wave

Conversation

@SyniRon

@SyniRon SyniRon commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator

Closes #136
Closes #137

What

Two triaged rosterhistory issues implemented via supervised agent swarm, plus two review passes.

#137 — Heatmap tooltips slow to appear (a04af5e)

Native title attributes carry an unconfigurable ~1s browser hover delay. Replaced with the shadcn Tooltip primitive (new client/components/ui/tooltip.jsx, new dep @radix-ui/react-tooltip@^1.2.8) at delayDuration={100}, one shared TooltipProvider for all ~365 heatmap cells. Tooltip copy unchanged; keyboard focus now also reveals it; aria-label preserves the accessible name.

#136 — Explain why a unit isn't visible (d84504d)

UnitFilterBar derives chips only from events in view, so units without recorded changes vanished silently and were read as a bug. Now: helper text states the rule, and an active unit filter matching zero events renders the existing dashed-border empty-state pattern naming the unit, with a "Clear unit filter" button. Consistent across Today and History tabs.

Review fixes (173690b, 2e12b31)

Two multi-agent review passes (code-reviewer + comment-analyzer) over the diff:

  • Gate UnitFilterBar on error states so failed fetches don't show a false "no recorded changes" message
  • Only blame the unit filter when it's genuinely the cause (preUnitFilteredEvents split + unitFilterIsCause, with totalVisible === 0 folded into the flag)
  • Restore heatmap cell accessible names lost in the tooltip migration
  • Copy unification, dead-guard removal, invariant comments naming the suppression contract

Verification

  • Root npm run format:check — pass
  • client npx next build — compiles clean, /rosterhistory prerenders; only pre-existing baseline export failures on /adr + /rosterstatistics (env-var fetches, identical on main)
  • Repo has no test runner; CI gate is prettier (lint_format.yml)

🤖 Generated with Claude Code

SyniRon and others added 4 commits June 5, 2026 18:49
Native title attributes have an unconfigurable ~1s browser hover delay,
making heatmap tooltips feel sluggish. Add the shadcn Tooltip primitive
(@radix-ui/react-tooltip) to components/ui and use it for heatmap cells
with a 100ms delayDuration. One shared TooltipProvider wraps all cells.
Tooltip text is unchanged, and keyboard focus now also reveals it.

Fixes #137

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The unit filter bar derives chips only from events in the current view,
so units without recorded changes never appear and an active filter
matching nothing made the bar (and content) vanish silently — read as
a bug by users.

- Add muted helper text to the filter bar stating only units with
  recorded changes are listed
- When an active unit filter matches zero events, render the existing
  dashed-border empty-state pattern naming the filtered unit, with a
  "Clear unit filter" button
- Suppress the generic "no changes" / "all event types filtered out"
  messages when the unit-filter empty state already explains the gap
- Hide the bar while data loads to avoid flashing the empty state
- Applied identically in Today and History views

Closes #136

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ontext)

Important fixes:
- Gate UnitFilterBar on not-loading AND not-error in HistoryView and
  TodayView so a failed fetch no longer shows a false "No recorded
  changes for X" empty state above the error alert (restores
  pre-existing no-bar-on-error behavior).
- Only show the unit-blaming empty state when the unit filter is
  genuinely the cause: parents now compute preUnitFilteredEvents (all
  filters except the unit predicate) and pass preUnitFilteredCount to
  UnitFilterBar; when that list is also empty the bar renders nothing
  and the parent's accurate generic message (e.g. "All event types
  filtered out") shows instead. Parents suppress their generic empty
  messages via unitFilterIsCause rather than mere unit-filter presence.
- Restore accessible names on heatmap cell buttons lost in the Radix
  Tooltip migration by adding aria-label with the tooltip string.

Suggestions:
- Unify copy to "in the current view" in the new UnitFilterBar strings.
- Use identical wording for the units-listed rule in both UnitFilterBar
  locations.
- Reword the UnitFilterBar empty-state comment to describe observable
  state instead of overclaiming causality.
- Strengthen suppression-contract comments in HistoryView/TodayView to
  name the invariant (UnitFilterBar must receive the same
  typeFilteredEvents used for totalVisible) and reflect the new gating.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Second-pass review findings:
- Fold totalVisible === 0 into unitFilterIsCause so the flag matches its
  comment ("genuine cause of an empty view") instead of being true
  whenever a unit filter is active with surviving events
- Drop the now-dead !unitFilterIsCause guard on TodayView's
  "No changes recorded" empty state (vacuously true there)
- Name the groupAndSortEvents no-drop assumption in both
  suppression-contract comments
- Mention record-type filters in the preUnitFilteredEvents comment

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@SyniRon SyniRon merged commit 0d1606d into main Jun 5, 2026
1 check passed
@SyniRon SyniRon deleted the feat/rosterhistory-triage-wave branch June 5, 2026 23:34
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.

Heatmap tooltips are slow to appear on history page Make it clearer why a unit isn't visible on the roster history

1 participant