fix(ui): restore settings dialog focus - #1883
Conversation
|
@codex review |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (10)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe Settings password setup and telemetry preview dialogs now use their invoking buttons as ChangesSettings dialog focus restoration
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This localized fix restores keyboard focus to the Settings button that opened each dialog without changing the surrounding flows. No actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Restore keyboard focus to the exact Settings button that opened the View collected data or Set password dialog. Both controlled dialogs now register their real invoker through Radix
DialogTrigger, matching the existing trigger-backed focus behavior instead of leavingdocument.activeElementonbody.Type of change
fix:— bug fix (no behavior change beyond the bug)feat:— new user-facing feature or capabilityrefactor:— internal refactor (no behavior change, no API change)docs:— documentation onlychore:/ci:/build:— tooling, CI, packagingtest:— test-only changeLinked issue: None — independently reproduced; the bounded issue and PR overlap checks found no relevant work or prerequisite.
OpenSpec
Change directory:
openspec/changes/restore-settings-dialog-focus/Changes
activeDialogas the controlled password-dialog state.document.bodyexclusion.Simplicity
No new setting, default, setup step, dependency, README section, dashboard navigation item, or shared focus abstraction. The fix reuses the existing Radix trigger mechanism.
Test plan
bun run test -- src/features/settings/components/telemetry-settings.test.tsx src/features/settings/components/password-settings.test.tsx— 2 files, 21 tests passed. The four new cases failed on the dispatched baseline withbodyfocused, then passed after the fix.bun node_modules/eslint/bin/eslint.js src/features/settings/components/telemetry-settings.tsx src/features/settings/components/telemetry-settings.test.tsx src/features/settings/components/password-settings.tsx src/features/settings/components/password-settings.test.tsx src/features/settings/components/password-setup-dialog.tsx— passed.bun run typecheck— passed.openspec validate restore-settings-dialog-focus --type change --strict— passed.git diff --check— passed.Known baseline-only validation debt:
openspec validate frontend-architecture --type spec --strictstill reports the two unchanged existing conversation requirements whose first paragraph lacks a normative keyword. This branch does not editopenspec/specs/frontend-architecture/spec.md; the scoped change validates strictly.Not run locally: full local CI, full frontend suite, or coverage. The focused Standard-risk checks above cover this seam; required GitHub CI remains the integration gate.
Screenshots / output
This focus-only fix has no static visual delta, so equivalent observable Chromium evidence is more accurate than screenshots. Against an isolated empty local backend, each flow was exercised before and after at a nonzero Settings scroll position:
document.activeElementdocument.activeElementBODYBUTTON— View collected data1735 → 1735BODYBUTTON— View collected data1735 → 1735BODYBUTTON— Set password982 → 982BODYBUTTON— Set password982 → 982The telemetry preview still loaded its real envelope, and password Cancel/Escape submitted no setup request.
Checklist
CHANGELOG.mdis not edited by hand.Summary by CodeRabbit