Repository navigation
Conversation
…es honestly, drop prompt echoes
From a review of 85 real results (33 landed in Uncategorized):
- Archives: the category was hardcoded to 'archive' although the entry
listing was read, so every zip of .stl parts reached Uncategorized. The
dominant entry type (at least half the files) now picks the folder via
getIntelligentCategory, taken only when it lands on one of the user's
folders.
- Filename fallback matched folder words as substrings ("Work" in
"network", "code" in "barcode"). Folder words now match whole words,
plural-tolerant.
- Filename-only results reported 65-75%, above real content analyses.
createFallbackAnalysis, the Office fallback and an unmatched archive now
report FILENAME_ONLY_CONFIDENCE (50).
- dropPromptEchoes clears summary/purpose/project/reasoning/type/entity
when the model copied a schema instruction or a folder description into
them, and caps confidence at 50. Run over 1,164 stored results it clears
64 files, all genuine copies, no false positives. Applied in the
document, image and media paths.
- calibrateConfidence caps at 65 (below auto-organize's 75) when the LLM's
folder is kept although the embedding confidently prefers another.
- Organize's "Create folder for <theme>" grouped on one field by exact text,
which for a fallback analysis is the file's own name, so it never fired.
findRecurringTheme groups on named entities and shared keywords (one
tally per term), skipping file-name keys and form words; still 3+ files.
checkjs floor 493 -> 494 for the new uncategorizedThemes.js.
7 of 16 tasks
This branch has not been deployed
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.
Summary
From a review of 85 real analysis results from one session, 33 of which landed in Uncategorized, plus a replay over the full history of 1,164 stored results. Each fix stays inside an existing code path: no new services, settings or dependencies.
documentAnalysis.jsread the entry listing and then hardcoded the category to'archive', so every zip of.stlparts reached Uncategorized even though the 3D print folder lists.stl. When at least half of the file entries share one type, that type now picks the folder through the existinggetIntelligentCategory. The result is used only when it lands on one of the user's own folders.filename.includes(word), so the folder name "Work" matched "network" and the description word "code" matched "barcode". Matching is now on whole words; a plural in the file name still matches a singular folder word.createFallbackAnalysis, the Office-extraction fallback and an unmatched archive now reportFILENAME_ONLY_CONFIDENCE(50). That is below auto-organize's 75% default, so these files are left for review.dropPromptEchoesclears answers the model copied from its own prompt. It checkssummary,purpose,project,reasoning,typeandentity. A field is cleared when it reproduces a schema instruction or a smart-folder description: nearly all of its words come from that text, and it covers at least 40% of the text. Confidence is then capped at 50. Replayed over the 1,164 stored results, the guard cleared 64 files, all of them genuine copies, with no false positives. Examples: "Art, graphic design, images not related to other categories, logos" (32 times), "A concise 1-2 sentence summary of the document's content." (13), and "Research on SCANUE…", which had filed a banner under Research at 90%. The guard runs in the document, image and media paths.calibrateConfidencecaps the score at 65 (llm_embedding_disagree).findRecurringThemekeeps one tally per term across named entities and shared keywords, and skips file-name keys and form words such as file types or "document". A theme still needs at least 3 files.Scope
Type of Change
Test Plan
Automated
npm run format:check/npm run lint(changed files, plus pre-commit hooks)npm test: full suite, 940 suites green after addingdropPromptEchoesto two test mocks ofanalysis/utilsnpm run typecheck,npm run verify:checkjs-ratchet(floor raised 493 → 494 for the newuncategorizedThemes.js),npm run verify:analysis-routing.stlfiles goes to 3D print at 70%; a mixed archive stays in the generic bucket at 50%findRecurringTheme, including the old bug where files grouped on their own file names.psdfallback test now expects 50Manual QA
docs/TESTING.md)Manual QA notes: not run in the app yet. To check, re-analyze a zip of
.stlfiles (it should go to 3D print), an unreadable.docx(it should show 50%), and three uncategorized files that share a keyword (the Organize bar should offer a folder).Checklist
Known limitations / follow-ups
scan-2025-03-19.docxstill matches Research, because "scan" is a whole word in its name and the Research description mentions SCAN. It is now reported at 50% and left for review rather than shown at 70%.