* fix: knowledge base files stay on "Uploading" instead of switching to "Processing"
A file added to a knowledge base is uploaded in a moment, and the long wait after that is the text extraction, which the file list still called "Uploading". Nothing updated on its own either, so the only way to find out whether a file had moved on or finished was to leave the knowledge base and come back. The file now switches to "Processing" as soon as it has reached the server, and the list keeps itself current until the file is ready, so slow text extraction no longer looks like a stuck upload. Adding a folder or a web page goes through a different flow and is not touched here.
* refac: inline the processing status update for knowledge base uploads
Moves the status update straight into the upload call with no change in behaviour.
* refac: drop a stray blank line and comment from the upload handler
Removes a blank line and a comment the previous follow-up added, with no change in behaviour.
* fix: files selected together for a knowledge base only appear one at a time
Selecting or dropping several files into a knowledge base showed a row for the first file only. The others got no row at all until the one before them had finished processing, which with slow text extraction can be many minutes per file, so they looked lost. Every selected file now shows up as "Uploading" straight away, in the order they will be uploaded, and keeps its row until it has been added to the knowledge base. Each file still waits for the previous one to finish processing, as before.
* refac: give the upload list a type
The list of files waiting to upload now carries the same type as the rows it holds.
The Access button in the model, prompt, tool, knowledge, skill and note editors, the Access entry in their list menus and the Access button in folder settings showed to users without the matching sharing permission. The dialog then had nothing they could change. The button and the menu entry now only show to users who may share that kind of item, and admins see them as before.
Refs #32830
Syncing a knowledge base from a local directory only ever showed a
generic "Error accessing directory" toast when a per-file read
failed, and production builds strip console.error, so nothing else
recorded the cause either. On Windows this hides a real Chromium bug
where files with very long absolute paths throw a NotFoundError from
the File System Access API, leaving no way to tell which file failed
or why.
Both per-file read paths (the directory picker and drag-and-drop) now
wrap read failures with the file's relative path and the underlying
browser error before they reach the toast, so the message actually
names the file and the reason. Reuses the existing translated toast
text instead of adding a new i18n key, so the fix doesn't orphan
existing translations of that string.
* fix: surface files the browser cannot read during a knowledge base directory sync
Syncing a local folder into a knowledge base could fail with nothing but "Error accessing directory": no failing file name, no network request, no server log, and no console output either, because production builds strip console.error. On Windows this happens once the absolute path of a file passes the platform limit, at which point the browser refuses to open a file it just listed.
The directory scan now handles that per file. It names the first failing path and how many files are affected, and stops before anything is uploaded. Stopping is the point: a file missing from the manifest is treated as deleted by the sync, so continuing would remove the knowledge base copy of a file that still exists on disk.
Dragging a folder in hit the same failure and reported nothing at all, and the Firefox picker path returned its promise without awaiting it, so a rejection escaped the error handler and surfaced only as an unhandled rejection. Both report through the existing handler now, and production builds keep console.error so the underlying exception stays visible.
* fix: narrow the change to the silent drag-and-drop folder failure
Dropping a folder onto a knowledge base did nothing at all when the browser refused to open one of the files inside it: the rejection escaped the async drop listener, so the user got no toast, no upload and no clue why. The listener now routes that failure through the same error handler the directory picker already uses, so one path and one message cover both ways of adding a folder.
The rest of the branch is reverted. Dropping `console.error` from the esbuild `pure` list un-stripped 597 call sites across 103 files from every production bundle, which is a repo-wide logging policy change that needs its own argument. The picker-side collect-and-count machinery only reworded a toast the existing catch already showed, and the Firefox `return await` fix is a different bug in a different path.