Skip to content

fix(ops-mission-control): keep focus on Refresh and Poll now while they run - #32049

Merged
RohanK6 merged 1 commit into
mainfrom
crew/conductor/ops-refresh-focus
Nov 7, 2026
Merged

RohanK6 merged 1 commit into
mainfrom
crew/conductor/ops-refresh-focus

Conversation

@RohanK6

@RohanK6 RohanK6 commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Keyboard focus stays on Ops Mission Control's Refresh and Poll now buttons while their fetch runs.

In website/src/apps/ops-mission-control/HandoverPanel.tsx (Refresh) and website/src/apps/ops-mission-control/SignalsPanel.tsx (Poll now), the button sets the native disabled attribute while its query is fetching. A disabled button leaves the tab order, so a keyboard press drops focus to the page for the whole fetch, and it never comes back.

Why it matters

A keyboard or screen-reader user on call loses their place each time they refresh the handover digest or poll the signal sources.

Not a goal

What changed (motivation → approach → change)

Symptom: focus falls to the page on a keyboard refresh or poll. Cause: disabled={query.isFetching} takes the focused button out of the tab order. Change: the same inert-but-focusable shape as the Issue Radar refresh buttons (#31481, #31687): aria-disabled={isFetching || undefined}, aria-disabled: classes for the dimming, and if (!isFetching) at the start of each click handler so a press while busy still does nothing, as the native disabled did.

Backwards compatibility

Compatible: both buttons, their labels and the fetch they run are unchanged; a press while busy is still ignored, now by the click guard.

Removes nothing: no route, key or behaviour is taken away.

Tests

  • HandoverPanel.coverage.test.tsx: new case: focus stays on Refresh while the digest refetch is held, a second press sends no second request, and focus is still there after it settles.
  • OpsSignalsPanelCoverage.test.tsx: the same new case for Poll now, and the existing polling case now asserts aria-disabled instead of disabled.

All three fail on main (run in a separate worktree) and pass here. The tests hold a promise and settle it; no clock and no sleep.

Proof: not provable -- frontend test (prove.py runs Python only)

vitest run src/apps/ops-mission-control: 381 passed. tsc -p tsconfig.app.json and eslint: clean. Local GPT 5.6 Sol and Opus 5.5 reviews: no findings (Opus raised a test-order note in discovery; the new test now settles with the file's own digest() fixture).

Manual verification

N/A — unit coverage sufficient: the tests drive the mounted panels.

Screenshots / video

Why no screenshot: nothing on screen changes; only whether keyboard focus stays on the button.

Related Issues

Fixes #32026

Sibling sweep

Swept: git grep -nE "disabled={[^}]*(refreshing|isFetching)" -- website/src/apps (run on origin/main)
Sibling: website/src/apps/ops-mission-control/HandoverPanel.tsx -- changed here
Sibling: website/src/apps/ops-mission-control/SignalsPanel.tsx -- changed here
Sibling: website/src/apps/aws-control/AwsControlPage.tsx -- tracked in #32025
Sibling: website/src/apps/code-review-sage/components/DraftReviewActions.tsx -- tracked in #32025
Sibling: website/src/apps/mochi/src/renderer/SettingsPanel.tsx -- tracked in #32025
Sibling: website/src/apps/issue-radar/views/CiRunsView.tsx -- tracked in #31618

Pattern harvest

Rule candidate: none
Pattern: a busy button that sets native disabled on itself while focused.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • 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 7, 2026 03:29
@RohanK6
RohanK6 requested a review from tim-finnigan November 7, 2026 03:29
@RohanK6
RohanK6 enabled auto-merge (squash) November 7, 2026 03:29
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 7, 2026
@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 4e5cb44edf4406fbdb6bf332e555056fa19dd6da — 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. The fix removes the cause, which is native disabled taking a focused button out of the tab order, on both buttons in scope. The other apps with the same pattern are deferred to #32025 and #31618.

What this change ships

Inventory (3 items) — 3 justified

Intent: keep a keyboard or screen-reader user's place on Ops Mission Control's Refresh and Poll now buttons while they fetch. This is a FIX (#32026).

  1. Focus stays on Handover's Refresh button while the digest refetches. A second press is still ignored. — justified
  2. Focus stays on Signals' Poll now button while it polls. A second press is still ignored. — justified
  3. The busy buttons are still dimmed, now through aria-disabled: classes instead of the native disabled style. — justified

[FIRST-PRINCIPLES-REVIEWED] 4e5cb44

Description read

[DESCRIPTION-READ] 203b8e32185903ab5d942267ee1c5e749cc365353ffcb8ae8c1818ba3a347b5c

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 7, 2026

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

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

Design-Verdict: PASS

Nothing blocks. The fix copies the Issue Radar inert-but-focusable shape, the app is not in adoption-pins.json, and the busy dimming stays at opacity-30, so the screen looks the same.

Notes

[DESIGN-REVIEWED] 4e5cb44

Description read

[DESCRIPTION-READ] 37fbd0e4aaa311d009e07c57ed161e7779efd3305c2bec7342fda91c30ae8388

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 7, 2026

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

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

UX-Verdict: PASS

Nothing on screen changes: the busy Refresh and Poll now buttons keep the same 30% dimming and the same "Refreshing…" / "Polling…" labels. The only change is that keyboard focus stays on the button, and a screenshot cannot show that.

Notes

  • The busy buttons in HandoverPanel.tsx and SignalsPanel.tsx still respond to hover and press. While a fetch runs, the button darkens on hover and shrinks slightly when clicked (hover:bg-bg-hover, active:scale-[0.97] from Btn), so it looks clickable even though the click does nothing. Adding aria-disabled:hover:bg-transparent aria-disabled:hover:border-border aria-disabled:active:scale-100 would match how the native disabled state behaved.

[UX-REVIEWED] 4e5cb44

Description read

[DESCRIPTION-READ] f340e3de7c1cc07c9a0da15689a2b684ebbc848dab22c4a46f1b30f00f5e44fd

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 7, 2026

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

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

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 4e5cb44

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

@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

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

Review details

No findings.

[OPUS-REVIEWED] 4e5cb44

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

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

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 7, 2026

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Tier 1 auto-approve: fix (4 files). Criteria: no conflict, no requested changes, security path denylist clean, design-doc gate clean, security checklist all-NO, no reviewer-lane findings, readiness signal fresh for this head SHA, declared category matches the diff. Category: uses aria-disabled plus a click guard instead of disabled on Refresh and Poll now, so keyboard focus stays on the button while it runs, with tests.

@RohanK6
RohanK6 merged commit 3e4954a into main Nov 7, 2026
97 of 98 checks passed
@RohanK6
RohanK6 deleted the crew/conductor/ops-refresh-focus branch November 7, 2026 05:08
buluoray added a commit that referenced this pull request Nov 8, 2026
…ey run (#32049)

(cherry picked from commit 3e4954a)

Original author: Rohan Khanderia (#32049).
buluoray added a commit that referenced this pull request Nov 8, 2026
…ey run (#32049)

(cherry picked from commit 3e4954a)

Original author: Rohan Khanderia (#32049).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

readiness: passed Eligible automated validation passed for the current revision

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ops Mission Control: Refresh and Poll now drop keyboard focus while they run

2 participants