slim settings store#29089
Merged
chrisnojima merged 8 commits intonojima/HOTPOT-next-670-cleanfrom Mar 30, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR continues the “zustand store pruning” effort by removing the monolithic settings Zustand store and relocating its responsibilities into feature-local hooks/helpers and the owning settings screens.
Changes:
- Deletes
shared/stores/settings.tsxand removes it from the store registry/initialization wiring. - Introduces feature helpers/hooks (
shared/settings/load-settings.tsx,use-password-check,use-delete-account) and rewires settings screens/tests to use them. - Removes the cert-pinning modal route and inlines the TLS interception warning UI into the proxy settings screen.
Reviewed changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| skill/zustand-store-pruning/references/store-checklist.md | Marks settings store removal as complete in the pruning checklist. |
| shared/stores/tests/settings.test.ts | Updates tests to target loadSettings + email/phone stores instead of the removed settings store. |
| shared/stores/store-registry.tsx | Removes settings store types/hook registration. |
| shared/stores/settings.tsx | Deletes the legacy settings Zustand store implementation. |
| shared/settings/use-password-check.tsx | Adds a hook to run passphrase checks without the settings store. |
| shared/settings/use-delete-account.tsx | Adds a hook to delete an account without the settings store. |
| shared/settings/sub-nav/left-nav.tsx | Switches settings constants import from store to constants/settings. |
| shared/settings/routes.tsx | Removes disableCertPinningModal route and settings-store usage. |
| shared/settings/root-phone.tsx | Switches settings constants import from store to constants/settings. |
| shared/settings/root-desktop-tablet.tsx | Switches settingsAccountTab import to constants/settings. |
| shared/settings/proxy.tsx | Refactors proxy screen to local state + inline TLS interception warning (no settings store). |
| shared/settings/notifications/index.native.tsx | Uses loadSettings helper instead of settings store dispatch. |
| shared/settings/notifications/index.desktop.tsx | Uses loadSettings helper instead of settings store dispatch. |
| shared/settings/notifications/hooks.tsx | Uses loadSettings helper and settings constants from constants/settings. |
| shared/settings/manage-contacts.tsx | Switches settingsFeedbackTab import to constants/settings. |
| shared/settings/logout.tsx | Replaces settings-store password-check state with usePasswordCheck. |
| shared/settings/load-settings.tsx | Adds shared “load settings” helper (email/phone propagation + phone-app deep link behavior). |
| shared/settings/disable-cert-pinning-modal.tsx | Removes modal component (warning is now inline in proxy screen). |
| shared/settings/delete-confirm/index.tsx | Uses useDeleteAccount hook instead of settings store dispatch. |
| shared/settings/delete-confirm/check-passphrase.native.tsx | Uses usePasswordCheck + useDeleteAccount hooks. |
| shared/settings/db-nuke.confirm.tsx | Switches db-nuke to direct RPC via useRPC. |
| shared/settings/chat.tsx | Uses loadSettings helper instead of settings store dispatch. |
| shared/settings/archive/modal.tsx | Switches settingsArchiveTab import to constants/settings. |
| shared/settings/advanced.tsx | Moves lockdown/profiling/log-clearing logic out of settings store into screen-local helpers. |
| shared/settings/account/index.tsx | Switches settings constants import and replaces web auth token login with direct RPC. |
| shared/incoming-share/index.tsx | Switches settingsFeedbackTab import to constants/settings. |
| shared/devices/device-revoke.tsx | Switches settingsDevicesTab import to constants/settings. |
| shared/desktop/renderer/remote-event-handler.desktop.tsx | Replaces settings-store stop dispatch with direct RPC. |
| shared/constants/init/shared.tsx | Removes initSettingsCallbacks wiring (no settings store to defer into). |
| AGENTS.md | Adds refactor guidance to preserve existing guards/platform-specific behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.