LibreChat/client/src/utils
Dustin Healy d65c228cea fix(mcp): address second round of Codex review findings
Fixes 13 correctness issues flagged in the second Codex review pass on the
feat/mcp-apps-support branch.

Core server-side changes: resource URI and model-only-tool caches are now
scoped per user/server key so OAuth and user-sourced servers with differing
tool lists cannot cross-contaminate each other. The model-only visibility check
in appToolCall now blocks iframe-initiated calls to tools declared as
visibility: ['model']. appToolCall also runs processMCPEnv to resolve runtime
env/user vars and set request headers before forwarding to tools/call, and
throws for servers that require per-call OBO token minting (unsupported in this
path). parsers.ts now includes structuredContent in the synthetic resourceId
hash to guarantee uniqueness across repeated same-app calls with different
results, skips the early-return guard when a synthetic app resource is present,
appends the ui{} marker to the synthetic text block, and forwards the raw
content array alongside structuredContent so text/image-only app results are
not silently dropped.

Client-side changes: fetchMCPResourceHtml now returns the full _meta.ui from
the resources/read content item so CSP and permissions come from the canonical
location in the spec rather than the tool descriptor. useAppBridge falls back
to the resource-level values when the read result carries no overrides.
The sandbox retry interval clears when sandbox-resource-ready arrives, fixing
the race where the ready notification arrived before the transport was
connected. The size-change handler in MCPUIResource and UIResourceCarousel now
applies the reported height to the wrapper element, and MCPUIResource's iframe
style uses height: 100% so inline apps are not clipped. The carousel loading
placeholder now uses the localized key. Dockerfile.multi copies the sandbox
from client/dist (the Vite output) rather than the source tree, which is the
only path present in the multi-stage runtime image. baseUriDomains from the
CSP config are now honoured in buildCspPolicy instead of always emitting
base-uri 'self'. serverResources was removed from the AppBridge capabilities
advertisement because no resource handlers are registered on the bridge.
2026-06-23 18:18:51 -07:00
..
__tests__ 🗜️ fix: Support Windows ZIP MIME Uploads (#13794) 2026-06-16 11:19:06 -04:00
agents.tsx
artifacts.ts 🛡️ fix: Harden Artifact Routing Lookups (#13069) 2026-05-11 15:42:44 -04:00
buildDefaultConvo.ts
buildTree.ts
citations.ts
cleanupPreset.ts
cn.ts
collection.ts 📁 refactor: Prompts UI (#11570) 2026-03-22 16:56:22 -04:00
configHtml.ts feat: Surface Model Spec Branding on Landing and Selector (#13662) 2026-06-10 21:02:22 -04:00
conversation.ts 🧯 fix: Harden Data Retention Semantics (#13049) 2026-05-19 21:58:42 -04:00
conversationTags.spec.ts 👷 ci: Type-check the Client Workspace (#13560) 2026-06-06 18:40:31 -04:00
conversationTags.ts
convos.fakeData.ts
convos.spec.ts 🔖 feat: Add Pinned Conversations (#13492) 2026-06-17 20:26:55 -04:00
convos.ts 🔖 feat: Add Pinned Conversations (#13492) 2026-06-17 20:26:55 -04:00
createChatSearchParams.spec.ts
createChatSearchParams.ts
downloadFile.ts 🧭 fix: Navigate Signed CDN Downloads (#12998) 2026-05-07 13:36:57 -04:00
drafts.ts 🫧 refactor: Clear Drafts and Surface Error on Expired SSE Stream (#12309) 2026-03-19 14:51:28 -04:00
email.ts
endpoints.spec.ts
endpoints.ts 🛬 fix: Prevent Viewed Conversations from Re-Arming the Soft Default Spec (#13699) 2026-06-11 20:52:17 -04:00
errors.ts
favoritesError.ts 📜 feat: Skills UI + Initial E2E CRUD / Sharing (#12580) 2026-04-25 04:02:00 -04:00
files.ts 🧩 feat: Redesign Tool Call UI with Contextual Icons, Smart Grouping, and Rich Output Rendering (#12163) 2026-03-25 12:31:39 -04:00
forms.tsx
getDefaultEndpoint.ts
getLoginError.ts
getThemeFromEnv.js
groupToolCalls.ts 🧩 feat: Redesign Tool Call UI with Contextual Icons, Smart Grouping, and Rich Output Rendering (#12163) 2026-03-25 12:31:39 -04:00
heicConverter.spec.ts ⚙️ refactor: Lazy-load HEIC upload conversion (#13638) 2026-06-10 08:47:17 -04:00
heicConverter.ts ⚙️ refactor: Lazy-load HEIC upload conversion (#13638) 2026-06-10 08:47:17 -04:00
icons.ts 🖼️ fix: Preserve Model Spec Icon URLs (#13370) 2026-05-30 09:50:27 -04:00
imageResize.ts 👷 ci: Type-check the Client Workspace (#13560) 2026-06-06 18:40:31 -04:00
index.ts feat(mcp-apps): spec compliance pass on AppBridge implementation 2026-06-23 14:16:10 -07:00
json.ts
languages.ts
latex.spec.ts
latex.ts
localStorage.ts
logger.ts
map.ts
markdown.ts 🔄 refactor: Migrate to react-resizable-panels v4 with Artifacts Header polish (#12356) 2026-03-22 02:21:27 -04:00
mcpApps.ts fix(mcp): address second round of Codex review findings 2026-06-23 18:18:51 -07:00
memory.ts
mermaid.ts 🧜‍♂️ fix: Preserve Mermaid foreignObject HTML in Sanitized SVG (#12819) 2026-04-29 09:37:38 +09:00
messages.ts feat: Show Message Timestamps on Hover (#13709) 2026-06-14 09:39:52 -04:00
presets.ts
previewCache.ts
promptGroups.ts 📁 refactor: Prompts UI (#11570) 2026-03-22 16:56:22 -04:00
prompts.ts
redirect.ts
resetConvo.ts
resources.ts 🔗 feat: Add Granular Access Control to Shared Links via ACL System (#13051) 2026-06-03 14:17:17 -04:00
roles.ts 🔗 feat: Add Granular Access Control to Shared Links via ACL System (#13051) 2026-06-03 14:17:17 -04:00
routes.ts
scaleImage.ts 🧩 feat: Redesign Tool Call UI with Contextual Icons, Smart Grouping, and Rich Output Rendering (#12163) 2026-03-25 12:31:39 -04:00
share.ts
subagentContent.ts 🪆 feat: Subagent configuration in Agent Builder (#12725) 2026-04-25 04:02:01 -04:00
textarea.ts
tilde.spec.ts 🔢 fix: Prevent "approximately" tildes from rendering as markdown subscript (#13743) 2026-06-14 16:59:12 -04:00
tilde.ts 🔢 fix: Prevent "approximately" tildes from rendering as markdown subscript (#13743) 2026-06-14 16:59:12 -04:00
timestamps.ts
tokens.spec.ts 🩹 fix: Bill Anthropic Prompt-Cache Tokens Once (#13798) 2026-06-16 14:28:48 -04:00
tokens.ts 🪙 fix: Correct Context Usage Gauge After Summarization (#13744) 2026-06-14 18:23:30 -04:00
toolLabels.ts 🖥️ style: Render Bash PTC Calls With Bash UI (#13046) 2026-05-10 14:09:04 -04:00