Skip to content

🖼️ fix: Upgrade Framer Motion for Vite 8 Compatibility#13512

Merged
danny-avila merged 1 commit into
danny-avila:devfrom
newjersey:dlew/update-framer-motion
Jun 4, 2026
Merged

🖼️ fix: Upgrade Framer Motion for Vite 8 Compatibility#13512
danny-avila merged 1 commit into
danny-avila:devfrom
newjersey:dlew/update-framer-motion

Conversation

@dlew

@dlew dlew commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Summary

LibreChat recently updated Vite (see 7dba640).

The older version of framer-motion we're using is incompatible with this newer version of Vite; if you try to use it, you get the error "e is not a function."

(One easy way to reproduce: try to enable 2FA on your account.)

Updating to the latest framer-motion fixes this issue.

Resolves #13511

Change Type

  • Bug fix (non-breaking change which fixes an issue)

Testing

  1. Deploy the app (not dev/watch builds)
  2. Go to account settings
  3. Click on the "enable 2FA" buton

Before the fix, it would crash the client. Afterwards, it should work.

Checklist

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • My changes do not introduce new warnings
  • Local unit tests pass with my changes

LibreChat recently updated Vite (see 7dba640).

The older version of framer-motion we're using is incompatible with
this newer version of Vite; if you try to use it, you get the error
"e is not a function."

(One easy way to reproduce: try to enable 2FA on your account.)

Updating to the latest framer-motion fixes this issue.
@danny-avila
danny-avila changed the base branch from main to dev June 4, 2026 16:04
@danny-avila

Copy link
Copy Markdown
Owner

thanks! sorry I missed this

@danny-avila danny-avila changed the title fix: update framer-motion to avoid crashes 🖼️ fix: Upgrade Framer Motion for Vite 8 Compatibility Jun 4, 2026
@danny-avila
danny-avila merged commit a11751e into danny-avila:dev Jun 4, 2026
18 checks passed
danny-avila added a commit that referenced this pull request Jun 4, 2026
Add a Playwright mock e2e spec that opens Settings -> Account -> Enable 2FA
and asserts the framer-motion dialog renders. Reproduces the Vite /
framer-motion incompatibility from issue #13511: on the current build the
dialog crashes the client with "e is not a function" and never renders, so
this spec fails until the framer-motion bump in #13512 is merged.
danny-avila added a commit that referenced this pull request Jun 4, 2026
Add a Playwright mock e2e spec that opens Settings -> Account -> Enable 2FA
and asserts the framer-motion dialog renders. Reproduces the Vite /
framer-motion incompatibility from issue #13511: on the current build the
dialog crashes the client with "e is not a function" and never renders, so
this spec fails until the framer-motion bump in #13512 is merged.
@dlew
dlew deleted the dlew/update-framer-motion branch June 4, 2026 17:28
deka added a commit to la-fabrique/LibreChat that referenced this pull request Jun 5, 2026
* 🌍 i18n: Update translation.json with latest translations (danny-avila#13505)

* 🎭 test: Run Mock E2E Suite Through `createRun` With In-Process Fake Model (danny-avila#13508)

* 🎭 test: Run Mock E2E Suite Through createRun With In-Process Fake Model

Replace the standalone HTTP mock LLM server with an in-process fake model
injected into the real createRun -> Run.create pipeline via
run.Graph.overrideTestModel, so the mock suite exercises the agents
integration end-to-end without a live provider or a separate server.

- Bump @librechat/agents to 3.2.2 for the FakeChatModel/createFakeStreamingLLM exports
- Add an env-gated applyTestRunHook seam in packages/api createRun (no /api changes)
- Add e2e/setup/fake-model.js to drive default replies + the skill-authoring tool-call flow
- Drop the mock-llm webServer from playwright.config.mock.ts and set LIBRECHAT_TEST_RUN_HOOK

* 🧹 test: Retire Standalone Mock LLM Server From E2E Recorder

Migrate the `--profile=mock` recorder onto the same in-process fake model
as the Playwright mock suite, then delete the now-unused HTTP mock server
so the fake-LLM logic lives in a single place.

- Point record.js mock profile at the fake model via LIBRECHAT_TEST_RUN_HOOK
- Remove the mock-llm-server spawn/wait and MOCK_LLM_PORT plumbing from record.js
- Delete e2e/setup/mock-llm-server.js (e2e/setup/fake-model.js is now the only source)
- Update e2e/README.md to describe the in-process fake LLM

* 🏷️ ci: Rename Playwright Mock E2E Check to Playwright E2E Tests

* 🧷 fix: Bind Agent File Context to Current Turn (danny-avila#13506)

* fix: Bind agent file context to current turn

* fix: Avoid duplicating agent file context

* fix: Export agent file context prepender

* test: Use exported file context prepender

* fix: Keep file context transient for memory and counts

* 💼 fix: Harden Shared-Link Message Sanitization with an Allowlist (danny-avila#13510)

* fix: harden shared-link message sanitization with an allowlist

Public shared links built their message payload via `{ ...message }` and
`{ ...attachment }` spreads, which exposed internal fields that are never
needed by the shared view:

- message: endpoint, conversationSignature, clientId, plugin(s), metadata
- attachments: filepath, storageKey, metadata, and other internal keys

Replace the passthrough with an allowlist so only render-relevant fields
(sender, text, content, token/feedback/error flags, and sanitized
attachments) are surfaced. Assistant model ids remain anonymized; other
model names are omitted rather than disclosed.

Also add `tenantId?: string` to ISharedLink, matching the field already
read by the shared-link access middleware for multi-tenant deployments.

* fix: preserve shared render data; sanitize by denylist (review feedback)

Address Codex/Copilot review on the shared-link sanitization:

- The tight attachment allowlist dropped tool-call render data. Switch to a
  denylist of storage/identity-internal fields (filepath, storageKey, user,
  tenantId, source, metadata, …) so toolCallId, tool payloads (web_search /
  file_search / etc.), and dimensions are preserved while internals are stripped.
- Preserve user-uploaded message.files (previously dropped entirely) via the
  same denylist sanitizer, so shared links keep uploaded images/documents.
- Introduce a dedicated SharedMessage / SharedFile type and use it for
  SharedMessagesResult.messages instead of casting the allowlisted object to
  IMessage, so omitted fields are caught at compile time.

Extends the regression test to assert toolCallId, web_search payload, and
files survive while filepath/storageKey/user/tenantId/metadata are removed.

* fix: keep render URLs + skill badges, drop private feedback (review round 2)

Address Codex round-2 findings on shared-link sanitization:

- filepath is the URL the share renderer loads (Files.tsx uses
  file.preview ?? file.filepath; image attachments render only when filepath
  is set). Drop it from the denylist so shared images/downloads still render;
  storageKey (the raw object key) stays stripped.
- Preserve manualSkills / alwaysAppliedSkills so SkillPills still render for
  skill-assisted turns (non-sensitive UI metadata).
- Remove feedback from the shared projection — it is the owner's private
  rating/notes, is never rendered in the share view, and must not be exposed
  to anyone holding the share URL.

Regression test updated to assert filepath/skills survive and feedback is
omitted.

* fix: anonymize file ids + preserve message iconURL (review round 3)

- Persisted message.files records can carry the original conversationId/messageId.
  Attachments were already rewritten to the anonymized ids; apply the same
  rewrite to files so shared user-uploaded files don't expose the real ids.
- Preserve message.iconURL (read by Share/MessageIcon.tsx) so shared assistant/
  custom-endpoint turns keep their custom avatar instead of falling back to the
  generic icon.

Regression test asserts the shared file's conversationId is the anonymized id
and that iconURL survives.

* 🖼️ fix: Upgrade Framer Motion for Vite 8 Compatibility (danny-avila#13512)

LibreChat recently updated Vite (see 7dba640).

The older version of framer-motion we're using is incompatible with
this newer version of Vite; if you try to use it, you get the error
"e is not a function."

(One easy way to reproduce: try to enable 2FA on your account.)

Updating to the latest framer-motion fixes this issue.

* 🧪 test: Add E2E Regression For 2FA framer-motion Crash (danny-avila#13513)

Add a Playwright mock e2e spec that opens Settings -> Account -> Enable 2FA
and asserts the framer-motion dialog renders. Reproduces the Vite /
framer-motion incompatibility from issue danny-avila#13511: on the current build the
dialog crashes the client with "e is not a function" and never renders, so
this spec fails until the framer-motion bump in danny-avila#13512 is merged.

* 🪧 chore: Generalize Project Name Placeholder (danny-avila#13514)

* 📦 chore: npm audit fix (danny-avila#13515)

- Upgraded @langchain/langgraph from 1.3.2 to 1.3.4
- Upgraded @langchain/langgraph-checkpoint from 1.0.2 to 1.0.4
- Upgraded @langchain/langgraph-sdk from 1.9.4 to 1.9.15
- Updated uuid from 10.0.0 to 14.0.0 across multiple packages
- Upgraded @langchain/protocol from 0.0.15 to 0.0.16
- Upgraded @remix-run/router from 1.23.2 to 1.23.3
- Upgraded hono from 4.12.18 to 4.12.23
- Upgraded react-router from 6.30.3 to 6.30.4

* 📜 feat: Improve Skill Authoring Guidance (danny-avila#13517)

* feat: Improve skill authoring guidance

* test: Guard tool description lengths

* fix: Align skill template guidance

* fix: Satisfy advisory limit test lint

* fix: Transform LangGraph ESM in Jest

* 🪡 fix: Handle Missing Skill File Upsert Metadata (danny-avila#13520)

---------

Co-authored-by: Danny Avila <danny@librechat.ai>
Co-authored-by: Dan Lew <dlew@users.noreply.github.com>
fuuuzzy pushed a commit to fuuuzzy/LibreChat that referenced this pull request Jun 18, 2026
…3512)

LibreChat recently updated Vite (see 7dba640).

The older version of framer-motion we're using is incompatible with
this newer version of Vite; if you try to use it, you get the error
"e is not a function."

(One easy way to reproduce: try to enable 2FA on your account.)

Updating to the latest framer-motion fixes this issue.
fuuuzzy pushed a commit to fuuuzzy/LibreChat that referenced this pull request Jun 18, 2026
…3513)

Add a Playwright mock e2e spec that opens Settings -> Account -> Enable 2FA
and asserts the framer-motion dialog renders. Reproduces the Vite /
framer-motion incompatibility from issue danny-avila#13511: on the current build the
dialog crashes the client with "e is not a function" and never renders, so
this spec fails until the framer-motion bump in danny-avila#13512 is merged.
ThomasVuNguyen pushed a commit to ThomasVuNguyen/LibreChat that referenced this pull request Jul 15, 2026
…3512)

LibreChat recently updated Vite (see 7dba640).

The older version of framer-motion we're using is incompatible with
this newer version of Vite; if you try to use it, you get the error
"e is not a function."

(One easy way to reproduce: try to enable 2FA on your account.)

Updating to the latest framer-motion fixes this issue.
ThomasVuNguyen pushed a commit to ThomasVuNguyen/LibreChat that referenced this pull request Jul 15, 2026
…3513)

Add a Playwright mock e2e spec that opens Settings -> Account -> Enable 2FA
and asserts the framer-motion dialog renders. Reproduces the Vite /
framer-motion incompatibility from issue danny-avila#13511: on the current build the
dialog crashes the client with "e is not a function" and never renders, so
this spec fails until the framer-motion bump in danny-avila#13512 is merged.
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.

[Bug]: any use of framer-motion crashes the client

2 participants