Rosterhistory: fast heatmap tooltips (#137) + unit-visibility empty states (#136)#138
Merged
Conversation
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>
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.
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
titleattributes carry an unconfigurable ~1s browser hover delay. Replaced with the shadcn Tooltip primitive (newclient/components/ui/tooltip.jsx, new dep@radix-ui/react-tooltip@^1.2.8) atdelayDuration={100}, one sharedTooltipProviderfor all ~365 heatmap cells. Tooltip copy unchanged; keyboard focus now also reveals it;aria-labelpreserves the accessible name.#136 — Explain why a unit isn't visible (
d84504d)UnitFilterBarderives 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:
UnitFilterBaron error states so failed fetches don't show a false "no recorded changes" messagepreUnitFilteredEventssplit +unitFilterIsCause, withtotalVisible === 0folded into the flag)Verification
npm run format:check— passclient npx next build— compiles clean,/rosterhistoryprerenders; only pre-existing baseline export failures on/adr+/rosterstatistics(env-var fetches, identical on main)lint_format.yml)🤖 Generated with Claude Code