fix(web): stop the status label stacking on the row's settle actions - #4826
fix(web): stop the status label stacking on the row's settle actions#4826Sy-D wants to merge 1 commit into
Conversation
The status label and the hover actions share one slot and must never both be visible. The hover branch was symmetric — label fades out, actions fade in — but the focus branch was not: focus-within pulled the label out of flow at right-0 without fading it, so it stayed fully opaque on top of the actions. Focus is sticky, which is why this looked intermittent and pointer-driven. Pair both class strings in one helper so the invariant cannot drift again, and cover it with tests that assert the pairing rather than the literal strings. Also align the label to the row: an inline-flex takes its baseline from its first item, and the leading icon has none, so it was setting the baseline and lifting "Working" 2px above the project title and the duration. The text run aligns on the baseline and the icon opts out with self-center. Closes pingdotgg#4817. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ApprovabilityVerdict: Approved 4cd31b7 This is a straightforward CSS fix for a visual stacking issue where the status label was appearing on top of settle actions. The changes extract class logic into a testable helper, add the missing opacity transitions, and include comprehensive tests to maintain the invariant. You can customize Macroscope's approvability policy. Learn more. |
ca8dcb3 to
d9c2058
Compare
What Changed
Two things in the v2 sidebar row's status slot:
Why
The overlap (#4817)
The label and the hover actions share one slot and are meant to be mutually exclusive. The hover branch was symmetric — the label gets
opacity-0, the actions getopacity-100. The focus branch was not:group-focus-withinpulled the label out of flow withabsolute right-0but never faded it, so the actions came up to full opacity underneath a label that was still fully opaque and pinned right.That explains why the report reads as intermittent and hover-driven when it is neither. Focus is sticky: clicking Settle or Snooze leaves focus on the button, and dismissing the snooze popover returns focus to its trigger, at which point
snoozeMenuOpenstops forcing the label transparent while focus keeps the actions promoted. The overlap then outlives the pointer. Keyboard tabbing reaches it too. In the reporter's screenshot the affected row is the active row, not a hovered one — which is what pointed at focus rather than hover.Because the correctness property is a pairing — every variant that promotes the actions must fade the label — both class strings now live in one helper, and the tests assert that pairing generically instead of matching literal strings. Removing the new
opacity-0fails them.The alignment
An
inline-flexderives its baseline from its first flex item, and an SVG has none, so the leading 16px icon was setting the label's baseline and lifting "Working" above the project title. The text run now aligns on the baseline and the icon opts out withself-center, so it rides the centre of the text's line box. No pixel nudges.Validation
Measured in a running client on a seeded working row, toggling the classes live to get a real before/after:
Alignment — baselines in page coordinates:
Off by 2px before, exactly aligned after; the icon stays centred on the text in both.
The overlap — computed styles with focus inside the slot:
Idle is unchanged: label 1, actions 0.
vp run --filter @t3tools/web test— 1644 passedvp run --filter @t3tools/web typecheck— no errorsvp lint/vp fmt --checkon the changed files — cleanNotes For Review
The actions'
focus-within:is restated asgroup-focus-within/v2-status-slot:so both halves key off the identical condition. Behaviourally equivalent here — the action buttons are the only focusable elements in the slot — but it makes the pairing checkable.The slim settled/snoozed row has a similar
inline-flex items-centerbadge. It never renders the working state, so it is untouched.Closes #4817.
Checklist
Before

After with alignment fix
Bildschirmaufnahme.2026-07-29.um.11.30.14.mov
Note
Fix status label overlapping settle actions in sidebar rows
resolveSidebarV2StatusSlotClassNamesin Sidebar.logic.ts to compute paired Tailwind class names for the status label and action buttons in a shared slot.items-baselinewithself-centeron leading icons.Macroscope summarized d9c2058.
Note
Low Risk
Scoped UI/CSS in sidebar v2 rows with regression tests on the class pairing; no auth, data, or API changes.
Overview
Fixes v2 sidebar card rows where the status text (e.g. "Working") could sit on top of Settle/Snooze after focus stayed on those controls—the focus path promoted actions but did not fade the label, unlike hover.
resolveSidebarV2StatusSlotClassNamesinSidebar.logic.tsnow returns paired Tailwind classes for the label and action halves of the shared status slot (hover,group-focus-within/v2-status-slot, and open snooze popover).SidebarV2.tsxuses that helper instead of inlinecn(...)on each span. Action visibility keys off the samegroup-focus-within/v2-status-slotcondition as the label hide.Also adjusts status vertical alignment:
items-baselineon the label row andself-centeron leading icons so the working icon no longer pulls the text ~2px above the project title.Unit tests assert the pairing invariant (every action-reveal variant must apply matching
opacity-0on the label).Reviewed by Cursor Bugbot for commit d9c2058. Bugbot is set up for automated code reviews on this repo. Configure here.