Repository navigation
fix(milestones): keep the milestone notice up while keyboard focus is on it - #33365
Conversation
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks. This is a small, scoped fix that holds the notice while it has keyboard focus, using the same focus check as [DESIGN-REVIEWED] b1fe3f7 Description read[DESCRIPTION-READ] ec96ebeb0e7189de023ff971bd95322920906a51f7243ce3a58382faaa1841b6 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. This is a fix for issue #33359, and two new tests fail on base. Both items are what removes the defect. What this change shipsInventory (2 items) — 2 justifiedIntent: let a keyboard user who tabs to the milestone notice read it before it disappears. FIX.
[FIRST-PRINCIPLES-REVIEWED] b1fe3f7 Description read[DESCRIPTION-READ] fdf3c14409aaf80699a13a98c820249a46d8db7c9ca1942d0be6da76953ead9c That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing to check. The diff adds no control and changes no pixels. The only change is that the existing notice stays up while it has keyboard focus, and a screenshot cannot show that. [UX-REVIEWED] b1fe3f7 Description read[DESCRIPTION-READ] 37ca618ed5686f906f77c9b97892e8d5f111a4d3df1932f4bbb5c8fb9882dd36 That sha256 names everything this verdict read: the PR description, plus the 3 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
568b83c to
b1fe3f7
Compare
|
Rebased onto main (no code change). Backend Tests (Windows) (6) failed on test_the_lazy_imports_stay_inside_the_functions_that_need_them (140 vs 139), which also failed on a clean main and is fixed by #33377. This PR touches no Python. |
buluoray
left a comment
There was a problem hiding this comment.
The milestone tooltip now stays open while it has keyboard focus. Small and tested.
Problem / Motivation
Goal: A keyboard user who tabs to the milestone notice can read it before it goes away.
website/src/components/milestones/MilestoneNoticeToast.tsxpaused its auto-hide timer while the pointer was over the notice, but not while keyboard focus was on it. The notice vanished on the timer under a focused user, and focus dropped to the page. The file-menu toast it copies (FileMenuResultToast.tsx) already holds while focus is inside it.Why it matters
A keyboard or screen reader user who reaches the notice loses it, and their place on the page, before they can open it.
Not a goal
What changed (motivation → approach → change)
The notice now holds while the pointer is over it OR focus is inside it, with the same focus and blur checks as the file-menu toast. A click clears both holds. When the card leaves the page while held (a temporary or incognito chat turns milestones off), it gets no blur, so the hold is dropped then; otherwise the notice would come back on return and never time out.
Backwards compatibility
Compatible: pointer users see the same behavior; only keyboard focus now also pauses the timer.
Tests
website/src/components/milestones/milestones.test.tsxadds two cases:Proof: not provable -- frontend test (prove.py runs Python only)
Manual verification
N/A — unit coverage sufficient: the change is when an existing notice hides, checked in the rendered component.
Screenshots / video
Why no screenshot: the notice looks the same; only how long it stays up while focused changes.
Related Issues
Fixes #33359
Sibling sweep
Swept: git grep -n "BANNER_AUTO_HIDE_MS" website/src
Sibling:
website/src/components/notifications/FileMenuResultToast.tsx-- not affected -- already holds on focusSibling:
website/src/components/notifications/NotificationBanner.tsx-- not affected -- already holds on focus and re-readsdocument.activeElementPattern harvest
Not generalizable: only two toasts use this timer, and both are now covered.
Checklist