Skip to content

fix(platform): focus task dialogs when they open - #3562

Merged
yannickmonney merged 1 commit into
mainfrom
fix/task-dialog-keyboard-focus
Sep 28, 2026
Merged

yannickmonney merged 1 commit into
mainfrom
fix/task-dialog-keyboard-focus

Conversation

@yannickmonney

@yannickmonney yannickmonney commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Opening an existing task cancelled Radix autofocus without moving focus anywhere. The board card stayed focused behind the modal, so Tab could reach background controls. Explicitly focus the dialog container using the existing shared-dialog contract; Radix retains trapping and opener restoration, while creation still focuses the title.

Add real-Chromium coverage for desktop/mobile keyboard entry, both Tab directions, Escape restoration, loading-to-loaded and warm openings, deep links, pointer-opened list rows, and create-title autofocus. Correct the shared dialog tests to select the actual mobile breakpoint.

Validation:

  • Same browser regression on base source: 8 failures / 2 create-mode passes; fixed source: 10/10 pass.
  • ResponsiveDialog unit suite: 11/11 pass; task UI suite: 255/255 across 43 files.
  • Manual reference gate and React Doctor: pass. Full Opengrep exits 0 with 0 findings across 467 rules / 3,980 files. Coverage limits: 34 partially analyzed files (parse/internal engine errors), 1,991 excluded files, 17 files over 1 MB skipped, and 3 rule timeouts on services/platform/messages/en.yml. Focused changed-file scan passes.
  • Format, UI/platform typechecks and focused type-aware lint: pass.
  • Independent localhost keyboard acceptance: desktop board Enter → dialog, Tab → Title, Shift+Tab → Close, Escape → original card; mobile 390 px drawer focus, Tab and Escape also pass without horizontal overflow.
  • Full bun run check under pinned Bun 1.4.2 with TURBO_CONCURRENCY=1: 55/55 tasks pass (45 cached), unchanged source. The preceding concurrency-2 run was 54/55, with 9 timing-related UI failures in 6 files; a one-worker rerun of those files passed 167/167 before the full green rerun. No timeout changes.

Fixes #3557

@yannickmonney yannickmonney left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Reviewed 8d2e9d4a4397e657023462856655e4ab10e7231d and independently exercised the exact task-modal source in a separate localhost frontend (with #3559's list opener source).

Observed in the full local app: Board Enter focuses the dialog container, Tab reaches Title, Shift+Tab wraps to Close, and Escape restores the original card. List keyboard opening and restoration also work. At 390×844 the real mobile drawer gets initial focus, Tab reaches Title, Escape restores the task title, and there is no document horizontal overflow. The copied task-modal source checksum matches this PR head. No production testing.

The source change is confined to the existing dialog focus contract; create mode keeps its autofocus. The regression suite covers loading, warm/deep-linked dialogs and the actual mobile breakpoint rather than the previous ineffective media-query mock. No remaining defect found in this focused review.

Full-gate acceptance is still pending the pinned Bun 1.4.2 rerun/CI. The two initially failing runtime files now pass with that runtime; this comment does not convert the interrupted full check into a green check. No merge performed.

@yannickmonney
yannickmonney merged commit 407f0cf into main Sep 28, 2026
50 checks passed
@yannickmonney
yannickmonney deleted the fix/task-dialog-keyboard-focus branch September 28, 2026 06:46
yannickmonney added a commit that referenced this pull request Sep 28, 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.

Bug: task dialog leaves keyboard focus on the background board

1 participant