remove more store plumbing#29149
Merged
chrisnojima merged 4 commits intonojima/HOTPOT-next-670-clean-2from Apr 15, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR continues the “remove store plumbing” effort by eliminating several dispatch.defer.* callback hooks and replacing them with direct reads/dispatches to the relevant Zustand stores (e.g., useUsersState, useDaemonState, useSettingsContactsState). This reduces initialization-time wiring in shared/constants/init/shared.tsx and makes the updated stores more self-sufficient.
Changes:
- Removed multiple
dispatch.defer.*callback contracts (push handshake, users updates/info map, team-building settings/users hooks). - Updated
chat,teams,tracker, andteam-buildingstores to directly call intouseUsersState,useDaemonState, anduseSettingsContactsState. - Simplified shared init by deleting now-unneeded callback initializers and updated the desktop push store test accordingly.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| shared/stores/tracker.tsx | Removes deferred onUsersUpdates plumbing; updates users via useUsersState directly. |
| shared/stores/tests/push.desktop.test.ts | Updates test to stop asserting removed handshake defer behavior. |
| shared/stores/teams.tsx | Removes deferred users-updates callback; pushes member fullname updates via useUsersState. |
| shared/stores/team-building.tsx | Removes deferred settings/users hooks; reads settings-contacts state and dispatches users updates/block state directly. |
| shared/stores/push.native.tsx | Replaces daemon handshake defer callback with direct useDaemonState handshakeState check. |
| shared/stores/push.desktop.tsx | Removes now-unused defer.onGetDaemonHandshakeState stub. |
| shared/stores/push.d.ts | Updates Push store typings to remove dispatch.defer handshake accessor. |
| shared/stores/chat.tsx | Removes daemon/users defer accessors; uses useDaemonState / useUsersState directly. |
| shared/constants/init/shared.tsx | Deletes init callback wiring for removed defers (push/tracker/users/team-building settings/users). |
💡 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.