Repository navigation
fix(sidebar): keep the notification repair state from blocking the session row - #171
Luke-Norland wants to merge 1 commit into
Conversation
…ssion row A watched session whose browser has no push subscription shows the repair state: "Repair notifications when the assistant has a reply ready on this device". The bell rendered that sentence as visible row text (max-w-48, about 192px, wrapping to five lines) inside a shrink-0 wrapper in the row's actions slot. It squeezed the row's open button to about 12px, covered the session name so clicks landed on the text, and pushed the repair (wrench) button past the sidebar's edge, where it was clipped. The session could not be opened from the sidebar. The status span is now always sr-only. It is still announced and still the buttons' aria-describedby. In the repair state the row shows only the bell and the wrench at the bell's existing size; the wrench already carries the repair sentence as its title and aria-label and still runs repairDevice. Environmental reasons that used to show visible text (permission denied, insecure context, iOS install, unsupported) become part of the bell's tooltip. External and live rows share the component. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe session completion bell now keeps status text out of the visible row while preserving screen-reader announcements. Its tooltip includes environmental status text when action is required and device repair is not required. Tests cover these behaviors and repair-required status. ChangesSession completion status
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to Status guidance remains available through screen-reader announcements and applicable tooltips. No supported issue blocks merging. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Some tools did not complete. Review the errors below. 🔧 ESLint
src/components/sidebar/view/subcomponents/SessionCompletionBell.test.tsxOops! Something went wrong! :( ESLint: 9.39.5 Error: Error while loading rule 'tailwindcss/no-contradicting-classname': Could not find tailwindcss src/components/sidebar/view/subcomponents/SessionCompletionBell.tsxESLint skipped: the matched ESLint configuration already failed (plugin-compatibility). Comment |
Bug
When a session's completion notifications are turned on but the current browser has no push subscription (for example, the bell was turned on from another device), the bell enters the repair state and shows "Repair notifications when the assistant has a reply ready on this device".
SessionCompletionBellrendered that sentence as visible text (max-w-48 text-xs text-destructive, about 192px, wrapping to five lines) inside aflex shrink-0wrapper in the row's actions slot. On the desktop sidebar this:flex min-w-0 flex-1) to about 12px;overflowclipped it.The environmental reasons (permission denied or not granted, secure context required, iOS install required, unsupported) also showed visible text, so they had the same effect.
How to reproduce
PUT /api/settings/completion-notificationswithwatched: true).Fix
sr-only. It is still announced (role="status",aria-live="polite") and still the buttons'aria-describedby.titleandaria-label, and still callsrepairDevice.No notification logic, watch semantics or layout tokens change.
Tests
SessionCompletionBell.test.tsx:titleandaria-labelare the repair sentence, with no visible status text.Both tests fail on
main(7 pass, 2 fail) and pass with the fix (9/9). Restoring the visible status class turns the same two tests red. The sidebar placement, external-row and live-row tests still pass.npm run typecheckandeslinton the touched files are clean.Browser check
A dev server with one session in the repair state and one normal session, in Chromium at 1400×900 and at 390×844 (sidebar opened from the menu), light and dark:
mainelementFromPointat the session name's centre is inside the open buttonIn the repair state the open button is about half the row, so a long session name truncates until the device is repaired. A normal row is unchanged.
Summary by CodeRabbit