Skip to content

fix(zustand): use v5-compatible equality hook#29768

Open
Adarsh9977 wants to merge 1 commit into
calcom:mainfrom
Adarsh9977:dep-zustand
Open

fix(zustand): use v5-compatible equality hook#29768
Adarsh9977 wants to merge 1 commit into
calcom:mainfrom
Adarsh9977:dep-zustand

Conversation

@Adarsh9977

Copy link
Copy Markdown
Contributor

What does this PR do?

  • Replaces deprecated Zustand useStore equality function usage with useStoreWithEqualityFn from zustand/traditional.
  • Keeps custom equality selector behavior intact for booking actions, Booker, and weekly calendar store contexts.
  • Updates the affected store provider imports for Zustand v5 compatibility.

Visual Demo (For contributors especially)

A visual demonstration is strongly recommended, for both the original and new change (video / image - any one).

Video Demo (if applicable):

  • Show screen recordings of the issue or feature.
  • Demonstrate how to reproduce the issue, the behavior before and after the change.

Image Demo (if applicable):

  • Add side-by-side screenshots of the original and updated change.
  • Highlight any significant change(s).

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

  • Are there environment variables that should be set?
  • What are the minimal test data to have?
  • What is expected (happy path) to have (input and output)?
  • Any other important info that could help to test that PR

@github-actions

Copy link
Copy Markdown
Contributor

Welcome to Cal.diy, @Adarsh9977! Thanks for opening this pull request.

A few things to keep in mind:

  • This is Cal.diy, not Cal.com. Cal.diy is a community-driven, fully open-source fork of Cal.com licensed under MIT. Your changes here will be part of Cal.diy — they will not be deployed to the Cal.com production app.
  • Please review our Contributing Guidelines if you haven't already.
  • Make sure your PR title follows the Conventional Commits format.

A maintainer will review your PR soon. Thanks for contributing!

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d1ca78e2-4b98-4387-a853-95c53fb9456c

📥 Commits

Reviewing files that changed from the base of the PR and between f004349 and 9620340.

📒 Files selected for processing (3)
  • apps/web/components/booking/actions/BookingActionsStoreProvider.tsx
  • packages/features/bookings/Booker/BookerStoreProvider.tsx
  • packages/features/calendars/weeklyview/state/store.ts

📝 Walkthrough

Walkthrough

Updated booking actions, Booker, and weekly calendar Zustand integrations to use useStoreWithEqualityFn instead of useStore. Existing selectors and optional equality functions remain part of the store hook interfaces, and the Booker initialization selector now uses the same equality-aware subscription mechanism.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: migrating Zustand usage to the v5-compatible equality hook.
Description check ✅ Passed The description matches the code changes and objectives, describing the switch to useStoreWithEqualityFn across the affected providers.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant