Skip to content

misc: perference panel simplification#196

Merged
ldm0 merged 1 commit intomasterfrom
perference_simplification
May 2, 2026
Merged

misc: perference panel simplification#196
ldm0 merged 1 commit intomasterfrom
perference_simplification

Conversation

@ldm0
Copy link
Copy Markdown
Member

@ldm0 ldm0 commented May 2, 2026

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Simplifies the Preferences overlay behavior around reset and Escape handling, aligning the UI with “reset applies defaults” and “Escape closes the modal” expectations.

Changes:

  • Update “Reset” behavior to apply default sort threshold and watch configuration via callbacks.
  • Remove per-field Escape handlers that previously reverted individual inputs.
  • Expand unit tests to validate default-application on reset and closing on Escape while editing.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
cardinal/src/components/PreferencesOverlay.tsx Reset now applies default sort + watch config; Escape handling relies on the existing window-level listener and removes per-field key handlers.
cardinal/src/components/tests/PreferencesOverlay.test.tsx Updates reset expectations and adds coverage for closing the overlay on Escape while editing a field.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@buggerman
Copy link
Copy Markdown
Contributor

Thanks for cleaning these up. Both were patterns I mirrored from the ignore-paths block without questioning. The redundant Escape got slightly worse with my third handler, and I should have caught that reset was only touching the inputs.

@ldm0 ldm0 force-pushed the perference_simplification branch from 5c165bc to dfe415a Compare May 2, 2026 10:10
@ldm0
Copy link
Copy Markdown
Member Author

ldm0 commented May 2, 2026

Thanks for cleaning these up. Both were patterns I mirrored from the ignore-paths block without questioning. The redundant Escape got slightly worse with my third handler, and I should have caught that reset was only touching the inputs.

No problem, that's an old issue and I didn't recognize it before, . : D

@ldm0 ldm0 merged commit af9bf43 into master May 2, 2026
10 checks passed
@ldm0 ldm0 deleted the perference_simplification branch May 2, 2026 10:13
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.

3 participants