Skip to content

fix(milestones): keep the milestone notice up while keyboard focus is on it - #33365

Merged
RohanK6 merged 1 commit into
mainfrom
crew/conductor/milestone-notice-focus-hold
Nov 8, 2026
Merged

RohanK6 merged 1 commit into
mainfrom
crew/conductor/milestone-notice-focus-hold

Conversation

@RohanK6

@RohanK6 RohanK6 commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: A keyboard user who tabs to the milestone notice can read it before it goes away.

website/src/components/milestones/MilestoneNoticeToast.tsx paused 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

  • Changing the notice text, its timing, or what a click does.

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.tsx adds two cases:

  • focus on the notice keeps it up past the timer, and it hides on the timer once focus leaves (fails on main);
  • a focused notice hidden by a temporary chat still hides on the timer when the user comes back (fails without the hold reset).

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 focus
Sibling: website/src/components/notifications/NotificationBanner.tsx -- not affected -- already holds on focus and re-reads document.activeElement

Pattern harvest

Not generalizable: only two toasts use this timer, and both are now covered.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

@RohanK6
RohanK6 requested review from a team and KiroCrewCaptain as code owners November 8, 2026 19:30
@RohanK6
RohanK6 requested a review from tim-finnigan November 8, 2026 19:30
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 8, 2026
@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of b1fe3f73a1e598c7b86790a06495110f97465574 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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 FileMenuResultToast. The visual-evidence trigger does not apply because the patch renders nothing new.

[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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of b1fe3f73a1e598c7b86790a06495110f97465574 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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 ships

Inventory (2 items) — 2 justified

Intent: let a keyboard user who tabs to the milestone notice read it before it disappears. FIX.

  1. The milestone notice no longer times out while keyboard focus is inside it; it times out again once focus leaves — justified
  2. A focused notice hidden by a temporary or incognito chat times out normally when the user returns — justified

[FIRST-PRINCIPLES-REVIEWED] b1fe3f7

Description read

[DESCRIPTION-READ] fdf3c14409aaf80699a13a98c820249a46d8db7c9ca1942d0be6da76953ead9c

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

UX-level review of b1fe3f73a1e598c7b86790a06495110f97465574 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of b1fe3f73a1e598c7b86790a06495110f97465574 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] b1fe3f7

False positive or not applicable? A repository writer can comment:
/ai-review override gpt b1fe3f73a1e598c7b86790a06495110f97465574 false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed b1fe3f73a1e598c7b86790a06495110f97465574 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] b1fe3f7

Verdict parsed from the review's SHA-scoped output markers for commit b1fe3f73a1e598c7b86790a06495110f97465574.

False positive or not applicable? A repository writer can comment:
/ai-review override fable b1fe3f73a1e598c7b86790a06495110f97465574 false-positive: <reason, 20 to 500 characters>

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 8, 2026
@RohanK6
RohanK6 force-pushed the crew/conductor/milestone-notice-focus-hold branch from 568b83c to b1fe3f7 Compare November 8, 2026 21:10
@RohanK6

RohanK6 commented Nov 8, 2026

Copy link
Copy Markdown
Contributor Author

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.

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention labels Nov 8, 2026
@RohanK6
RohanK6 enabled auto-merge (squash) November 8, 2026 22:25

@buluoray buluoray left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The milestone tooltip now stays open while it has keyboard focus. Small and tested.

@RohanK6
RohanK6 merged commit 397187c into main Nov 8, 2026
100 of 114 checks passed
@RohanK6
RohanK6 deleted the crew/conductor/milestone-notice-focus-hold branch November 8, 2026 22:44
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 8, 2026
buluoray pushed a commit that referenced this pull request Nov 9, 2026
buluoray pushed a commit that referenced this pull request Nov 9, 2026
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.

Milestone notice hides on its timer while keyboard focus is on it

2 participants