Skip to content

Conversation

bigint
Copy link
Member

@bigint bigint commented Jun 23, 2025

No description provided.

Copy link

cloudflare-workers-and-pages bot commented Jun 23, 2025

Deploying hey-mainnet with  Cloudflare Pages  Cloudflare Pages

Latest commit: ab62dda
Status: ✅  Deploy successful!
Preview URL: https://c99e567f.hey-mainnet.pages.dev
Branch Preview URL: https://hey-refactor-usepostattachme.hey-mainnet.pages.dev

View logs

@github-actions github-actions bot removed the codex label Jun 23, 2025
Copy link

Deploying hey-testnet with  Cloudflare Pages  Cloudflare Pages

Latest commit: ab62dda
Status: ✅  Deploy successful!
Preview URL: https://2880763c.hey-testnet.pages.dev
Branch Preview URL: https://hey-refactor-usepostattachme.hey-testnet.pages.dev

View logs

Copy link

Deploying hey-staging with  Cloudflare Pages  Cloudflare Pages

Latest commit: ab62dda
Status: ✅  Deploy successful!
Preview URL: https://1c4310ea.hey-staging.pages.dev
Branch Preview URL: https://hey-refactor-usepostattachme.hey-staging.pages.dev

View logs

@bigint bigint requested a review from Copilot June 23, 2025 13:41
Copy link
Contributor

@Copilot 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 refactors the post attachment store to use a tracked Zustand store for more precise state subscriptions. Key changes include replacing the base create store with createTrackedStore and updating all consumer hooks and components to call usePostAttachmentStore() without inline selectors.

Reviewed Changes

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

Show a summary per file
File Description
apps/web/src/store/non-persisted/post/usePostAttachmentStore.ts Swapped create for createTrackedStore and updated export
apps/web/src/hooks/useUploadAttachments.tsx Removed selector argument from usePostAttachmentStore()
apps/web/src/hooks/usePostMetadata.tsx Updated store hook call to usePostAttachmentStore()
apps/web/src/hooks/prosekit/usePaste.tsx Updated store hook call to usePostAttachmentStore()
apps/web/src/components/Shared/GlobalModals.tsx Updated store hook call to usePostAttachmentStore()
apps/web/src/components/Post/Actions/Menu/Edit.tsx Updated store hook call to usePostAttachmentStore()
apps/web/src/components/Composer/NewPublication.tsx Updated store hook call to usePostAttachmentStore()
apps/web/src/components/Composer/NewAttachments.tsx Updated store hook call to usePostAttachmentStore()
apps/web/src/components/Composer/LinkPreviews.tsx Updated store hook call to usePostAttachmentStore()
apps/web/src/components/Composer/ChooseThumbnail.tsx Updated store hook call to usePostAttachmentStore()
apps/web/src/components/Composer/Actions/LivestreamSettings/index.tsx Updated store hook call to usePostAttachmentStore()
apps/web/src/components/Composer/Actions/Gif/index.tsx Updated store hook call to usePostAttachmentStore()
apps/web/src/components/Composer/Actions/Attachment.tsx Updated store hook call to usePostAttachmentStore()

@bigint bigint merged commit ceb0dd4 into main Jun 23, 2025
5 checks passed
@bigint bigint deleted the hey/refactor-usepostattachmentstore-implementation branch June 23, 2025 13:42
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.

1 participant