Skip to content

Jotai 12#18160

Merged
charlesBochet merged 25 commits intomainfrom
jotai-12
Feb 23, 2026
Merged

Jotai 12#18160
charlesBochet merged 25 commits intomainfrom
jotai-12

Conversation

@charlesBochet
Copy link
Copy Markdown
Member

No description provided.

charlesBochet and others added 18 commits February 20, 2026 11:21
- Migrate 22 client-config states from createState to createStateV2
- Update ~55 consumer files to use V2 hooks (useRecoilValueV2, useRecoilStateV2, useSetRecoilStateV2)
- Convert useRecoilCallback to useCallback + jotaiStore.get for captchaState in useRequestFreshCaptchaToken
- Simplify clearSession in useAuth by removing snapshot read/restore for client-config states (now Jotai, unaffected by goToRecoilSnapshot)
- Update test files to use jotaiStore.set for migrated states

Co-authored-by: Cursor <cursoragent@cursor.com>
…otai V2

Migrate 3 states (objectMetadataItemsState, lastFieldMetadataItemUpdateState,
shouldAppBeLoadingState) and 12 selectors/family selectors to Jotai V2.

Extends the V2 abstraction layer:
- Add SelectorV2 and FamilySelectorV2 support to SelectorGetterV2 type
- Extend buildGetHelper to handle SelectorV2 and FamilySelectorV2

Update ~90 consumer files across the codebase to use V2 hooks
(useRecoilValueV2, useFamilySelectorValueV2, useSetRecoilStateV2)
and jotaiStore.get/set for callbacks. Bridge remaining Recoil selectors
that depend on migrated states via jotaiStore.get.

Co-authored-by: Cursor <cursoragent@cursor.com>
- Migrate objectPermissionsFamilySelector to createFamilySelectorV2 (all
  deps are Jotai V2; removes stale Recoil bridge)
- Update useShouldActionBeRegisteredParams to use jotaiStore.get instead
  of useRecoilCallback for objectPermissionsFamilySelector
- Migrate recordStoreIdentifiersFamilySelector to createFamilySelectorV2
  using recordStoreFamilyStateV2 (kept in sync); update consumer
  useCommandMenuContextChips to use useFamilySelectorValueV2
- Fix useBrowsingContext to use store from useStore() instead of global
  jotaiStore for objectMetadataItemsState
- Add TODO comment to visibleRecordFieldsComponentSelector acknowledging
  temporary jotaiStore bridge (currentRecordFieldsComponentState still Recoil)
- Simplify createJotaiCookieStorage setItem by computing valueToStore
  first and removing the isNullish variable
- Revert unrelated SDK improvements commit (app-typecheck.ts and other
  SDK files not linked to this Jotai migration PR)

Co-authored-by: Cursor <cursoragent@cursor.com>
Extract content into an inner component so hooks are only called when
objectMetadataId is defined, preventing the render-time throw
("Object metadata id is missing from current view") that fires when the
filter dropdown renders before core views have been fetched.

Co-authored-by: Cursor <cursoragent@cursor.com>
- Resolve conflict in useOpenRecordInCommandMenu.ts (keep jotaiStore + add CommandMenuPages)
- Resolve conflict in useFrontComponentExecutionContext.ts (keep useRecoilValueV2, add new imports from main)
- Resolve conflict in MetadataProviderEffect.tsx (adapt split setCoreViews logic to Jotai V2 store.set/get)
- Accept deletion of SettingsAIRouterSettings.tsx from main

Co-authored-by: Cursor <cursoragent@cursor.com>
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Feb 22, 2026

Too many files changed for review. (529 files found, 100 file limit)

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 529 files

Note: This PR contains a large number of files. cubic only reviews up to 75 files per PR, so some files may not have been reviewed.

@charlesBochet charlesBochet merged commit b51eb64 into main Feb 23, 2026
40 of 48 checks passed
@charlesBochet charlesBochet deleted the jotai-12 branch February 23, 2026 11:01
@twenty-eng-sync
Copy link
Copy Markdown

Hey @charlesBochet! After you've done the QA of your Pull Request, you can mark it as done here. Thank you!

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