From 27ed0d5e350e00866c0a9dd477d4c566f5c12bc1 Mon Sep 17 00:00:00 2001 From: Levy Tate <78818969+iLevyTate@users.noreply.github.com> Date: Tue, 17 Nov 2026 14:01:32 -0500 Subject: [PATCH 1/2] feat(organize): quick wins from the 5.4.0 retest - Held files that all came closest to one Smart Folder can be sent there in one click from the uncategorized bar. The routing bar is unchanged. - Match scores read as words (Strong match, Good match, Check this) on review cards and in the sample run; the percentage is the tooltip. The words follow the auto-organize default and the routing bar. - The finished screen offers "Ask about your files", which opens Chat. - MCP settings can copy the server address and token for apps that take a server form rather than a config file. - "Watch smart folders" is now "Keep Smart Folders up to date", and says it watches where files go, not where they come from. - The Discover naming button says how files will be named, and the naming pickers list conventions in words. - Adds a manual local-model e2e review of small Search Console exports (test/e2e/manual/local-routing-review.spec.js). --- CHANGELOG.md | 23 + docs/MCP_SERVER.md | 17 +- src/main/ipc/validationSchemas.js | 4 +- src/main/transports/mcp/configSnippets.js | 9 + .../components/discover/NamingSettings.jsx | 11 +- .../components/discover/SampleRunDialog.jsx | 27 +- .../components/organize/ReadyFileItem.jsx | 38 +- .../organize/UncategorizedActionsBar.jsx | 46 +- .../organize/uncategorizedThemes.js | 47 ++ .../settings/AutoOrganizeSection.jsx | 6 +- .../components/settings/McpServerSection.jsx | 18 +- .../settings/NamingSettingsSection.jsx | 11 +- .../components/setup/WatcherStatusLine.jsx | 2 +- .../contexts/FloatingSearchContext.jsx | 8 + src/renderer/phases/CompletePhase.jsx | 25 +- src/renderer/phases/DiscoverPhase.jsx | 5 +- src/renderer/phases/OrganizePhase.jsx | 23 + .../phases/organize/organizeDestination.js | 6 +- src/renderer/utils/confidenceColors.js | 29 + src/shared/validationConstants.js | 14 + test/CompletePhase.analyzeMoreFiles.test.js | 3 + test/components/AutoOrganizeSection.test.js | 9 +- .../CompletePhase.everyFile.test.js | 3 + test/components/CompletePhase.test.js | 19 +- test/components/DiscoverPhase.test.js | 17 + test/components/McpServerSection.test.js | 4 +- .../ReadyFileItem.learningNote.test.js | 8 +- test/components/ReadyFileItem.routing.test.js | 16 +- test/components/SampleRunDialog.test.js | 2 +- .../UncategorizedActionsBar.test.js | 50 ++ test/components/namingDefaultsSync.test.js | 10 +- test/components/uncategorizedThemes.test.js | 49 ++ test/e2e/README.md | 15 +- test/e2e/discover/naming-strategy.spec.js | 4 +- test/e2e/manual/local-routing-review.spec.js | 532 ++++++++++++++++++ test/e2e/workflows/full-pipeline.spec.js | 2 +- test/organizeDestination.test.js | 18 + test/unit/mcp/configSnippets.test.js | 7 + test/utils/confidenceColors.test.js | 31 +- test/validationConstants.test.js | 14 + 40 files changed, 1095 insertions(+), 87 deletions(-) create mode 100644 test/e2e/manual/local-routing-review.spec.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 574faa92..3a0e0a01 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,29 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Added + +- **Send held files to the folder they came closest to.** When two or more files in Organize are + held for review and all came closest to the same Smart Folder, the uncategorized bar names that + folder and offers one button to send them all there. Nothing moves until you move them, and the + routing bar is unchanged. +- **Ask about your files after a move.** The finished screen has an "Ask about your files" button + that opens Chat, which answers from your library and names the files it used. +- **MCP setup for other apps.** Settings → MCP Server can copy the server address and token for apps + that ask for an address and a header rather than a config file. + +### Changed + +- **Match scores read as words.** Review cards and the sample run say "Strong match", "Good match" + or "Check this" instead of a bare percentage, which read as an accuracy rate. The words follow + what the app does with the score (the auto-organize default and the routing bar), and the + percentage stays as the tooltip. +- **Renaming is easier to find.** The Discover button that opened "Naming strategy" now says how + files will be named ("File names: Subject, then date"), and the naming pickers list each + convention in words rather than by its id. +- **"Watch smart folders" is now "Keep Smart Folders up to date".** Its description says it watches + where files go, not where they come from, and names the ways files come in. + ## [5.4.0] - 2026-11-16 ### Added diff --git a/docs/MCP_SERVER.md b/docs/MCP_SERVER.md index f862945f..f6d333d6 100644 --- a/docs/MCP_SERVER.md +++ b/docs/MCP_SERVER.md @@ -49,8 +49,11 @@ do not need to reinstall clients, but each one needs the new token (copy its con `http://127.0.0.1:53827/mcp`. If that port is already taken, the server binds an OS-assigned ephemeral port (`listen(0)`) and Settings shows the actual port. It starts with StratoSort while the box is ticked; untick it to stop the server and keep it off. -3. Click **Copy Claude Desktop config** (or **Copy Cursor config** / **Copy Zed config**). -4. Paste it into your client's config file. Restart the client. +3. Click **Copy Claude Desktop config** (or **Copy Cursor config** / **Copy Zed config**). For an + app that asks for a server address and a header instead of a config file (Loci, for one), click + **Copy address and token (other apps)**. +4. Paste it into your client's config file, or the address and header into the app's server form. + Restart the client. 5. The client now sees four StratoSort tools: `search_documents`, `chat_with_documents`, `get_document_summary`, `list_smart_folders`. @@ -93,6 +96,16 @@ follow this shape: **Zed** (`~/.config/zed/settings.json`): same shape under `context_servers`. +**Other apps** (a server form rather than a config file): plain text with the address, the header, +and the transport. + +```text +StratoSort MCP server +Address: http://127.0.0.1:53827/mcp +Header: Authorization: Bearer +Transport: Streamable HTTP +``` + The Settings panel always generates the snippet with your actual port and token filled in — copy from there rather than from this doc. diff --git a/src/main/ipc/validationSchemas.js b/src/main/ipc/validationSchemas.js index 9c8732a3..75b3456a 100644 --- a/src/main/ipc/validationSchemas.js +++ b/src/main/ipc/validationSchemas.js @@ -1720,7 +1720,9 @@ if (!z) { mcpDisable: ipcVoidPayloadSchema, mcpStatus: ipcVoidPayloadSchema, mcpRotateToken: ipcVoidPayloadSchema, - mcpGetConfigSnippet: z.object({ client: z.enum(['claudeDesktop', 'cursor', 'zed']) }).strict(), + mcpGetConfigSnippet: z + .object({ client: z.enum(['claudeDesktop', 'cursor', 'zed', 'other']) }) + .strict(), mcpTestConnection: ipcVoidPayloadSchema, // AI Provider IPC schemas (T7-T8 multi-provider AI work) diff --git a/src/main/transports/mcp/configSnippets.js b/src/main/transports/mcp/configSnippets.js index 441cf5f2..263a53c6 100644 --- a/src/main/transports/mcp/configSnippets.js +++ b/src/main/transports/mcp/configSnippets.js @@ -34,6 +34,15 @@ function generateSnippet(client, { port, token }) { null, 2 ); + case 'other': + // For an app that asks for a server address and a header rather than a + // config file (Loci's "Add a server: a web address", for one). + return [ + 'StratoSort MCP server', + `Address: ${url}`, + `Header: Authorization: ${auth}`, + 'Transport: Streamable HTTP' + ].join('\n'); default: throw new Error(`Unknown MCP client: ${client}`); } diff --git a/src/renderer/components/discover/NamingSettings.jsx b/src/renderer/components/discover/NamingSettings.jsx index fb5880c7..e587bbd7 100644 --- a/src/renderer/components/discover/NamingSettings.jsx +++ b/src/renderer/components/discover/NamingSettings.jsx @@ -3,6 +3,7 @@ import PropTypes from 'prop-types'; import Select from '../ui/Select'; import { Text } from '../ui/Typography'; import { normalizeSeparator } from '../../../shared/namingConventions'; +import { NAMING_CONVENTIONS, NAMING_CONVENTION_LABELS } from '../../../shared/validationConstants'; const NamingSettings = memo(function NamingSettings({ namingConvention, @@ -37,11 +38,11 @@ const NamingSettings = memo(function NamingSettings({ onChange={handleConventionChange} aria-label="Naming convention" > - - - - - + {NAMING_CONVENTIONS.map((id) => ( + + ))} diff --git a/src/renderer/components/setup/WatcherStatusLine.jsx b/src/renderer/components/setup/WatcherStatusLine.jsx index fea38778..fbc78653 100644 --- a/src/renderer/components/setup/WatcherStatusLine.jsx +++ b/src/renderer/components/setup/WatcherStatusLine.jsx @@ -64,7 +64,7 @@ function WatcherStatusLine({ folderCount, intervalMs = DEFAULT_INTERVAL_MS }) { if (!status.isRunning) { message = status.isStarting ? 'Starting folder watching…' - : 'These folders are not being watched, so files added later are analyzed only on the next scan. Turn on "Watch smart folders" in Settings → Auto-organize.'; + : 'These folders are not being watched, so files added later are analyzed only on the next scan. Turn on "Keep Smart Folders up to date" in Settings → Auto-organize.'; tone = 'text-stratosort-warning'; } else { const watched = Number(status.watchedCount) || 0; diff --git a/src/renderer/contexts/FloatingSearchContext.jsx b/src/renderer/contexts/FloatingSearchContext.jsx index 40f9e42a..bf502870 100644 --- a/src/renderer/contexts/FloatingSearchContext.jsx +++ b/src/renderer/contexts/FloatingSearchContext.jsx @@ -160,3 +160,11 @@ export function useFloatingSearch() { } return context; } + +/** + * The same context, or null outside the provider: for a screen that only + * links to search and renders fine without it (no provider, no link). + */ +export function useOptionalFloatingSearch() { + return useContext(FloatingSearchContext); +} diff --git a/src/renderer/phases/CompletePhase.jsx b/src/renderer/phases/CompletePhase.jsx index db780fd9..5b44b553 100644 --- a/src/renderer/phases/CompletePhase.jsx +++ b/src/renderer/phases/CompletePhase.jsx @@ -1,6 +1,13 @@ import React, { memo, useCallback, useMemo } from 'react'; import { motion, useReducedMotion } from 'framer-motion'; -import { CheckCircle2, Copy, ArrowLeft, FolderOpen, FilePlus } from 'lucide-react'; +import { + CheckCircle2, + Copy, + ArrowLeft, + FolderOpen, + FilePlus, + MessageSquareText +} from 'lucide-react'; import { PHASES } from '../../shared/constants'; import { useAppSelector, useAppDispatch } from '../store/hooks'; import { setPhase, resetUi } from '../store/slices/uiSlice'; @@ -13,6 +20,7 @@ import { UndoRedoToolbar } from '../components/UndoRedoSystem'; import { ActionBar, Inline, Stack } from '../components/layout'; import { selectMovedCount, selectOrganizedCount, selectRedactPaths } from '../store/selectors'; import { useNotification } from '../contexts/NotificationContext'; +import { useOptionalFloatingSearch } from '../contexts/FloatingSearchContext'; import { filesIpc } from '../services/ipc'; import { logger } from '../../shared/logger'; import { toCanonicalPath } from '../utils/canonicalPath'; @@ -56,6 +64,7 @@ function CompletePhase() { const organizedCount = useAppSelector(selectOrganizedCount); // The Dashboard's "Organized" figure: removed duplicates are not in it. const movedCount = useAppSelector(selectMovedCount); + const floatingSearch = useOptionalFloatingSearch(); const duplicateCount = organizedCount - movedCount; const analysisResults = useAppSelector((state) => state.analysis?.results); const redactPaths = useAppSelector(selectRedactPaths); @@ -401,6 +410,20 @@ function CompletePhase() { Review organized files + {/* Chat with sources is the built-in way to ask about these files; + testers who only met it through MCP did not find it in the app. */} + {floatingSearch && movedCount > 0 && ( + + )} {canOpenFolder && (