router slim#29096
Merged
chrisnojima merged 5 commits intoMar 30, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
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/switchTabusages across the app withC.Router2.*helpers. - Slim
shared/stores/router.tsxto only keepnavStateanddispatch.defer, and adjust router store tests accordingly. - Update imports/exports so router helpers/types come from
shared/constants/router.tsx(andC.Router2) instead ofshared/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.
de21604 to
fbedc10
Compare
5872316 to
62feb1e
Compare
fbedc10 to
56e4360
Compare
62feb1e to
800e46a
Compare
56e4360 to
ce71a3c
Compare
21adca0 to
4c41179
Compare
ce71a3c to
22295a4
Compare
Base automatically changed from
nojima/ZCLIENT-less-store-15
to
nojima/HOTPOT-next-670-clean
March 30, 2026 21:09
22295a4 to
002ec1c
Compare
099a856
into
nojima/HOTPOT-next-670-clean
1 check was pending
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.