π§ The debt
The restore-focus-on-close ref-in-render block is hand-copied across 8 dialog/modal components: FireModal, PersonaCardReviewModal, SaveAsOwnModal, confirm-dialog, FontInstallModal, ThemeInstallModal, ShowCardReviewModal, PersonaOfferDialog (count as of the Dayparting epic; the T255 review flagged copies 7 and 8). The DialogShell extraction (T255) deliberately did NOT centralize it β the provider's always-mounted dialog captures focus imperatively per-confirm() call while per-open modals capture lazily on mount, so a shell-owned ref could only implement one timing.
π§ Fix shape
A useRestoreFocus() hook parameterized on capture timing (imperative vs on-mount), consumed by all 8; DialogShell's remarks document the two-timings constraint.
π§ The debt
The restore-focus-on-close ref-in-render block is hand-copied across 8 dialog/modal components:
FireModal,PersonaCardReviewModal,SaveAsOwnModal,confirm-dialog,FontInstallModal,ThemeInstallModal,ShowCardReviewModal,PersonaOfferDialog(count as of the Dayparting epic; the T255 review flagged copies 7 and 8). TheDialogShellextraction (T255) deliberately did NOT centralize it β the provider's always-mounted dialog captures focus imperatively per-confirm()call while per-open modals capture lazily on mount, so a shell-owned ref could only implement one timing.π§ Fix shape
A
useRestoreFocus()hook parameterized on capture timing (imperative vs on-mount), consumed by all 8;DialogShell's remarks document the two-timings constraint.