Skip to content

split chat and convostate part 2#29152

Open
chrisnojima-zoom wants to merge 3 commits intonojima/ZCLIENT-team-chat-split-2from
nojima/ZCLIENT-chat-convo-split
Open

split chat and convostate part 2#29152
chrisnojima-zoom wants to merge 3 commits intonojima/ZCLIENT-team-chat-split-2from
nojima/ZCLIENT-chat-convo-split

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

Refactors the chat code to further split “conversation state” (per-conversation Zustand stores + chat context) out of @/stores/chat into @/stores/convostate, reducing coupling and paving the way for a cleaner chat/convostate separation.

Changes:

  • Repointed most UI code from Chat.useChatContext / Chat.useConvoState / Chat.getConvoState to ConvoState.* equivalents.
  • Moved RefreshReason into a new shared module (@/stores/chat-shared) and updated imports/exports accordingly.
  • Moved “dismiss block buttons” behavior out of convostate and into the chat store (dismissBlockButtons*), wiring convostate to call it via storeRegistry.

Reviewed changes

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

Show a summary per file
File Description
shared/teams/team/settings-tab/retention/index.tsx Switch retention policy access from chat store helpers to convostate hooks.
shared/teams/team/rows/empty-row.tsx Use convostate store for joining conversation dispatch.
shared/teams/team/member/add-to-channels.tsx Use convostate getters/hooks for participant lookups.
shared/teams/emojis/add-alias.tsx Read conversation context via convostate instead of chat re-export.
shared/teams/common/channel-hooks.tsx Use convostate participant selector.
shared/teams/channel/rows.tsx Use convostate selector for participants state.
shared/teams/channel/index.tsx Move meta/participants selection to convostate hooks.
shared/stores/convostate.tsx Remove block-buttons logic; call chat store via storeRegistry; import RefreshReason from chat-shared.
shared/stores/chat.tsx Add dismissBlockButtons*; remove RefreshReason definition; stop re-exporting convostate; re-export RefreshReason from chat-shared.
shared/stores/chat-shared.tsx New shared module for RefreshReason union type.
shared/menubar/remote-proxy.desktop.tsx Read/subscribe to per-convo stores via convostate exports.
shared/incoming-share/index.tsx Use convostate getters (incl. UI state) when injecting share text/paths.
shared/constants/init/shared.tsx Update setConvoDefer wiring after removing block-buttons defer hook.
shared/constants/chat/debug.tsx Use convostate getter for debug dumps.
shared/common-adapters/wave-button.tsx Use convostate chat provider/context for sending messages.
shared/common-adapters/markdown/maybe-mention/index.tsx Resolve maybe-mentions via convostate chat context dispatch.
shared/chat/send-to-chat/index.tsx Use convostate getters/UI state for pre-filling input and navigation.
shared/chat/selectable-small-team-container.tsx Use convostate chat context selectors.
shared/chat/selectable-big-team-channel-container.tsx Use convostate chat context selectors.
shared/chat/pdf/index.desktop.tsx Use convostate chat context for message + download dispatch.
shared/chat/payments/status/index.tsx Use convostate message/payment maps from chat context.
shared/chat/new-team-dialog-container.tsx Use convostate participants from chat context.
shared/chat/inbox/use-inbox-state.tsx Call tabSelected() via convostate getter for selected convo.
shared/chat/inbox/use-inbox-search.tsx Use convostate meta checks and thread navigation via convo dispatch.
shared/chat/inbox/row/teams-divider-container.tsx Sum badges via convostate getter per visible small convo.
shared/chat/inbox/row/small-team/swipe-conv-actions/index.native.tsx Use convostate getter for swipe action dispatches.
shared/chat/inbox/row/small-team/index.tsx Use convostate provider/context for menus and row rendering.
shared/chat/inbox/row/big-team-header.tsx Use convostate provider for menu context.
shared/chat/inbox/row/big-team-channel.tsx Navigate via convostate dispatch.
shared/chat/inbox-search/index.tsx Wrap result rows in convostate providers.
shared/chat/inbox-and-conversation-shared.tsx Use convostate provider and navigate-to-thread dispatch.
shared/chat/inbox-and-conversation-header.tsx Use convostate provider/context for header data.
shared/chat/emoji-picker/container.tsx Use convostate context + navigation helper from convostate.
shared/chat/delete-history-warning.tsx Use convostate dispatch to delete history.
shared/chat/conversation/search.tsx Use convostate context/getters for search navigation and convID lookup.
shared/chat/conversation/reply-preview.tsx Use convostate chat + chat UI contexts.
shared/chat/conversation/rekey/container.tsx Read rekeyers via convostate chat context.
shared/chat/conversation/pinned-message.tsx Use convostate chat context for pinned message actions.
shared/chat/conversation/normal/index.native.tsx Use convostate chat context selectors.
shared/chat/conversation/normal/index.desktop.tsx Use convostate chat context + navigateAppend helper.
shared/chat/conversation/normal/container.tsx Use convostate getters/context for orange-line logic and meta.
shared/chat/conversation/messages/wrapper/wrapper.tsx Use convostate contexts; update types to reference convostate directly.
shared/chat/conversation/messages/wrapper/long-pressable/index.native.tsx Use convostate chat + UI contexts for actions.
shared/chat/conversation/messages/wrapper/index.tsx Use convostate for message type selection.
shared/chat/conversation/messages/text/unfurl/unfurl-list/use-state.tsx Use convostate dispatch for unfurl/collapse actions.
shared/chat/conversation/messages/text/unfurl/unfurl-list/map-popup.tsx Use convostate dispatch for send message.
shared/chat/conversation/messages/text/unfurl/prompt-list/container.tsx Use convostate dispatch/state for unfurl prompts.
shared/chat/conversation/messages/text/coinflip/index.tsx Use convostate state/dispatch for coinflip status and resend.
shared/chat/conversation/messages/system-users-added-to-conv/container.tsx Read channel name via convostate meta.
shared/chat/conversation/messages/system-simple-to-complex/container.tsx Read teamID via convostate meta.
shared/chat/conversation/messages/system-profile-reset-notice.tsx Use convostate meta + navigate via convostate dispatch.
shared/chat/conversation/messages/system-old-profile-reset-notice/container.tsx Use convostate meta/participants + convostate navigate dispatch.
shared/chat/conversation/messages/system-new-channel/container.tsx Read teamID via convostate meta; minor formatting change.
shared/chat/conversation/messages/system-left/container.tsx Read meta via convostate.
shared/chat/conversation/messages/system-joined/container.tsx Read meta via convostate; minor formatting change.
shared/chat/conversation/messages/system-invite-accepted/container.tsx Read teamID via convostate meta.
shared/chat/conversation/messages/system-create-team/container.tsx Use convostate dispatch/meta for info-panel behavior.
shared/chat/conversation/messages/system-change-retention/container.tsx Use convostate dispatch/meta for info panel interaction.
shared/chat/conversation/messages/system-added-to-team/container.tsx Use convostate context + navigateAppend helper.
shared/chat/conversation/messages/special-top-message.tsx Use convostate context for special message state.
shared/chat/conversation/messages/special-bottom-message.tsx Use convostate context for reset/superseded flags.
shared/chat/conversation/messages/separator.tsx Use convostate context selector for separator rendering data.
shared/chat/conversation/messages/retention-notice.tsx Use convostate meta + dispatch for showing settings panel.
shared/chat/conversation/messages/reset-user.tsx Use convostate meta/participants + dispatch actions.
shared/chat/conversation/messages/reaction-tooltip.tsx Use convostate context + provider for portal rendering.
shared/chat/conversation/messages/react-button.tsx Use convostate navigateAppend helper.
shared/chat/conversation/messages/pin/index.tsx Use convostate dispatch for reply jump.
shared/chat/conversation/messages/message-popup/text.tsx Use convostate context for message + actions.
shared/chat/conversation/messages/message-popup/journeycard.tsx Use convostate context for card type + dismissal.
shared/chat/conversation/messages/message-popup/index.tsx Use convostate context for message-type switch + provider wrapper.
shared/chat/conversation/messages/message-popup/hooks.tsx Use convostate contexts for popup item building and actions.
shared/chat/conversation/messages/message-popup/attachment.tsx Use convostate context for attachment message/actions.
shared/chat/conversation/messages/emoji-row.tsx Use convostate contexts + navigateAppend for emoji row actions.
shared/chat/conversation/messages/cards/team-journey/container.tsx Use convostate context for message/meta and dismissal.
shared/chat/conversation/messages/cards/make-team.tsx Use convostate navigateAppend helper.
shared/chat/conversation/messages/attachment/video/index.tsx Use convostate dispatch for preview select; formatting-only refactor.
shared/chat/conversation/messages/attachment/shared.tsx Use convostate dispatch for download/collapse actions.
shared/chat/conversation/messages/attachment/image/index.tsx Use convostate dispatch for preview select; formatting-only refactor.
shared/chat/conversation/messages/attachment/file.tsx Use convostate dispatch for download/share actions.
shared/chat/conversation/messages/account-payment/container.tsx Use convostate accountsInfoMap instead of chat re-exported type/context.
shared/chat/conversation/load-status.tsx Use convostate context for thread load status + convo id.
shared/chat/conversation/list-area/index.native.tsx Use convostate context for list data and message loading; use convostate getter for recycle-type lookup.
shared/chat/conversation/list-area/index.desktop.tsx Use convostate contexts for scrolling/editing state and message rows.
shared/chat/conversation/list-area/hooks.tsx Use convostate dispatch for mark-as-read and jump-to-recent logic.
shared/chat/conversation/input-area/suggestors/users.tsx Read participants/team meta via convostate context.
shared/chat/conversation/input-area/suggestors/index.tsx Use convostate context/provider in mobile suggestion popup.
shared/chat/conversation/input-area/suggestors/emoji.tsx Read convo id via convostate context for emoji custom fetch.
shared/chat/conversation/input-area/suggestors/commands.tsx Use convostate chat + UI contexts for command suggestions.
shared/chat/conversation/input-area/suggestors/channels.tsx Use convostate context/types for channel suggestions.
shared/chat/conversation/input-area/preview.tsx Use convostate dispatch for join/leave.
shared/chat/conversation/input-area/normal/typing.tsx Use convostate chat + UI contexts for typing UI.
shared/chat/conversation/input-area/normal/set-explode-popup/hooks.tsx Use convostate chat context for meta/exploding state.
shared/chat/conversation/input-area/normal/moremenu-popup.native.tsx Use convostate UI context + navigateAppend helper.
shared/chat/conversation/input-area/normal/input.native.tsx Use convostate navigateAppend helper and convo id selectors.
shared/chat/conversation/input-area/normal/input.desktop.tsx Use convostate UI context and navigateAppend helper.
shared/chat/conversation/input-area/normal/index.tsx Use convostate contexts for reply/command/giphy UI.
shared/chat/conversation/input-area/location-popup.native.tsx Use convostate contexts; formatting-only refactor of button component.
shared/chat/conversation/input-area/container.tsx Use convostate context for convo id and meta-derived flags.
shared/chat/conversation/info-panel/settings/notifications.tsx Use convostate meta + dispatch for notification settings.
shared/chat/conversation/info-panel/settings/min-writer-role.tsx Use convostate meta + dispatch for min-writer role.
shared/chat/conversation/info-panel/settings/index.tsx Use convostate meta/participants + dispatch for settings actions.
shared/chat/conversation/info-panel/menu.tsx Use convostate meta/participants + dispatch for menu actions.
shared/chat/conversation/info-panel/members.tsx Use convostate context selectors for members tab data.
shared/chat/conversation/info-panel/index.tsx Use convostate convo-state selector for meta and convo id.
shared/chat/conversation/info-panel/header.tsx Use convostate provider/context for header + popup wiring.
shared/chat/conversation/info-panel/common.tsx Update types to depend on convostate state shape.
shared/chat/conversation/info-panel/bot.tsx Use convostate state/dispatch for bot settings and actions.
shared/chat/conversation/info-panel/attachments.tsx Use convostate dispatch/state for attachment view actions.
shared/chat/conversation/info-panel/add-to-channel.tsx Use convostate convo id; formatting-only refactor of effects/footer.
shared/chat/conversation/info-panel/add-people.tsx Use convostate meta + navigateAppend helper.
shared/chat/conversation/header-area/index.native.tsx Use convostate provider/context and dispatch actions for header UI.
shared/chat/conversation/giphy/hooks.tsx Use convostate contexts for giphy state + send action.
shared/chat/conversation/fwd-msg.tsx Use convostate context to read source convo + message state.
shared/chat/conversation/error.tsx Use convostate meta snippet for error UI.
shared/chat/conversation/container.tsx Use convostate context to branch conversation rendering by id/meta.
shared/chat/conversation/command-status.tsx Use convostate UI context for command status state + dispatch.
shared/chat/conversation/command-markdown.tsx Use convostate context for command markdown data.
shared/chat/conversation/bottom-banner.tsx Use convostate context for participants/banner state + dismissal.
shared/chat/conversation/bot/search.tsx Use convostate context for convo id.
shared/chat/conversation/bot/install.tsx Use convostate context/provider for dispatch/meta access.
shared/chat/conversation/bot/confirm.tsx Use convostate context/provider for convo id and dispatch.
shared/chat/conversation/attachment-get-titles.tsx Use convostate dispatch for attachments upload/cancel and nav.
shared/chat/conversation/attachment-fullscreen/hooks.tsx Use convostate context/dispatch to load attachments and actions.
shared/chat/blocking/invitation-to-block.tsx Use convostate for convo/meta/participants; use chat store for block-buttons dismissal.
shared/chat/blocking/block-modal.tsx Use convostate dispatch for block conversation action.
shared/chat/audio/audio-recorder.native.tsx Use convostate contexts for command status UI + audio send dispatch.

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

@chrisnojima-zoom chrisnojima-zoom changed the title WIP: split chat and convostate 1 split chat and convostate part 2 Apr 16, 2026
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