Skip to content

router slim#29096

Merged
chrisnojima merged 5 commits into
nojima/HOTPOT-next-670-cleanfrom
nojima/ZCLIENT-less-store-16
Mar 30, 2026
Merged

router slim#29096
chrisnojima merged 5 commits into
nojima/HOTPOT-next-670-cleanfrom
nojima/ZCLIENT-less-store-16

Conversation

@chrisnojima-zoom

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 slimming the router store down to just nav state + defers, and migrating most navigation callsites to the non-store navigation helpers (C.Router2) exported from shared/constants/router.tsx.

Changes:

  • Replace C.useRouterState(...dispatch.navigate*) / clearModals / switchTab usages across the app with C.Router2.* helpers.
  • Slim shared/stores/router.tsx to only keep navState and dispatch.defer, and adjust router store tests accordingly.
  • Update imports/exports so router helpers/types come from shared/constants/router.tsx (and C.Router2) instead of shared/stores/router.tsx.

Reviewed changes

Copilot reviewed 179 out of 179 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
skill/zustand-store-pruning/references/store-checklist.md Mark fs as complete in the store pruning checklist.
shared/wallets/remove-account.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/wallets/really-remove-account.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/wallets/index.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/util/safe-navigation.tsx Use C.Router2 navigation helpers under useSafeNavigation.
shared/tracker/assertion.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/teams/team/team-info.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/teams/team/settings-tab/retention/warning.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/teams/team/settings-tab/retention/index.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/teams/team/settings-tab/open-team-warning.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/teams/team/settings-tab/index.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/teams/team/rows/member-row.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/teams/team/rows/bot-row/bot.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/teams/team/rows/bot-row/add-row.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/teams/team/menu-container.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/teams/team/member/add-to-channels.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/teams/routes.tsx Switch header navigation calls from router store dispatch to C.Router2.
shared/teams/rename-team.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/teams/new-team/index.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/teams/main/team-row.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/teams/join-team/container.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/teams/invite-by-email.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/teams/emojis/add-emoji.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/teams/emojis/add-alias.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/teams/edit-team-description.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/teams/delete-team.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/teams/confirm-modals/really-leave-team/index.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/teams/confirm-modals/delete-channel.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/teams/confirm-modals/confirm-kick-out.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/teams/common/selection-popup.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/teams/channel/rows.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/teams/add-members-wizard/confirm.tsx Replace router-store selection with C.Router2 helpers.
shared/teams/add-members-wizard/add-from-where.tsx Switch team builder append to C.Router2.appendNewTeamBuilder.
shared/teams/add-members-wizard/add-contacts.native.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/team-building/search-result/people-result.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/stores/tests/router.test.ts Update router store test to assert defers are preserved across reset.
shared/stores/router.tsx Slim router store API to navState + defers + reset/setNavState only.
shared/stores/chat.tsx Point router type import at shared/constants/router (types live there).
shared/signup/username.tsx Replace router-store navigation selection with C.Router2 helpers.
shared/signup/use-request-auto-invite.ts Replace router-store navigation selection with C.Router2 helpers.
shared/signup/routes.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/signup/phone-number/verify.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/signup/phone-number/index.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/signup/feedback.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/signup/email.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/signup/device-name.tsx Replace router-store navigation selection with C.Router2 helpers.
shared/signup/common.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/settings/use-delete-account.tsx Replace router-store navigation selection with C.Router2 helpers.
shared/settings/routes.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/settings/root-phone.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/settings/proxy.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/settings/password.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/settings/notifications/push-prompt.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/settings/notifications/index.native.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/settings/notifications/hooks.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/settings/manage-contacts.tsx Replace router-store navigation selection with C.Router2 helpers.
shared/settings/files/index.desktop.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/settings/feedback/container.desktop.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/settings/delete-confirm/index.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/settings/db-nuke.confirm.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/settings/archive/modal.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/settings/archive/index.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/settings/advanced.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/settings/account/index.tsx Replace router-store navigation selection with C.Router2 helpers.
shared/settings/account/email-phone-row.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/settings/account/add-modals.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/settings/about.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/router-v2/tab-bar.desktop.tsx Replace router-store navigation selection with C.Router2 helpers.
shared/router-v2/router.native.tsx Import router constants from shared/constants/router instead of store module.
shared/router-v2/common.native.tsx Import NavState type from shared/constants/router instead of store module.
shared/router-v2/account-switcher/index.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/provision/username-or-email.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/provision/troubleshooting.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/provision/set-public-name.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/provision/select-other-device-connected.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/provision/routes-sub.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/provision/password.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/provision/paper-key.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/provision/forgot-username.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/provision/error.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/provision/code-page/container.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/profile/user/teams/index.tsx Replace router-store navigation selection with C.Router2 helpers.
shared/profile/user/hooks.tsx Replace router-store navigation selection with C.Router2 helpers.
shared/profile/user/actions/index.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/profile/search.tsx Switch people builder append to C.Router2.appendPeopleBuilder.
shared/profile/routes.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/profile/revoke.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/profile/prove-website-choice.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/profile/pgp/no-pgp.native.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/profile/pgp/import/index.desktop.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/profile/pgp/choice/index.desktop.tsx Replace router-store navigation selection with C.Router2 helpers.
shared/profile/generic/proofs-list.tsx Replace router-store navigation selection with C.Router2 helpers.
shared/profile/edit-profile.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/profile/edit-avatar/hooks.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/profile/add-to-team.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/people/todo.tsx Replace router-store navigation selection with C.Router2 helpers.
shared/people/routes.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/people/announcement.tsx Replace router-store navigation selection with C.Router2 helpers.
shared/login/signup/error.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/login/reset/modal.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/login/relogin/container.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/login/recover-password/explain-device.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/login/recover-password/error.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/login/recover-password/error-modal.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/login/loading.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/login/join-or-login.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/incoming-share/index.tsx Switch navigation calls from router store dispatch to C.Router2 and remove store import.
shared/git/row.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/git/new-repo.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/git/nav-header.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/git/index.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/git/delete-repo.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/fs/routes.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/fs/index.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/fs/filepreview/bare-preview.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/fs/common/path-item-action/menu-container.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/fs/common/path-item-action/confirm-delete.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/fs/browser/destination-picker.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/fs/banner/system-file-manager-integration-banner/kext-permission-popup.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/fs/banner/conflict-banner.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/devices/row.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/devices/routes.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/devices/paper-key.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/devices/nav-header.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/devices/index.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/devices/device-revoke.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/devices/device-page.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/devices/add-device.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/crypto/verify.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/crypto/sign.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/crypto/output.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/crypto/encrypt.tsx Switch navigation + recipient builder appends to C.Router2.
shared/crypto/decrypt.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/constants/index.tsx Re-export Router2 from shared/constants/router (and keep useRouterState from store).
shared/common-adapters/team-with-popup.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/common-adapters/reload.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/common-adapters/name-with-icon.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/common-adapters/markdown/service-decoration.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/common-adapters/markdown/maybe-mention/team.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/common-adapters/back-button.native.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/common-adapters/back-button.desktop.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/chat/send-to-chat/index.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/chat/routes.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/chat/new-team-dialog-container.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/chat/inbox/use-inbox-state.tsx Switch new-chat builder append to C.Router2.appendNewChatBuilder.
shared/chat/inbox/search-row.tsx Switch navigation + builder append to C.Router2.
shared/chat/inbox/row/build-team.tsx Switch tab switching to C.Router2.switchTab.
shared/chat/inbox/row/big-team-header.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/chat/inbox/new-chat-button.tsx Switch new-chat builder append to C.Router2.appendNewChatBuilder.
shared/chat/inbox/filter-row.tsx Switch new-chat builder append to C.Router2.appendNewChatBuilder.
shared/chat/inbox-search/index.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/chat/emoji-picker/container.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/chat/delete-history-warning.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/chat/create-channel/hooks.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/chat/conversation/rekey/enter-paper-key.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/chat/conversation/rekey/container.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/chat/conversation/messages/text/unfurl/unfurl-list/map.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/chat/conversation/messages/text/unfurl/unfurl-list/map-popup.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/chat/conversation/messages/text/coinflip/errors.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/chat/conversation/messages/system-invite-accepted/container.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/chat/conversation/messages/system-create-team/container.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/chat/conversation/messages/message-popup/text.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/chat/conversation/messages/message-popup/hooks.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/chat/conversation/messages/message-popup/attachment.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/chat/conversation/messages/cards/team-journey/container.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/chat/conversation/messages/attachment/file.tsx Switch tab switching + navigation append to C.Router2.
shared/chat/conversation/input-area/location-popup.native.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/chat/conversation/info-panel/menu.tsx Replace router-store clearModals usage with C.Router2.clearModals (but see review comment).
shared/chat/conversation/info-panel/attachments.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/chat/conversation/header-area/index.native.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/chat/conversation/fwd-msg.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/chat/conversation/bot/team-picker.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/chat/conversation/bot/search.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/chat/conversation/bot/install.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/chat/conversation/bot/confirm.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/chat/conversation/attachment-get-titles.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/chat/conversation/attachment-fullscreen/hooks.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/chat/blocking/block-modal.tsx Switch navigation calls from router store dispatch to C.Router2.
shared/app/global-errors.tsx Switch navigation calls from router store dispatch to C.Router2.

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

Comment thread shared/chat/conversation/info-panel/menu.tsx
@chrisnojima chrisnojima force-pushed the nojima/ZCLIENT-less-store-16 branch from de21604 to fbedc10 Compare March 30, 2026 15:02
@chrisnojima chrisnojima force-pushed the nojima/ZCLIENT-less-store-15 branch from 5872316 to 62feb1e Compare March 30, 2026 15:02
@chrisnojima chrisnojima force-pushed the nojima/ZCLIENT-less-store-16 branch from fbedc10 to 56e4360 Compare March 30, 2026 19:07
@chrisnojima chrisnojima force-pushed the nojima/ZCLIENT-less-store-15 branch from 62feb1e to 800e46a Compare March 30, 2026 19:07
@chrisnojima chrisnojima force-pushed the nojima/ZCLIENT-less-store-16 branch from 56e4360 to ce71a3c Compare March 30, 2026 19:38
@chrisnojima chrisnojima force-pushed the nojima/ZCLIENT-less-store-15 branch 2 times, most recently from 21adca0 to 4c41179 Compare March 30, 2026 20:01
@chrisnojima chrisnojima force-pushed the nojima/ZCLIENT-less-store-16 branch from ce71a3c to 22295a4 Compare March 30, 2026 20:01
Base automatically changed from nojima/ZCLIENT-less-store-15 to nojima/HOTPOT-next-670-clean March 30, 2026 21:09
@chrisnojima chrisnojima force-pushed the nojima/ZCLIENT-less-store-16 branch from 22295a4 to 002ec1c Compare March 30, 2026 21:12
@chrisnojima chrisnojima merged commit 099a856 into nojima/HOTPOT-next-670-clean Mar 30, 2026
1 check was pending
@chrisnojima chrisnojima deleted the nojima/ZCLIENT-less-store-16 branch March 30, 2026 21:30
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