chore(frontend): swap atomFamily to jotai-family to clear jotai v3 deprecation warnings - #6201
chore(frontend): swap atomFamily to jotai-family to clear jotai v3 deprecation warnings#6201ardaerzin wants to merge 1 commit into
Conversation
…precation warnings jotai 2.20 deprecates `atomFamily` from `jotai/utils`; every import logs `[DEPRECATED] atomFamily is deprecated and will be removed in v3` at module load, flooding the browser console. `jotai-family@1.0.1`'s `atomFamily` is a byte-identical fork — same optional `areEqual` second argument, same `.remove`/`.setShouldRemove`/`.getParams`/ `unstable_listen`. Pure specifier swap, no call-site changes. Covers the 71 remaining sites (62 in oss/src, 9 across the annotation, chat, entities, entity-ui and observability packages); web/mobile was already converted. All five packages already declared jotai-family. Verified: pnpm lint-fix clean, tsc --noEmit clean for @agenta/oss and @agenta/ee, and zero remaining atomFamily imports from jotai/utils. Still deprecated and untouched: `loadable` (4 oss sites plus jotai-eager internals), which is not a drop-in replacement.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (71)
Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review. 📝 WalkthroughSummary by CodeRabbit
WalkthroughThe pull request moves ChangesatomFamily import migration
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This change only replaces deprecated imports to remove browser-console noise, with no reported behavior changes or actionable merge-blocking risk remaining after normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
Railway Preview Environment
|
Problem
Every module that imports
atomFamilyfromjotai/utilslogs this at load time:There were 71 such imports left, so opening the app floods the browser console with the same line dozens of times — enough noise to hide real warnings.
web/mobilewas converted in an earlier pass; this finishes the job foross/srcand the remaining packages.Change
Swap the import specifier — nothing else.
jotai-family@1.0.1'satomFamilyis a byte-identical fork of jotai's: same optionalareEqualsecond argument, same.remove/.setShouldRemove/.getParams/unstable_listen. No call-site changes, no behaviour change.71 files — 62 in
oss/src, 9 across@agenta/annotation,@agenta/chat,@agenta/entities,@agenta/entity-ui,@agenta/observability. All five packages already declaredjotai-familyin their manifests, so no dependency changes were needed.Verification
pnpm lint-fix— cleantsc --noEmit— clean for both@agenta/ossand@agenta/eeatomFamilyimported fromjotai/utils— 0 hitsOut of scope
loadableis deprecated in the same jotai release and still used at 4 sites inoss/src. It is not a drop-in swap —unwrapreturns value-or-fallback rather than{state: "loading" | "hasData" | "hasError"}, so each call site needs a rewrite.jotai-eageralso callsloadableinternally, so the warning survives until that dependency updates regardless. Left for a follow-up.