Skip to content

chore(frontend): swap atomFamily to jotai-family to clear jotai v3 deprecation warnings - #6201

Open
ardaerzin wants to merge 1 commit into
release/v0.113.0from
chore/jotai-family-atomfamily
Open

chore(frontend): swap atomFamily to jotai-family to clear jotai v3 deprecation warnings#6201
ardaerzin wants to merge 1 commit into
release/v0.113.0from
chore/jotai-family-atomfamily

Conversation

@ardaerzin

Copy link
Copy Markdown
Contributor

Problem

Every module that imports atomFamily from jotai/utils logs this at load time:

[DEPRECATED] atomFamily is deprecated and will be removed in v3.
Please use the `jotai-family` package instead

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/mobile was converted in an earlier pass; this finishes the job for oss/src and the remaining packages.

Change

Swap the import specifier — nothing else.

-import {atomFamily, selectAtom} from "jotai/utils"
+import {selectAtom} from "jotai/utils"
+import {atomFamily} from "jotai-family"

jotai-family@1.0.1's atomFamily is a byte-identical fork of jotai's: same optional areEqual second 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 declared jotai-family in their manifests, so no dependency changes were needed.

Verification

  • pnpm lint-fix — clean
  • tsc --noEmit — clean for both @agenta/oss and @agenta/ee
  • Repo-wide grep for atomFamily imported from jotai/utils — 0 hits

Out of scope

loadable is deprecated in the same jotai release and still used at 4 sites in oss/src. It is not a drop-in swap — unwrap returns value-or-fallback rather than {state: "loading" | "hasData" | "hasError"}, so each call site needs a rewrite. jotai-eager also calls loadable internally, so the warning survives until that dependency updates regardless. Left for a follow-up.

…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.
@dosubot dosubot Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Aug 22, 2026
@vercel

vercel Bot commented Aug 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agenta-documentation Ready Ready Preview Aug 22, 2026 9:30am

Request Review

@dosubot dosubot Bot added dependencies Dependencies javascript Pull requests that update javascript code labels Aug 22, 2026
@coderabbitai

coderabbitai Bot commented Aug 22, 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: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: ac342d31-2377-4d6e-a178-5e66dbe264b1

📥 Commits

Reviewing files that changed from the base of the PR and between cce6501 and 4247099.

📒 Files selected for processing (71)
  • web/oss/src/components/AgentChatSlice/assets/attachmentMedia.ts
  • web/oss/src/components/AgentChatSlice/state/fileLinks.ts
  • web/oss/src/components/AgentChatSlice/state/liveness.ts
  • web/oss/src/components/AgentChatSlice/state/projectSessions.ts
  • web/oss/src/components/AgentChatSlice/state/sessions.ts
  • web/oss/src/components/AgentChatSlice/state/turnCaptures.ts
  • web/oss/src/components/Drives/chatFileRefs.tsx
  • web/oss/src/components/EvalRunDetails/atoms/annotations.ts
  • web/oss/src/components/EvalRunDetails/atoms/compare.ts
  • web/oss/src/components/EvalRunDetails/atoms/invocationTraceSummary.ts
  • web/oss/src/components/EvalRunDetails/atoms/metrics.ts
  • web/oss/src/components/EvalRunDetails/atoms/query.ts
  • web/oss/src/components/EvalRunDetails/atoms/references.ts
  • web/oss/src/components/EvalRunDetails/atoms/runDerived.ts
  • web/oss/src/components/EvalRunDetails/atoms/runMetrics.ts
  • web/oss/src/components/EvalRunDetails/atoms/scenarioColumnValues.ts
  • web/oss/src/components/EvalRunDetails/atoms/scenarioSteps.ts
  • web/oss/src/components/EvalRunDetails/atoms/scenarioTestcase.ts
  • web/oss/src/components/EvalRunDetails/atoms/table/columnAccess.ts
  • web/oss/src/components/EvalRunDetails/atoms/table/columns.ts
  • web/oss/src/components/EvalRunDetails/atoms/table/run.ts
  • web/oss/src/components/EvalRunDetails/atoms/table/scenarios.ts
  • web/oss/src/components/EvalRunDetails/atoms/table/state.ts
  • web/oss/src/components/EvalRunDetails/atoms/table/testcases.ts
  • web/oss/src/components/EvalRunDetails/atoms/testsetDetails.ts
  • web/oss/src/components/EvalRunDetails/atoms/traces.ts
  • web/oss/src/components/EvalRunDetails/atoms/variantConfig.ts
  • web/oss/src/components/EvalRunDetails/components/views/ConfigurationView/index.tsx
  • web/oss/src/components/EvalRunDetails/components/views/SingleScenarioViewerPOC/ScenarioAnnotationPanel/atoms.ts
  • web/oss/src/components/EvalRunDetails/etl/scenarioFilterState.ts
  • web/oss/src/components/EvalRunDetails/evaluationPreviewTableStore.ts
  • web/oss/src/components/EvalRunDetails/hooks/useScenarioStepsSelectors.ts
  • web/oss/src/components/EvalRunDetails/state/evalType.ts
  • web/oss/src/components/EvaluationRunsTablePOC/atoms/runSummaries.ts
  • web/oss/src/components/EvaluationRunsTablePOC/atoms/tableStore.ts
  • web/oss/src/components/Evaluators/Table/assets/evaluatorColumns.tsx
  • web/oss/src/components/Playground/Components/Modals/RefinePromptModal/store/refinePromptStore.ts
  • web/oss/src/components/Playground/PlaygroundTokenPath/chainContext.ts
  • web/oss/src/components/References/atoms/metricBlueprint.ts
  • web/oss/src/components/References/atoms/resolvedMetricLabels.ts
  • web/oss/src/components/References/atoms/resolvedMetricPaths.ts
  • web/oss/src/components/SharedDrawers/AnnotateDrawer/assets/hooks/useEvaluatorSchemas.ts
  • web/oss/src/components/VariantsComponents/Table/assets/registryColumns.tsx
  • web/oss/src/components/VariantsComponents/store/selectionAtoms.ts
  • web/oss/src/lib/hooks/usePreviewEvaluations/index.ts
  • web/oss/src/lib/onboarding/atoms.ts
  • web/oss/src/lib/onboarding/widget/store.ts
  • web/oss/src/state/customWorkflow/modalAtoms.ts
  • web/oss/src/state/entities/shared/createEntityController.ts
  • web/oss/src/state/entities/shared/createEntityDraftState.ts
  • web/oss/src/state/entities/shared/createPaginatedEntityStore.ts
  • web/oss/src/state/entities/shared/createStatefulEntityAtomFamily.ts
  • web/oss/src/state/entities/testcase/columnState.ts
  • web/oss/src/state/entities/testcase/displayRows.ts
  • web/oss/src/state/entities/testcase/testcaseEntity.ts
  • web/oss/src/state/entities/testset/controller.ts
  • web/oss/src/state/entities/testset/revisionEntity.ts
  • web/oss/src/state/entities/testset/store.ts
  • web/oss/src/state/observability/atoms.ts
  • web/oss/src/state/queries/atoms/fetcher.ts
  • web/oss/src/state/testsetSelection/atoms.ts
  • web/oss/src/state/workspace/atoms/selectors.ts
  • web/packages/agenta-annotation/src/state/controllers/annotationFormController.ts
  • web/packages/agenta-chat/src/state/messageStamps.ts
  • web/packages/agenta-chat/src/state/turnClock.ts
  • web/packages/agenta-entities/src/workflow/state/subscriptionStatus.ts
  • web/packages/agenta-entity-ui/src/DrillInView/bridges/useWorkflowReferenceBridge.ts
  • web/packages/agenta-entity-ui/src/drive/SessionFilesPane.tsx
  • web/packages/agenta-observability/src/state/controls.ts
  • web/packages/agenta-observability/src/state/queries.ts
  • web/packages/agenta-observability/src/state/selectors.ts

Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review.


📝 Walkthrough

Summary by CodeRabbit

  • Refactor
    • Updated internal state management imports across chat, evaluation, observability, workflow, and entity features.
    • No user-facing functionality, behavior, or interface changes.
    • Existing attachment handling, file access, evaluations, sessions, and selectors continue to work as before.

Walkthrough

The pull request moves atomFamily imports from jotai/utils to jotai-family across application state modules and shared packages. Other Jotai imports and atom-family logic remain unchanged.

Changes

atomFamily import migration

Layer / File(s) Summary
Agent chat atom imports
web/oss/src/components/AgentChatSlice/..., web/oss/src/components/Drives/chatFileRefs.tsx
Agent chat and drive modules now import atomFamily from jotai-family.
Evaluation details atom imports
web/oss/src/components/EvalRunDetails/...
Evaluation atoms, tables, views, ETL state, and selectors now use jotai-family for atomFamily.
Evaluation and component state imports
web/oss/src/components/EvaluationRunsTablePOC/..., web/oss/src/components/Evaluators/..., web/oss/src/components/Playground/..., web/oss/src/components/References/..., web/oss/src/components/SharedDrawers/..., web/oss/src/components/VariantsComponents/..., web/oss/src/lib/...
Related component and library modules now source atomFamily from jotai-family.
OSS state and entity imports
web/oss/src/state/...
Shared entity, testset, observability, query, selection, and workspace modules now use the standalone package.
Shared package state imports
web/packages/agenta-annotation/..., web/packages/agenta-chat/..., web/packages/agenta-entities/..., web/packages/agenta-entity-ui/..., web/packages/agenta-observability/...
Package state modules now import atomFamily from jotai-family; other utility imports remain in their existing modules.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 42470

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)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes replacing deprecated atomFamily imports with jotai-family imports.
Description check ✅ Passed The description accurately explains the deprecation warning, import changes, scope, verification, and out-of-scope work.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 50 files. (21 skipped: 21 over the file limit.)
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 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/jotai-family-atomfamily

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.

@github-actions

Copy link
Copy Markdown
Contributor

Railway Preview Environment

Preview URL https://gateway-pr-6201.up.railway.app/w
Project agenta-oss-clone-spike
Image tag pr-6201-0546339
Status Deployed
Railway logs Open logs
Workflow logs View workflow run
Updated at 2026-08-22T09:41:40.929Z

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

Labels

dependencies Dependencies javascript Pull requests that update javascript code size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant