[PR #4230] [MERGED] Upload UI/UX context window check + frontend alert #4565

Closed
opened 2026-02-22 18:36:05 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Mintplex-Labs/anything-llm/pull/4230
Author: @shatfield4
Created: 7/31/2025
Status: Merged
Merged: 8/8/2025
Merged by: @timothycarambat

Base: upload-ui-uxHead: upload-ui-ux-frontend-alert


📝 Commits (10+)

  • b069caf prompt user to embed if exceeds prompt window + handle embed + handle cancel
  • a7f95bc Merge branch 'upload-ui-ux' into upload-ui-ux-frontend-alert
  • a5c5ceb add tokenCountEstimate to workspace_parsed_files + optimizations
  • 46abdd9 use util for path locations + use safeJsonParse
  • 3a8a72f add modal for user decision on overflow of context window
  • 3870639 lint
  • dd03431 dynamic fetching of provider/model combo + inject parsed documents
  • 0323aa4 remove unneeded comments
  • b3f990a popup ui for attaching/removing files + warning to embed + wip fetching states on update
  • 163f116 remove prop drilling, fetch files/limits directly in attach files popup

📊 Changes

19 files changed (+1248 additions, -183 deletions)

View changed files

📝 frontend/src/components/WorkspaceChat/ChatContainer/ChatTooltips/index.jsx (+6 -0)
frontend/src/components/WorkspaceChat/ChatContainer/DnDWrapper/FileUploadWarningModal/index.jsx (+106 -0)
📝 frontend/src/components/WorkspaceChat/ChatContainer/DnDWrapper/index.jsx (+230 -40)
frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/AttachItem/ParsedFilesMenu/index.jsx (+194 -0)
📝 frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/AttachItem/index.jsx (+111 -19)
📝 frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/Attachments/index.jsx (+6 -2)
📝 frontend/src/components/WorkspaceChat/index.jsx (+1 -1)
📝 frontend/src/models/workspace.js (+37 -0)
📝 frontend/src/utils/paths.js (+7 -0)
📝 server/endpoints/workspaces.js (+5 -86)
server/endpoints/workspacesParsedFiles.js (+199 -0)
server/jobs/cleanup-orphan-documents.js (+63 -0)
📝 server/models/workspace.js (+48 -1)
📝 server/models/workspaceParsedFiles.js (+161 -1)
📝 server/prisma/migrations/20250808171557_init/migration.sql (+3 -1)
📝 server/prisma/schema.prisma (+21 -18)
📝 server/utils/BackgroundWorkers/index.js (+28 -14)
📝 server/utils/chats/stream.js (+17 -0)
📝 server/utils/files/index.js (+5 -0)

📄 Description

Pull Request Type

  • feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 🔨 chore
  • 📝 docs

Relevant Issues

resolves #xxx

What is in this change?

  • Handle parsing of files from both workspaces and threads
  • Add endpoints/models for moving and embedding parsed files to avoid uploading documents twice
  • Add UI for context window files in paperclip menu
  • Add warning modal for when files exceed context window and provide options to cancel, continue, or embed all files
  • Respect permissions for files uploaded to corresponding workspace/thread/user

Additional Information

Developer Validations

  • I ran yarn lint from the root of the repo & committed changes
  • Relevant documentation has been updated
  • I have tested my code functionality
  • Docker build succeeds locally

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Mintplex-Labs/anything-llm/pull/4230 **Author:** [@shatfield4](https://github.com/shatfield4) **Created:** 7/31/2025 **Status:** ✅ Merged **Merged:** 8/8/2025 **Merged by:** [@timothycarambat](https://github.com/timothycarambat) **Base:** `upload-ui-ux` ← **Head:** `upload-ui-ux-frontend-alert` --- ### 📝 Commits (10+) - [`b069caf`](https://github.com/Mintplex-Labs/anything-llm/commit/b069caf8df28e98437386759bf15b76bbe5aeb40) prompt user to embed if exceeds prompt window + handle embed + handle cancel - [`a7f95bc`](https://github.com/Mintplex-Labs/anything-llm/commit/a7f95bca8659b6536131847c9166d13d43b5455f) Merge branch 'upload-ui-ux' into upload-ui-ux-frontend-alert - [`a5c5ceb`](https://github.com/Mintplex-Labs/anything-llm/commit/a5c5ceb580943e638a037c87a8038f185062417d) add tokenCountEstimate to workspace_parsed_files + optimizations - [`46abdd9`](https://github.com/Mintplex-Labs/anything-llm/commit/46abdd9989dcdd9d03a92c5bc5e96effd378e4e0) use util for path locations + use safeJsonParse - [`3a8a72f`](https://github.com/Mintplex-Labs/anything-llm/commit/3a8a72fad9eb7690ae2db6a488d327c5914af5a5) add modal for user decision on overflow of context window - [`3870639`](https://github.com/Mintplex-Labs/anything-llm/commit/38706395b7ed650d0438fc32fb776f7826533c48) lint - [`dd03431`](https://github.com/Mintplex-Labs/anything-llm/commit/dd03431f2d71d73e74cd8011d82dc684f4d25f5f) dynamic fetching of provider/model combo + inject parsed documents - [`0323aa4`](https://github.com/Mintplex-Labs/anything-llm/commit/0323aa47bcaa941bba3013c4ac044df343f8cd1d) remove unneeded comments - [`b3f990a`](https://github.com/Mintplex-Labs/anything-llm/commit/b3f990a44da29a33158cf07b5e483e243370a378) popup ui for attaching/removing files + warning to embed + wip fetching states on update - [`163f116`](https://github.com/Mintplex-Labs/anything-llm/commit/163f11664a569eebb94cac8bdb520091a9f59d68) remove prop drilling, fetch files/limits directly in attach files popup ### 📊 Changes **19 files changed** (+1248 additions, -183 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/components/WorkspaceChat/ChatContainer/ChatTooltips/index.jsx` (+6 -0) ➕ `frontend/src/components/WorkspaceChat/ChatContainer/DnDWrapper/FileUploadWarningModal/index.jsx` (+106 -0) 📝 `frontend/src/components/WorkspaceChat/ChatContainer/DnDWrapper/index.jsx` (+230 -40) ➕ `frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/AttachItem/ParsedFilesMenu/index.jsx` (+194 -0) 📝 `frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/AttachItem/index.jsx` (+111 -19) 📝 `frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/Attachments/index.jsx` (+6 -2) 📝 `frontend/src/components/WorkspaceChat/index.jsx` (+1 -1) 📝 `frontend/src/models/workspace.js` (+37 -0) 📝 `frontend/src/utils/paths.js` (+7 -0) 📝 `server/endpoints/workspaces.js` (+5 -86) ➕ `server/endpoints/workspacesParsedFiles.js` (+199 -0) ➕ `server/jobs/cleanup-orphan-documents.js` (+63 -0) 📝 `server/models/workspace.js` (+48 -1) 📝 `server/models/workspaceParsedFiles.js` (+161 -1) 📝 `server/prisma/migrations/20250808171557_init/migration.sql` (+3 -1) 📝 `server/prisma/schema.prisma` (+21 -18) 📝 `server/utils/BackgroundWorkers/index.js` (+28 -14) 📝 `server/utils/chats/stream.js` (+17 -0) 📝 `server/utils/files/index.js` (+5 -0) </details> ### 📄 Description ### Pull Request Type <!-- For change type, change [ ] to [x]. --> - [x] ✨ feat - [ ] 🐛 fix - [ ] ♻️ refactor - [ ] 💄 style - [ ] 🔨 chore - [ ] 📝 docs ### Relevant Issues <!-- Use "resolves #xxx" to auto resolve on merge. Otherwise, please use "connect #xxx" --> resolves #xxx ### What is in this change? <!-- Describe the changes in this PR that are impactful to the repo. --> - Handle parsing of files from both workspaces and threads - Add endpoints/models for moving and embedding parsed files to avoid uploading documents twice - Add UI for context window files in paperclip menu - Add warning modal for when files exceed context window and provide options to cancel, continue, or embed all files - Respect permissions for files uploaded to corresponding workspace/thread/user ### Additional Information <!-- Add any other context about the Pull Request here that was not captured above. --> ### Developer Validations <!-- All of the applicable items should be checked. --> - [x] I ran `yarn lint` from the root of the repo & committed changes - [x] Relevant documentation has been updated - [x] I have tested my code functionality - [x] Docker build succeeds locally --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-22 18:36:05 -05:00
yindo closed this issue 2026-02-22 18:36:05 -05:00
yindo changed title from [PR #4230] Upload UI/UX context window check + frontend alert to [PR #4230] [MERGED] Upload UI/UX context window check + frontend alert 2026-06-05 15:19:12 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#4565