Repository navigation
Description
Out of scope
Changing trust publication, receipt handling, or general Settings focus behavior.
Context
Parent epic: #3597. Follow-up from the final triage of review round 3 of #4425 at 60e9d32f6. This is deferred follow-up work, with no release commitment.
After a proved save, settle calls close(), then setRead(null), then await load() (settle, packages/ui-react/src/components/settings/trust-settings-section.tsx:192-205, lines 200-202). close sets restoreFocus (close, packages/ui-react/src/components/settings/trust-settings-section.tsx:144), and the layout effect restores focus as soon as the draft is gone (useLayoutEffect, packages/ui-react/src/components/settings/trust-settings-section.tsx:129-137, line 136). With read cleared the list, and its Add and Edit controls, are not rendered, so the opener is disconnected when restoration runs and focus goes to the heading even after a create or edit where the same Add or Edit control returns on reload. T04 checks Cancel, which leaves the opener mounted, and does not cover this transition (T04, packages/ui-react/tests/browser/hit-reach.trust-settings.pointer.tsx:197).
Scope
Restore keyboard focus after the proved-save reload using the returning action control when it exists.
Acceptance criteria
- After a proved create, focus returns to Add; after a proved edit, focus returns to the returning Edit control.
- After removal or a failed reload, focus goes to the trust heading.
- A real-browser keyboard test covers all these outcomes.
Verification
Run the keyboard cases in a real browser, with failing-first proof and a mutation that restores premature heading focus.
Contract impact
None; focus behavior only.
2026-11-23 triage at main a3395c4: repaired the drifted line citations by named anchor (the originals pointed at the #4425 review head). Replaced non-manifest type: bug with type: fix; changed priority: p3 to priority: p2, because this restores promised keyboard focus behaviour and needs no further driving use case, matching sibling #4436.
Activity