Skip to content

fix(platform): preserve actor preview keyboard focus - #4457

Merged
yannickmonney merged 6 commits into
mainfrom
fix/actor-preview-focus
Oct 7, 2026
Merged

yannickmonney merged 6 commits into
mainfrom
fix/actor-preview-focus

Conversation

@yannickmonney

Copy link
Copy Markdown
Contributor

Fixes #4438

Addresses C6 comment 6019701521 and review 7d839a74: keyboard focus can move from the actor trigger into the agent-details preview without the delayed close firing. Escape restores focus to the trigger, and View more remains activatable after keyboard focus enters the preview.

Validation: git diff --check; targeted OLD/NEW logs attached (collection blocked by missing @tanstack/react-virtual); commit hooks passed.

@yannickmonney

Copy link
Copy Markdown
Contributor Author

Evidence round update:

  • Update-branch was called once with expected head eecbb1d3abe6dd4cea1bc5b5ef2815bc88fb6b96; GitHub updated the branch to 717cb6f29dda51cad7ac5b3fa837fd896421e2cf (merge of current main).
  • Old-fails temporary commit: dac175f842c4a9d8a6b971efc2e8fc02b3c55c7a. CI run 37562715059 (E2E), head matched exactly, was cancelled when the required revert push superseded it. Its UI jobs never reached the test, so there are no executed failing assertion lines; Playwright shard jobs were cancelled (112603627062, 112603627210).
  • Final reverted head: e1737d190d7ea06e292d67595ff7059aa0521480; git diff origin/main --stat is the expected two files (+82/-1). Final E2E run 37562784687 matches this head and is still in progress. Browser jobs currently running: Playwright platform shards 1/4 112604035755, 2/4 112604035761, 3/4 112604035924, 4/4 112604035828.
  • Keyboard evidence in task-actor-preview-popover.test.tsx: user.keyboard('{Escape}') at lines 152-154 and user.keyboard('{Enter}') at line 169, with toHaveFocus() assertions at lines 141, 147, 150, and 154. The final-head CI browser job is the Playwright platform shard that executes this spec; results are pending above. Manual assistive-technology evidence remains BLOCKED (no browser stack).

@yannickmonney

Copy link
Copy Markdown
Contributor Author

Evidence round 2:

  • Temporary old-fails commit: eb26c254eed10417dd01e1ee3f1387aa2ad1e6ba.

  • Checks run: 37564982448; the relevant shard was UI (platform 2/4), job 112610522470 (aggregate UI job 112611385987). The test failed as expected without the fix:

    • app/features/tasks/components/task-actor-preview-popover.test.tsx (7 tests | 1 failed)
    • keeps keyboard focus on View more and restores the trigger on Escape
    • Error: expect(element).toBeInTheDocument()
    • task-actor-preview-popover.test.tsx:149:22 (expect(viewMore).toBeInTheDocument())
    • task-actor-preview-popover.test.tsx:147:22 and :150:22 show the toHaveFocus() assertions.
  • Reverted temporary commit. Final head: 7d6aac2943f262797b6c27717511c7378c107d55.

  • Final-head CI (all exact-head run IDs): Checks 37565350039 (queued at comment time), Build 37565349984 (queued), E2E 37565349976 (in progress), SAST 37565350004 (in progress), Commitlint 37565350032 (success), CLI 37565349985 (success), Security 37565349979 (success).

Keyboard evidence is covered by the user.keyboard steps and toHaveFocus assertions in task-actor-preview-popover.test.tsx. Assistive-technology evidence: BLOCKED.

@yannickmonney

Copy link
Copy Markdown
Contributor Author

ACCEPT: independent exact-head review of 7d6aac2943f262797b6c27717511c7378c107d55 by agent #2 (TALE-359 run 557c5b0f).

  • Base: main a89498df49b8 (0 behind).
  • Implementer: C11 7a7d20b9. I authored no commit on this PR.
  • Identity: the net diff against main is the change I reviewed natively at round 1 (TALE-1006, approval 03e93de5). Its patch-id ea04f49a6e35cc34 is identical. The branch's other commits are the update-branch merge and two temporary old-fails commits with their reverts, which net to zero.
Topic Disposition Evidence
REL-MANUAL PASS, old-fails and new-passes both executed in CI OLD: temporary commit eb26c254eed1 restores task-actor-preview-popover.tsx to main; its tree differs from main only by the test file. In UI (platform 2/4) job 112610522470 (Checks run 37564982448) the file shows "7 tests | 1 failed". "keeps keyboard focus on View more and restores the trigger on Escape" fails at :149:22 on expect(viewMore).toBeInTheDocument(), and it is the only failure in the shard (1 failed, 1482 passed). NEW: the final head's tree 4d367a56 is identical to e1737d190d's. All four UI shards ran fresh there (Cached: 0) and passed; UI 2/4 is job 112603696500. The final head's UI shards replay that cache (Cached: 1).
A11Y PASS (CI, jsdom user-event); real-browser keyboard NOT_RUN; assistive technology BLOCKED The test tabs to the trigger (the preview opens at once) and on to View more, then waits 350 ms of real time: View more is still rendered and focused. Escape returns focus to the trigger, and the preview stays closed 350 ms later, so there is no reopen from the focus return. Shift+Tab and Tab reopen the preview, and Enter on View more opens the details dialog. No Chromium 1208 lane runs this file, so a real-browser run is NOT_RUN; it is not reported as PASS.
UX-SIMPLICITY PASS Keyboard users can reach and activate View more without the preview vanishing. Pointer hover timing is unchanged, and no step is added.
CODE PASS Focusing the trigger now calls openForFocus (an immediate open that clears both timers) instead of the hover-delayed scheduleOpen. The content's onFocus clears the close that the trigger's blur scheduled. onCloseAutoFocus sets restoringFocus for one tick, so Radix's focus return on Escape does not reopen the preview. The restore timer is cleared on unmount, and the skipNextFocus details path is unchanged. The component API is unchanged. Consumers are TaskActorName in task-comments.tsx and task-timeline.tsx (three call sites). Tabbing out of the preview still closes it through the popover's existing focus-outside dismissal.
UX-CLARITY, UI-RESPONSIVE, LOCALE, DOCS NOT_APPLICABLE No copy, string, layout or documentation change.
SECURITY, DATA, PERFORMANCE, RESOURCES NOT_APPLICABLE Client focus logic only: one ref and a zero-delay timer on close.
CICD PASS 78 checks: 50 success, 27 skipped, 1 neutral (Trivy); all 7 CI-ready aggregators SUCCESS. Backend integration was skipped by its Integration scope (frontend-only). Execution identity is as stated under REL-MANUAL.
DEPLOYMENT, RECOVERY, PROVIDERS, OBSERVABILITY, WORKFLOW NOT_APPLICABLE Client component only.

Round-1 carry-overs:

  • (a) executed old-fails: closed;
  • (c) fresh CI on current main: closed;
  • (d) after the v0.5.75 candidate: closed (published);
  • (b) real-browser keyboard evidence: not available in CI for this jsdom test. It stays a residual under Fleet coordination's per-PR Part A rule (TALE-359 fb1e74cd), recorded as NOT_RUN, not PASS.

Verdict: ACCEPT at this exact head.

@yannickmonney

Copy link
Copy Markdown
Contributor Author

Merge-lane coverage dispositions at 7d6aac2943f262797b6c27717511c7378c107d55. From agent #2 (TALE-359 run 557c5b0f), the merger.

Topic Disposition Basis
All topics See the review My exact-head ACCEPT (comment 6031181756) carries the full topic matrix. REL-MANUAL: executed old-fails (UI job 112610522470 at eb26c254) and new-passes (UI job 112603696500 at the identical tree). A11Y: PASS in jsdom, real-browser keyboard NOT_RUN, assistive technology BLOCKED. CODE and UX-SIMPLICITY: PASS. Copy, layout and locale topics are NOT_APPLICABLE.
CICD PASS 78 checks: 50 success, 27 by-design skips (Backend integration by Integration scope; frontend-only), 1 neutral; tested base = current main a89498df.

Merge-gate dry run at 04:55:20Z: open, CLEAN, head matches; no required contexts. checks total=78 not-completed=0 failing=0 [neutral=1 skipped=27 success=50] neutral=[Trivy[github-advanced-security]] statuses=[pending total=0]. Every skip is on the by-design allowlist skip-allow-1545.txt; no check is pending or failing. Merging next with --squash --match-head-commit 7d6aac2943f262797b6c27717511c7378c107d55.

@yannickmonney
yannickmonney merged commit 524e438 into main Oct 7, 2026
@yannickmonney
yannickmonney deleted the fix/actor-preview-focus branch October 7, 2026 04:55
yannickmonney added a commit that referenced this pull request Oct 7, 2026
Cover all ten merges after a89498d through e011cc8: #4464, #4422,
#4468, #4470, #4457, #4465, #4472, #4469 and #4474, plus test-only
#4473. Apply C3's cumulative upgrade path from v0.5.74 and pin its
v0.5.75 notes link to the v0.5.75 tag. Drop the #4438, #4466 and #4440
known issues, now fixed, and list the Environment docs drift (#4454).
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.

1 participant