Skip to content

remove signup store#29092

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

remove signup store#29092
chrisnojima merged 28 commits intonojima/HOTPOT-next-670-cleanfrom
nojima/ZCLIENT-less-store-12

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 removes the legacy signup Zustand store and replaces it with lightweight feature-local state helpers for signup device-name draft and the post-signup email banner state, simplifying global store surface area.

Changes:

  • Deleted shared/stores/signup.tsx and removed signup from the store registry and init wiring.
  • Introduced module-scoped helpers for signup device name draft (shared/signup/device-name-draft.tsx) and signup email banner state (shared/people/signup-email.tsx) and updated signup/people flows to use them.
  • Updated/rewrote signup store tests to cover the new helpers and adjusted init subscriptions/engine handlers to clear the new state.

Reviewed changes

Copilot reviewed 13 out of 13 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 Marks signup store removal as completed in the pruning checklist.
shared/stores/tests/signup.test.ts Replaces store-based tests with helper-based tests for signup email + device name draft.
shared/stores/store-registry.tsx Removes signup from registry types and dynamic hook loader.
shared/stores/signup.tsx Deletes the signup Zustand store implementation.
shared/signup/username.tsx Clears device-name draft on back navigation instead of resetting the removed store.
shared/signup/routes.tsx Stores the “no email” sentinel via setSignupEmail instead of the removed store.
shared/signup/email.tsx Stores the entered/skipped email via setSignupEmail instead of the removed store.
shared/signup/device-name.tsx Uses device-name draft helper and calls push prompt directly from usePushState.
shared/signup/device-name-draft.tsx New module-scoped helper for staging/clearing the signup device name.
shared/people/signup-email.tsx New external-store helper (with useSyncExternalStore) for the post-signup email banner value.
shared/people/index.shared.tsx Refactors banner component to take signupEmail as a prop and clears via clearSignupEmail.
shared/people/container.tsx Reads signupEmail from useSignupEmail() and passes through People props.
shared/constants/init/shared.tsx Removes signup callback wiring and clears new helpers on logout/tab leave and email-verified engine events.

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

Base automatically changed from nojima/ZCLIENT-less-store-11 to nojima/HOTPOT-next-670-clean March 30, 2026 14:38
@chrisnojima chrisnojima force-pushed the nojima/ZCLIENT-less-store-12 branch from 323fa1c to a35bca9 Compare March 30, 2026 15:01
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

Copilot reviewed 14 out of 14 changed files in this pull request and generated no new comments.


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

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

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


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

Comment on lines 1135 to +1138
case T.RPCChat.SyncInboxResType.current:
if (get().inboxRows.length === 0) {
inboxRefresh('inboxSyncedCurrentButEmpty')
}
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.

Calling inboxRefresh whenever syncType is current and inboxRows.length === 0 can lead to repeated refreshes for accounts with an actually-empty inbox (and can potentially loop if a refresh triggers another ChatInboxSynced/current). Consider gating this to only happen when the inbox has never loaded yet (e.g. !get().inboxHasLoaded) or track a one-shot retry flag so we only attempt this recovery once per session.

Copilot uses AI. Check for mistakes.
@chrisnojima chrisnojima merged commit f3e40ec into nojima/HOTPOT-next-670-clean Mar 30, 2026
@chrisnojima chrisnojima deleted the nojima/ZCLIENT-less-store-12 branch March 30, 2026 19:04
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