Skip to content

less store 13#29093

Merged
chrisnojima merged 7 commits intonojima/HOTPOT-next-670-cleanfrom
nojima/ZCLIENT-less-store-13
Mar 30, 2026
Merged

less store 13#29093
chrisnojima merged 7 commits intonojima/HOTPOT-next-670-cleanfrom
nojima/ZCLIENT-less-store-13

Conversation

@chrisnojima-zoom
Copy link
Copy Markdown
Contributor

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

This PR continues the “zustand-store-pruning” effort by removing the wallets zustand store and migrating a couple of users-store RPC helpers into the feature/components that invoke them, while updating the pruning checklist documentation accordingly.

Changes:

  • Removed the wallets zustand store and its unit tests; wallets screens now load/delete accounts via direct RPC calls and pass required data via route params.
  • Removed reportUser / setUserBlocks dispatch helpers from the users store and updated call sites to invoke the underlying RPCs directly.
  • Updated the store-pruning checklist statuses/notes for team-building, tracker, users, and wallets.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
skill/zustand-store-pruning/references/store-checklist.md Updates pruning progress notes/statuses for several stores.
shared/wallets/index.tsx Loads wallet accounts via direct RPC into component state; passes needed params to modals.
shared/wallets/remove-account.tsx Removes wallets-store dependency; uses route params for name/balance display.
shared/wallets/really-remove-account.tsx Removes wallets-store dependency; deletes account via direct RPC and uses route params.
shared/stores/wallets.tsx Deletes the wallets zustand store implementation.
shared/stores/tests/wallets.test.ts Deletes wallets-store unit tests.
shared/stores/users.tsx Removes reportUser and setUserBlocks dispatch helpers from the users store.
shared/chat/blocking/block-modal.tsx Calls report/block RPCs directly instead of via users-store dispatch helpers.
shared/teams/team/rows/member-row.tsx Uses direct userSetUserBlocks RPC instead of users-store dispatch.
shared/teams/channel/rows.tsx Uses direct userSetUserBlocks RPC instead of users-store dispatch.

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

Comment on lines +7 to +13
type Account = {
accountID: string
balanceDescription: string
deviceReadOnly: boolean
isDefault: boolean
name: string
}
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

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

Account duplicates fields that already exist on the RPC type (T.RPCStellar.WalletAccountLocal). To avoid drift when the protocol type changes, consider defining this as a Pick (or alias) of the generated RPC type instead of re-declaring the shape here.

Suggested change
type Account = {
accountID: string
balanceDescription: string
deviceReadOnly: boolean
isDefault: boolean
name: string
}
type Account = Pick<
T.RPCStellar.WalletAccountLocal,
'accountID' | 'balanceDescription' | 'deviceReadOnly' | 'isDefault' | 'name'
>

Copilot uses AI. Check for mistakes.
navigateUp()
deleteAccount([{accountID, userAcknowledged: 'yes'}, loadAccountsWaitingKey], () => {
navigateUp()
}, () => {})
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

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

The delete-account RPC error callback is currently a no-op, so failures will be silent and the user won’t know why the account wasn’t removed. Consider handling the error (e.g., show a banner/toast and/or log) so this flow is diagnosable.

Suggested change
}, () => {})
}, err => {
console.error('Error deleting wallet account', err)
})

Copilot uses AI. Check for mistakes.
@chrisnojima chrisnojima force-pushed the nojima/ZCLIENT-less-store-13 branch from 125aaec to f833bc9 Compare March 30, 2026 15:01
@chrisnojima chrisnojima force-pushed the nojima/ZCLIENT-less-store-12 branch from 323fa1c to a35bca9 Compare March 30, 2026 15:01
Base automatically changed from nojima/ZCLIENT-less-store-12 to nojima/HOTPOT-next-670-clean March 30, 2026 19:04
@chrisnojima chrisnojima force-pushed the nojima/ZCLIENT-less-store-13 branch from f833bc9 to 27e1b13 Compare March 30, 2026 19:07
@chrisnojima chrisnojima merged commit 434d63a into nojima/HOTPOT-next-670-clean Mar 30, 2026
1 check was pending
@chrisnojima chrisnojima deleted the nojima/ZCLIENT-less-store-13 branch March 30, 2026 19:37
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