Conversation
Importing sources dropped files silently. A file rejected for its
extension, an exclusion rule, or the size ceiling was skipped with a
bare `continue`, a failed copy only reached `console.error`, and the
file-picker handler had no `catch` at all, so a thrown import turned
into an unhandled rejection. The picker also offers images, media and
code that INGESTABLE_SOURCE_EXTENSIONS does not accept, so selecting
them closed the dialog and did nothing.
importSourceFiles and importSourceFolder now return
{ imported, skipped } with a reason per skipped file, and the sources
view lists them instead of leaving the user to guess.
Exclusions are now checked before the ingestable-type test: a hidden
file may still be a supported type, and "excluded" is the reason the
user can act on.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #675.
Problem
Importing sources dropped files silently. Every gate in the import loop
discarded the file with a bare
continue, a failedcopyFileonly reachedconsole.error, andhandleImportwrapped the call intry/finallywithno
catch, so a thrown import became an unhandled rejection that neverreached the UI.
The file dialog also offers Images, Media, Code and
jsonl/tsv/ndjsonfilters that
INGESTABLE_SOURCE_EXTENSIONSdoes not accept, so those filescould be selected, confirmed, and discarded without a word.
Change
importSourceFilesandimportSourceFoldernow return{ imported, skipped }, where each skipped entry carries a reason:unsupported-typeINGESTABLE_SOURCE_EXTENSIONSexcludedexcludeExtensions/excludeDirs/excludeGlobs/ hidden filetoo-largemaxFileSizeMb, with the actual size as detailunreadablegetFileSizethrewcopy-failedcopyFilethrewsensitive-configisSensitiveConfigSourceFileThe sources view lists them with the same per-item pattern URL import already
uses, and both handlers now catch a thrown import instead of logging it.
Exclusions are checked before the ingestable-type test, so a hidden file that
is otherwise a supported type reports
excludedrather than the misleadingunsupported-type.Notes
(silent no-op when no LLM is configured, the size-limit field being
disabled while the limit still applies, and drag-and-drop) are left alone.
path will need the same reporting once it lands.
has at least six possible causes that all look identical today, which is
the point of this change. After it, the reporter can re-run and get a
reason. The swallowing code is unchanged between v0.6.3 (the version in
that report) and
main.Testing
npm run test:mocks— 127 files, 1832 tests pass.npm run typecheckclean.10 new tests cover each skip reason for both entry points plus the display
decision, written test-first. Five existing tests were updated for the new
return shape. New i18n keys are added to all four locales so
i18n-parity.test.tsstays green.Also verified by hand in
tauri dev: importing a 142 MB PDF against thedefault 100 MB limit now reports
too-largewith the file size instead ofdoing nothing.
🤖 Generated with Claude Code