From 905007d71845513960d001e7257d8daf67a3c249 Mon Sep 17 00:00:00 2001
From: Levy Tate <78818969+iLevyTate@users.noreply.github.com>
Date: Sat, 14 Nov 2026 23:01:59 -0500
Subject: [PATCH 1/5] fix(security): close code-scanning findings in chat
search, config override, MCP auth and the preload stripper
- Chat search escapes the LIKE escape character, so a query with a
backslash (C:\Users) matches the real text.
- ConfigurationManager.override refuses __proto__, constructor and
prototype path segments.
- The MCP bearer regex starts the token at a non-space, so a header of
spaces cannot backtrack.
- The preload HTML stripper repeats until stable and accepts closing tags
with spaces or junk before '>'.
- platform.js uses fixed separator regexes; in-memory dedup keys use
sha256; the e2e orphan cleanup runs without a shell.
---
src/main/analysis/documentAnalysis.js | 2 +-
src/main/services/ChatHistoryStore.js | 5 ++--
src/main/transports/mcp/auth.js | 4 ++-
src/main/utils/llmOptimization.js | 2 +-
src/preload/ipcSanitizer.js | 19 +++++++------
src/renderer/utils/platform.js | 14 +++++-----
src/shared/config/ConfigurationManager.js | 8 ++++++
test/ChatHistoryStore.search.test.js | 33 +++++++++++++++++++++++
test/configurationManager.test.js | 15 +++++++++++
test/e2e/helpers/electronApp.js | 32 ++++++++++++++--------
test/ipcSanitizer.test.js | 18 +++++++++++++
test/unit/mcp/auth.test.js | 15 +++++++++++
12 files changed, 137 insertions(+), 30 deletions(-)
diff --git a/src/main/analysis/documentAnalysis.js b/src/main/analysis/documentAnalysis.js
index 6ed4d877..62120eb7 100644
--- a/src/main/analysis/documentAnalysis.js
+++ b/src/main/analysis/documentAnalysis.js
@@ -1016,7 +1016,7 @@ async function analyzeDocumentStages(filePath, smartFolders = [], options = {},
? extractedText.slice(0, 8192) + '\0' + extractedText.length
: extractedText;
const contentHash = crypto
- .createHash('md5')
+ .createHash('sha256')
.update(hashInput)
.update(safeModelName)
.digest('hex');
diff --git a/src/main/services/ChatHistoryStore.js b/src/main/services/ChatHistoryStore.js
index 7f756104..a27abcce 100644
--- a/src/main/services/ChatHistoryStore.js
+++ b/src/main/services/ChatHistoryStore.js
@@ -709,8 +709,9 @@ class ChatHistoryStore {
return { items: [], capped: false, capLimit: SEARCH_DECRYPT_SCAN_CAP, scannedCount: 0 };
}
- // Escape LIKE special characters to prevent unintended wildcard matching
- const escapedQuery = query.replace(/[%_]/g, '\\$&');
+ // Escape LIKE special characters, and the ESCAPE character itself, so a
+ // query like "C:\Users" matches the backslash instead of escaping "U".
+ const escapedQuery = query.replace(/[\\%_]/g, '\\$&');
const pattern = `%${escapedQuery}%`;
// Stage 1: fast SQL search on plain columns only.
diff --git a/src/main/transports/mcp/auth.js b/src/main/transports/mcp/auth.js
index 25dc8734..4c606271 100644
--- a/src/main/transports/mcp/auth.js
+++ b/src/main/transports/mcp/auth.js
@@ -22,7 +22,9 @@ function createAuthMiddleware(/** @type {any} */ getToken) {
) {
const header = req.headers?.authorization || '';
if (Buffer.byteLength(header, 'utf8') > MAX_AUTH_VALUE_BYTES) return _deny(res);
- const bearerMatch = /^Bearer\s+(.+)$/.exec(header);
+ // `\S` starts the token, so the space run and the token never overlap
+ // and a header of spaces can't make the match backtrack.
+ const bearerMatch = String(header).match(/^Bearer\s+(\S.*)$/);
if (!bearerMatch) return _deny(res);
const provided = bearerMatch[1];
const expected = getToken();
diff --git a/src/main/utils/llmOptimization.js b/src/main/utils/llmOptimization.js
index a83f3875..b08563f8 100644
--- a/src/main/utils/llmOptimization.js
+++ b/src/main/utils/llmOptimization.js
@@ -55,7 +55,7 @@ class LLMRequestDeduplicator {
* Generate a unique key for a request based on its inputs
*/
generateKey(/** @type {any} */ inputs) {
- const hasher = crypto.createHash('sha1');
+ const hasher = crypto.createHash('sha256');
// Handle different input types
if (typeof inputs === 'string') {
diff --git a/src/preload/ipcSanitizer.js b/src/preload/ipcSanitizer.js
index 937dcd8b..a125d7e2 100644
--- a/src/preload/ipcSanitizer.js
+++ b/src/preload/ipcSanitizer.js
@@ -125,14 +125,17 @@ function createIpcSanitizer({ log }) {
let cleaned = str;
- // Remove dangerous executable tags (script, style, iframe)
- cleaned = cleaned.replace(/`), as browsers accept.
+ // Repeat until nothing changes: removing one element can join the text
+ // around it into another (`ipt>`).
+ let previous;
+ do {
+ previous = cleaned;
+ cleaned = cleaned.replace(/<(script|style|iframe)\b[\s\S]*?<\/\1\b[^>]*>/gi, '');
+ } while (cleaned !== previous);
+ // Then an unclosed script or style, to the end of the text.
+ cleaned = cleaned.replace(/<(script|style)\b[^>]*>[\s\S]*$/gi, '');
// IPC data is rendered through React JSX which auto-escapes, so entity encoding
// is unnecessary. The previous code corrupted user text like "size < 10MB",
diff --git a/src/renderer/utils/platform.js b/src/renderer/utils/platform.js
index 20575591..435d60bb 100644
--- a/src/renderer/utils/platform.js
+++ b/src/renderer/utils/platform.js
@@ -23,6 +23,10 @@ export function getPathSeparator() {
return isWindows ? '\\' : '/';
}
+// The separator this platform doesn't use, and runs of the one it does.
+const OTHER_SEPARATOR = isWindows ? /\//g : /\\/g;
+const SEPARATOR_RUN = isWindows ? /\\+/g : /\/+/g;
+
/**
* Join path segments using the platform-specific separator
* Handles both forward and back slashes in input paths
@@ -31,18 +35,17 @@ export function getPathSeparator() {
*/
export function joinPath(...segments) {
const sep = getPathSeparator();
- const otherSep = isWindows ? '/' : '\\';
let result = segments
.filter((s) => s && typeof s === 'string')
- .map((s) => s.replace(new RegExp(`[${otherSep.replace('\\', '\\\\')}]`, 'g'), sep))
+ .map((s) => s.replace(OTHER_SEPARATOR, sep))
.join(sep);
// Preserve UNC path prefix (\\server\share) on Windows before collapsing duplicates
if (isWindows && result.startsWith('\\\\')) {
result = '\\\\' + result.slice(2).replace(/\\+/g, '\\');
} else {
- result = result.replace(new RegExp(`[${sep.replace('\\', '\\\\')}]+`, 'g'), sep);
+ result = result.replace(SEPARATOR_RUN, sep);
}
return result;
@@ -57,16 +60,15 @@ export function normalizePath(inputPath) {
if (!inputPath || typeof inputPath !== 'string') return inputPath;
const sep = getPathSeparator();
- const otherSep = isWindows ? '/' : '\\';
- let normalized = inputPath.replace(new RegExp(`[${otherSep.replace('\\', '\\\\')}]`, 'g'), sep);
+ let normalized = inputPath.replace(OTHER_SEPARATOR, sep);
// Remove duplicate separators (but preserve UNC paths on Windows)
if (isWindows && normalized.startsWith('\\\\')) {
// UNC path - preserve leading \\, normalize the rest
normalized = `\\\\${normalized.slice(2).replace(/\\+/g, '\\')}`;
} else {
- normalized = normalized.replace(new RegExp(`[${sep.replace('\\', '\\\\')}]+`, 'g'), sep);
+ normalized = normalized.replace(SEPARATOR_RUN, sep);
}
return normalized;
diff --git a/src/shared/config/ConfigurationManager.js b/src/shared/config/ConfigurationManager.js
index ba554249..cc816259 100644
--- a/src/shared/config/ConfigurationManager.js
+++ b/src/shared/config/ConfigurationManager.js
@@ -18,6 +18,10 @@
const { CONFIG_SCHEMA, SENSITIVE_KEYS, DEPRECATED_MAPPINGS } = require('./configSchema');
const { parseEnvValue, getEnvVar, validateValue } = require('./configValidation');
+// Path segments override() must never walk into or assign: they reach the
+// object prototype instead of a config value.
+const UNSAFE_PATH_KEYS = new Set(['__proto__', 'constructor', 'prototype']);
+
/**
* Configuration Manager Class
* Manages loading, validation, and access to configuration values.
@@ -263,6 +267,10 @@ class ConfigurationManager {
}
const parts = path.split('.');
+ if (parts.some((part) => UNSAFE_PATH_KEYS.has(part))) {
+ this._validationErrors.push({ path, value, reason: 'unsafe_path' });
+ return;
+ }
// Validate against schema if definition exists (coerce types but allow unrecognized paths)
if (parts.length === 2) {
diff --git a/test/ChatHistoryStore.search.test.js b/test/ChatHistoryStore.search.test.js
index 46a5be86..1c369c18 100644
--- a/test/ChatHistoryStore.search.test.js
+++ b/test/ChatHistoryStore.search.test.js
@@ -445,3 +445,36 @@ describe('ChatHistoryStore — searchConversations after encryption rollout', ()
});
});
});
+
+describe('ChatHistoryStore — LIKE pattern escaping', () => {
+ // The SQL stage runs `LIKE ? ESCAPE '\'`. The escape character itself has
+ // to be escaped too, or "C:\Users" turns "\U" into a literal "U" and a
+ // message with the real path no longer matches.
+ function patternFor(query) {
+ const fake = makeFakeDb();
+ const prepare = fake.prepare.bind(fake);
+ /** @type {string[]} */
+ const seen = [];
+ fake.prepare = (sql) => {
+ const statement = prepare(sql);
+ const all = statement.all;
+ statement.all = (...args) => {
+ if (String(sql).includes('LIKE ?')) seen.push(String(args[0]));
+ return all(...args);
+ };
+ return statement;
+ };
+ const store = buildStore({ conversations: [], messagesByConv: new Map() });
+ store._db = fake;
+ store.searchConversations(query);
+ return seen[0];
+ }
+
+ test.each([
+ ['a backslash', 'C:\\Users', '%C:\\\\Users%'],
+ ['LIKE wildcards', '50%_off', '%50\\%\\_off%'],
+ ['a trailing backslash', 'folder\\', '%folder\\\\%']
+ ])('escapes %s', (_label, query, expected) => {
+ expect(patternFor(query)).toBe(expected);
+ });
+});
diff --git a/test/configurationManager.test.js b/test/configurationManager.test.js
index 77a82f05..25374518 100644
--- a/test/configurationManager.test.js
+++ b/test/configurationManager.test.js
@@ -89,6 +89,21 @@ describe('ConfigurationManager', () => {
);
});
+ test.each(['__proto__.polluted', 'CUSTOM.__proto__.polluted', 'constructor.prototype.polluted'])(
+ 'override refuses the prototype path %s',
+ (path) => {
+ const mgr = new ConfigurationManager();
+ mgr.load();
+
+ mgr.override(path, true);
+
+ expect(/** @type {any} */ ({}).polluted).toBeUndefined();
+ expect(mgr._validationErrors).toContainEqual(
+ expect.objectContaining({ path, reason: 'unsafe_path' })
+ );
+ }
+ );
+
test('override writes unknown nested paths and reset restores defaults', () => {
const mgr = new ConfigurationManager();
mgr.load();
diff --git a/test/e2e/helpers/electronApp.js b/test/e2e/helpers/electronApp.js
index a39712df..817231ba 100644
--- a/test/e2e/helpers/electronApp.js
+++ b/test/e2e/helpers/electronApp.js
@@ -18,7 +18,7 @@ const { _electron: electron } = require('@playwright/test');
const path = require('path');
const fs = require('fs');
const os = require('os');
-const { execSync } = require('child_process');
+const { execFileSync } = require('child_process');
// Configuration
const APP_ROOT = path.resolve(__dirname, '../../..');
@@ -206,20 +206,30 @@ function killOrphanStratoSortElectronProcesses() {
// Match both the bundled (dist\main.js) and legacy (simple-main) entry
// args, scoped to electron.exe spawned from THIS repo's node_modules so
// unrelated Electron apps are never touched.
+ // Arguments go straight to the program, with no shell in between; the
+ // script uses single quotes only, so Node's argument quoting can't
+ // split it.
const repoMarker = APP_ROOT.replace(/'/g, "''");
- execSync(
- 'powershell -NoProfile -Command "Get-CimInstance Win32_Process -Filter \\"Name = \'electron.exe\'\\" | ' +
- `Where-Object { $_.CommandLine -like '*${repoMarker}*' -and ($_.CommandLine -like '*dist*main.js*' -or $_.CommandLine -like '*simple-main*') } | ` +
- 'ForEach-Object { Stop-Process -Id $_.ProcessId -Force -ErrorAction SilentlyContinue }"',
+ execFileSync(
+ 'powershell',
+ [
+ '-NoProfile',
+ '-Command',
+ "Get-CimInstance Win32_Process -Filter 'Name = ''electron.exe''' | " +
+ `Where-Object { $_.CommandLine -like '*${repoMarker}*' -and ($_.CommandLine -like '*dist*main.js*' -or $_.CommandLine -like '*simple-main*') } | ` +
+ 'ForEach-Object { Stop-Process -Id $_.ProcessId -Force -ErrorAction SilentlyContinue }'
+ ],
{ stdio: 'ignore', timeout: 8000 }
);
} else {
- execSync(
- `pkill -f "electron.*(simple-main|${APP_ROOT.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}.*dist/main\\.js)" || true`,
- {
- stdio: 'ignore',
- timeout: 5000
- }
+ // pkill exits 1 when nothing matched, which lands in the catch below.
+ execFileSync(
+ 'pkill',
+ [
+ '-f',
+ `electron.*(simple-main|${APP_ROOT.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}.*dist/main\\.js)`
+ ],
+ { stdio: 'ignore', timeout: 5000 }
);
}
} catch {
diff --git a/test/ipcSanitizer.test.js b/test/ipcSanitizer.test.js
index 6c550848..236282cf 100644
--- a/test/ipcSanitizer.test.js
+++ b/test/ipcSanitizer.test.js
@@ -104,6 +104,24 @@ describe('ipcSanitizer', () => {
expect(sanitized.query).toBe('What is in D:\\Docs?');
});
+ test.each([
+ ['a closing tag with a space', 'Hi there', 'Hi there'],
+ ['a closing tag with junk', 'Hi there', 'Hi there'],
+ [
+ 'a tag rebuilt by stripping another',
+ 'Hi ipt>alert(1)!',
+ 'Hi !'
+ ],
+ ['an iframe with a spaced closing tag', 'ab', 'ab'],
+ ['an unclosed style', 'a
World
';
+ const result = await documentExtractors.extractPlainTextFromHtml(html);
+ expect(result).toBe('Hello World');
+ });
});
describe('checkFileSize', () => {
diff --git a/test/embeddingQueue-modelChange.test.js b/test/embeddingQueue-modelChange.test.js
new file mode 100644
index 00000000..7ec99d7a
--- /dev/null
+++ b/test/embeddingQueue-modelChange.test.js
@@ -0,0 +1,147 @@
+/**
+ * Vectors waiting in the embedding queue (or its failed-items map and
+ * dead-letter queue) that a different embedding model produced must never be
+ * written into the index. With a different dimension they churned into the
+ * dead-letter queue; with the same dimension they were written silently and
+ * mixed two vector spaces in one index.
+ * Uses the real failed-item handler and parallel processor against a stub
+ * vector service; persistence is stubbed.
+ */
+
+jest.mock('electron', () => ({
+ app: { getPath: jest.fn(() => '/tmp/user-data') }
+}));
+
+jest.mock('../src/shared/logger', () => {
+ const logger = { info: jest.fn(), warn: jest.fn(), error: jest.fn(), debug: jest.fn() };
+ return { logger, createLogger: () => logger };
+});
+
+jest.mock('../src/shared/config/index', () => ({
+ get: jest.fn((_key, fallback) => fallback)
+}));
+
+jest.mock('../src/shared/pathTraceLogger', () => ({
+ traceQueueUpdate: jest.fn()
+}));
+
+jest.mock('../src/main/analysis/embeddingQueue/persistence', () => ({
+ loadPersistedData: jest.fn().mockResolvedValue(undefined),
+ persistQueueData: jest.fn().mockResolvedValue(undefined),
+ persistFailedItems: jest.fn().mockResolvedValue(true),
+ persistDeadLetterQueue: jest.fn().mockResolvedValue(true),
+ SQLITE_KEYS: { queue: 'queue', failedItems: 'failedItems', deadLetter: 'deadLetter' }
+}));
+
+const mockContainer = { resolve: jest.fn() };
+
+jest.mock('../src/main/services/ServiceContainer', () => ({
+ container: mockContainer,
+ ServiceIds: {
+ ORAMA_VECTOR: 'ORAMA_VECTOR',
+ ANALYSIS_HISTORY: 'ANALYSIS_HISTORY',
+ PROCESSING_STATE: 'PROCESSING_STATE'
+ }
+}));
+
+const { logger: mockLogger } = require('../src/shared/logger');
+const EmbeddingQueue = require('../src/main/analysis/embeddingQueue/EmbeddingQueueCore');
+
+const OLD_MODEL = 'old-embed-v1-Q8_0.gguf';
+const NEW_MODEL = 'new-embed-v2-Q8_0.gguf';
+
+/** Both models are 2-dimensional here, so nothing but the model tells them apart. */
+function fileItem(name, model) {
+ const item = { id: `file:/docs/${name}`, vector: [0.1, 0.2], meta: { path: `/docs/${name}` } };
+ if (model) item.model = model;
+ return item;
+}
+
+function deadLetterEntry(item) {
+ return { item, itemId: item.id, error: 'dimension_mismatch', retryCount: 1 };
+}
+
+describe('EmbeddingQueue after an embedding-model change', () => {
+ let vectorDb;
+ let history;
+
+ beforeEach(() => {
+ jest.clearAllMocks();
+ vectorDb = {
+ initialize: jest.fn().mockResolvedValue(undefined),
+ isOnline: true,
+ getEmbeddingModel: jest.fn(() => NEW_MODEL),
+ batchUpsertFiles: jest.fn(async (files) => ({ success: true, count: files.length }))
+ };
+ history = { updateEmbeddingStateByPath: jest.fn().mockResolvedValue(undefined) };
+ mockContainer.resolve.mockReset();
+ mockContainer.resolve.mockImplementation((id) => {
+ if (id === 'ORAMA_VECTOR') return vectorDb;
+ if (id === 'ANALYSIS_HISTORY') return history;
+ if (id === 'PROCESSING_STATE') return null;
+ throw new Error(`unexpected service ${id}`);
+ });
+ });
+
+ async function newQueue() {
+ const q = new EmbeddingQueue({ flushDelayMs: 0 });
+ // Persistence is stubbed, so this restores nothing.
+ await q.initialize();
+ // Keeps flush from arming retry and persist timers that outlive the test.
+ q._isShuttingDown = true;
+ return q;
+ }
+
+ test('flush never writes a vector from another model, even one of the same dimension', async () => {
+ const q = await newQueue();
+ const stale = fileItem('stale.pdf', OLD_MODEL);
+ const fresh = fileItem('fresh.pdf', NEW_MODEL);
+ // Another quantization of the index model embeds into the same space
+ // (the same-dimension fallback chain produces these).
+ const quantized = fileItem('quantized.pdf', 'new-embed-v2-Q4_K_M.gguf');
+ // No stamp: nothing says which model made it, so flush keeps it.
+ const unstamped = fileItem('unstamped.pdf');
+ q.queue = [stale, fresh, quantized, unstamped];
+
+ await q.flush();
+
+ expect(vectorDb.batchUpsertFiles).toHaveBeenCalledTimes(1);
+ const written = vectorDb.batchUpsertFiles.mock.calls[0][0].map((f) => f.id);
+ expect(written).toEqual([fresh.id, quantized.id, unstamped.id]);
+ expect(q.queue).toHaveLength(0);
+ // Dropped, not failed: it must not churn into the retry or dead-letter queues.
+ expect(q._failedItemHandler.failedItems.has(stale.id)).toBe(false);
+ expect(q._failedItemHandler.deadLetterQueue).toHaveLength(0);
+ // Nor be reported as embedded.
+ expect(history.updateEmbeddingStateByPath).not.toHaveBeenCalledWith('/docs/stale.pdf', {
+ status: 'done'
+ });
+ });
+
+ test('a model change drops queued, retrying and dead-lettered vectors not from the new model', async () => {
+ const q = await newQueue();
+ const fresh = fileItem('fresh.pdf', NEW_MODEL);
+ q.queue = [fileItem('stale.pdf', OLD_MODEL), fileItem('unstamped.pdf'), fresh];
+ const retrying = fileItem('retrying.pdf', OLD_MODEL);
+ q._failedItemHandler.failedItems.set(retrying.id, {
+ item: retrying,
+ retryCount: 1,
+ lastAttempt: Date.now(),
+ error: 'timeout'
+ });
+ const freshDead = deadLetterEntry(fileItem('fresh-dead.pdf', NEW_MODEL));
+ q._failedItemHandler.setDeadLetterQueue([
+ deadLetterEntry(fileItem('dead.pdf', OLD_MODEL)),
+ freshDead
+ ]);
+
+ const dropped = q.dropOtherModelEmbeddings(NEW_MODEL);
+
+ expect(dropped).toBe(4);
+ expect(q.queue).toEqual([fresh]);
+ expect(q._failedItemHandler.failedItems.size).toBe(0);
+ expect(q._failedItemHandler.deadLetterQueue).toEqual([freshDead]);
+ const dropLines = mockLogger.info.mock.calls.filter(([msg]) => /Dropped 4 /.test(msg));
+ expect(dropLines).toHaveLength(1);
+ });
+});
diff --git a/test/renderer/components/search/useGraphTab.networkTrash.test.js b/test/renderer/components/search/useGraphTab.networkTrash.test.js
new file mode 100644
index 00000000..cb4aa6ff
--- /dev/null
+++ b/test/renderer/components/search/useGraphTab.networkTrash.test.js
@@ -0,0 +1,115 @@
+/**
+ * @jest-environment jsdom
+ */
+/**
+ * Duplicate cleanup reports copies left on a network drive with the reason,
+ * since Windows has no Recycle Bin there, instead of "see logs".
+ */
+import { renderHook, act } from '@testing-library/react';
+
+const mockDispatch = jest.fn();
+let mockState = {};
+
+jest.mock('../../../../src/renderer/store/hooks', () => ({
+ useAppDispatch: jest.fn(() => mockDispatch),
+ useAppSelector: jest.fn((selector) => selector(mockState))
+}));
+
+const mockNotification = { showInfo: jest.fn(), addNotification: jest.fn() };
+
+jest.mock('../../../../src/renderer/contexts/NotificationContext', () => ({
+ useNotification: jest.fn(() => mockNotification)
+}));
+
+jest.mock('../../../../src/renderer/hooks', () => {
+ const actions = new Proxy({}, { get: () => jest.fn() });
+ return {
+ useGraphState: () => ({ nodes: [], edges: [], selectedNodeId: null, actions })
+ };
+});
+
+jest.mock('../../../../src/renderer/components/search/hooks/useDuplicateBadgeScan', () => ({
+ useDuplicateBadgeScan: jest.fn()
+}));
+
+jest.mock('../../../../src/renderer/utils/elkLayout', () => ({
+ elkLayout: jest.fn(),
+ cancelPendingLayout: jest.fn(),
+ debouncedElkLayout: jest.fn(),
+ smartLayout: jest.fn(),
+ clusterRadialLayout: jest.fn(),
+ clusterExpansionLayout: jest.fn(),
+ LARGE_GRAPH_THRESHOLD: 1000
+}));
+
+import { useGraphTab } from '../../../../src/renderer/components/search/hooks/useGraphTab';
+
+function buildState() {
+ return {
+ ui: { currentPhase: 'organize', viewMode: 'phased', isOrganizing: false, isLoading: false },
+ files: {
+ smartFolders: [],
+ selectedFiles: [],
+ fileStates: {},
+ organizedFiles: [],
+ organizedPathIndex: []
+ },
+ analysis: { isAnalyzing: false, results: [] }
+ };
+}
+
+test('a copy on a network drive is reported with its reason', async () => {
+ mockState = buildState();
+ const setError = jest.fn();
+ window.electronAPI = {
+ embeddings: {
+ trashDuplicates: jest.fn(async () => ({
+ success: false,
+ trashed: [{ path: 'C:/docs/b.pdf', size: 1 }],
+ failed: [{ path: 'Z:/team/c.pdf', code: 'NETWORK_NO_RECYCLE_BIN', error: 'network' }],
+ skipped: []
+ })),
+ findDuplicates: jest.fn(async () => ({ success: true, groups: [] }))
+ }
+ };
+ const ref = () => ({ current: null });
+ const { result } = renderHook(() =>
+ useGraphTab({
+ isOpen: false,
+ activeTab: 'search',
+ onClose: jest.fn(),
+ query: '',
+ setQuery: jest.fn(),
+ defaultTopK: 10,
+ stats: null,
+ graphViewEnabled: false,
+ setError,
+ recommendationMap: {},
+ sidebarSections: {},
+ chatMessages: [],
+ setChatMessages: jest.fn(),
+ clusterActionRefs: ref(),
+ handleMoveAllToFolderRef: ref(),
+ layoutRequestCounterRef: { current: 0 },
+ error: null,
+ hasLoadedStats: false,
+ refreshStats: jest.fn(),
+ organizationalHealthRef: ref()
+ })
+ );
+
+ await act(async () => {
+ await result.current.handleResolveDuplicates([
+ {
+ tier: 'nearIdentical',
+ keep: { path: 'C:/docs/a.pdf' },
+ delete: [{ path: 'C:/docs/b.pdf' }, { path: 'Z:/team/c.pdf' }]
+ }
+ ]);
+ });
+
+ const messages = setError.mock.calls.map(([m]) => m).filter(Boolean);
+ expect(messages.join(' ')).toMatch(/Trashed 1 of 2. Left 1 on a network drive/);
+ expect(messages.join(' ')).not.toMatch(/see the logs/i);
+ delete window.electronAPI;
+});
diff --git a/test/renderer/components/search/useSearchTab.test.js b/test/renderer/components/search/useSearchTab.test.js
index 12d9d39b..55fdd657 100644
--- a/test/renderer/components/search/useSearchTab.test.js
+++ b/test/renderer/components/search/useSearchTab.test.js
@@ -118,4 +118,90 @@ describe('useSearchTab', () => {
);
expect(result.current.searchResults).toEqual([]);
});
+ test('searchExactly re-runs the query with spelling correction off, and only for it', async () => {
+ window.electronAPI.embeddings.search = jest.fn(async (q, options) => ({
+ success: true,
+ results: [{ id: 'r1', metadata: { name: 'beach.jpg', path: '/p/beach.jpg' }, score: 0.9 }],
+ mode: 'hybrid',
+ meta: {},
+ queryMeta: options.correctSpelling
+ ? {
+ original: q,
+ corrected: 'vacation photos',
+ corrections: [{ original: 'vacaton', corrected: 'vacation' }]
+ }
+ : { original: q, corrected: q, corrections: [] }
+ }));
+ const { result } = mount();
+
+ act(() => {
+ result.current.setQuery('vacaton photos');
+ });
+ await waitFor(() => expect(result.current.queryMeta?.corrections).toHaveLength(1));
+ expect(window.electronAPI.embeddings.search).toHaveBeenLastCalledWith(
+ 'vacaton photos',
+ expect.objectContaining({ correctSpelling: true })
+ );
+
+ act(() => {
+ result.current.searchExactly();
+ });
+ await waitFor(() => expect(window.electronAPI.embeddings.search).toHaveBeenCalledTimes(2));
+ expect(window.electronAPI.embeddings.search).toHaveBeenLastCalledWith(
+ 'vacaton photos',
+ expect.objectContaining({ correctSpelling: false })
+ );
+ await waitFor(() => expect(result.current.queryMeta?.corrections).toEqual([]));
+ expect(result.current.exactSearch).toEqual({
+ query: 'vacaton photos',
+ corrected: 'vacation photos'
+ });
+
+ // A different query is corrected again.
+ act(() => {
+ result.current.setQuery('vacaton videos');
+ });
+ await waitFor(() => expect(window.electronAPI.embeddings.search).toHaveBeenCalledTimes(3));
+ expect(window.electronAPI.embeddings.search).toHaveBeenLastCalledWith(
+ 'vacaton videos',
+ expect.objectContaining({ correctSpelling: true })
+ );
+ expect(result.current.exactSearch).toBeNull();
+ });
+
+ test('searchWithCorrection turns spelling correction back on', async () => {
+ window.electronAPI.embeddings.search = jest.fn(async (q, options) => ({
+ success: true,
+ results: [{ id: 'r1', metadata: { name: 'a.pdf', path: '/p/a.pdf' }, score: 0.9 }],
+ mode: 'hybrid',
+ meta: {},
+ queryMeta: options.correctSpelling
+ ? {
+ original: q,
+ corrected: 'budget report',
+ corrections: [{ original: 'budgett', corrected: 'budget' }]
+ }
+ : { original: q, corrected: q, corrections: [] }
+ }));
+ const { result } = mount();
+
+ act(() => {
+ result.current.setQuery('budgett report');
+ });
+ await waitFor(() => expect(result.current.queryMeta?.corrections).toHaveLength(1));
+ act(() => {
+ result.current.searchExactly();
+ });
+ await waitFor(() => expect(window.electronAPI.embeddings.search).toHaveBeenCalledTimes(2));
+
+ act(() => {
+ result.current.searchWithCorrection();
+ });
+ await waitFor(() => expect(window.electronAPI.embeddings.search).toHaveBeenCalledTimes(3));
+ expect(window.electronAPI.embeddings.search).toHaveBeenLastCalledWith(
+ 'budgett report',
+ expect.objectContaining({ correctSpelling: true })
+ );
+ expect(result.current.exactSearch).toBeNull();
+ });
});
diff --git a/test/validationSchemas.test.js b/test/validationSchemas.test.js
index 705ae6c9..ad7eb9eb 100644
--- a/test/validationSchemas.test.js
+++ b/test/validationSchemas.test.js
@@ -672,16 +672,25 @@ describe('validationSchemas (Zod path)', () => {
});
});
- test('trash and triage schemas keep refusing UNC on Windows', () => {
+ test('triage start keeps refusing UNC on Windows', () => {
setPlatform('win32');
- expect(schemas.trashDuplicates.safeParse({ paths: ['\\\\NAS\\Docs\\a.pdf'] }).success).toBe(
- false
- );
expect(schemas.downloadsTriageStart.safeParse({ folderPath: '\\\\NAS\\Docs' }).success).toBe(
false
);
});
+ // A duplicate set can span a Smart Folder on a share. The schema lets the
+ // request through so the local copies are trashed; TrashService leaves the
+ // share copy in place, because Windows has no Recycle Bin there.
+ test('trash duplicates accepts a share path but not an admin share or device path', () => {
+ setPlatform('win32');
+ const parse = (p) => schemas.trashDuplicates.safeParse({ paths: [p] }).success;
+ expect(parse('\\\\NAS\\Docs\\a.pdf')).toBe(true);
+ expect(parse('\\\\NAS\\C$\\Windows\\a.dll')).toBe(false);
+ expect(parse('\\\\?\\C:\\Windows\\a.dll')).toBe(false);
+ expect(parse('\\\\NAS\\Docs\\..\\..\\a.pdf')).toBe(false);
+ });
+
// The renderer sends suggestedFolderPath with every triage action, so a
// Smart Folder on a share used to fail a whole Trash or Ignore request.
describe('triage act suggestedFolderPath', () => {
diff --git a/test/workers/textExtractionWorker.test.js b/test/workers/textExtractionWorker.test.js
index 5abfbd6a..9f9db5ee 100644
--- a/test/workers/textExtractionWorker.test.js
+++ b/test/workers/textExtractionWorker.test.js
@@ -46,6 +46,20 @@ describe('main/workers/textExtractionWorker', () => {
expect(out).not.toMatch(/script|style/i);
});
+ test('strips script and style bodies whose end tags carry spaces, attributes or upper case', () => {
+ const html =
+ '
Before
' +
+ '
After
';
+ const out = runTextExtraction({ type: 'html', payload: { text: html } });
+ expect(out).toBe('Before After');
+ });
+
+ test('a script end tag needs a word boundary, so does not end it', () => {
+ const html = '
A
B
';
+ const out = runTextExtraction({ type: 'html', payload: { text: html } });
+ expect(out).toBe('A B');
+ });
+
test('returns input verbatim on catastrophic HTML (falls through try/catch)', () => {
// The worker's try/catch guarantees we always return a string even if
// the input would otherwise blow up downstream regex engines.
From 2d6bfda907275ba819b1b18af72b38cafe67208c Mon Sep 17 00:00:00 2001
From: Levy Tate <78818969+iLevyTate@users.noreply.github.com>
Date: Sun, 15 Nov 2026 13:15:30 -0500
Subject: [PATCH 4/5] copy: plain wording across the app and Settings paths
that exist
- Remove em and en dashes from user-visible text in the renderer and in
main-process messages that reach the UI. Number and date ranges read
"X to Y". Lone placeholders for empty values stay.
- Drop "Please" from error and toast messages, and cut filler ("Ask me
anything", "streamlined", "with confidence"). Meaning, numbers and
feature names are unchanged.
- Point messages at Settings sections that exist: Model management for
downloads, Default AI models for picking a model, Local AI engine when
the engine is down, AI Provider for cloud providers. "Settings > Models",
"Settings > AI" and "Settings > Advanced" did not exist.
- Semantic IPC errors name the feature ("The search index isn't ready yet")
instead of internal service names.
- Text that code matches on ("Vector DB", "invalid characters", "Another
batch operation is already in progress") keeps those phrases.
- Log lines, prompts sent to the model, entity tables and code comments are
unchanged.
---
src/main/errors/AnalysisError.js | 21 +++----
src/main/errors/ErrorHandler.js | 16 ++---
src/main/errors/FileSystemError.js | 10 ++--
src/main/ipc/aiProvider.js | 4 +-
src/main/ipc/analysisHistory.js | 2 +-
src/main/ipc/files/batchOrganizeHandler.js | 2 +-
src/main/ipc/ipcWrappers.js | 4 +-
src/main/ipc/semantic.js | 25 +++++---
src/main/ipc/settings.js | 2 +-
src/main/ipc/smartFolders.js | 4 +-
src/main/ipc/undoRedo.js | 2 +-
src/main/ipc/validationSchemas.js | 4 +-
src/main/llamaUtils.js | 14 ++---
src/main/services/ChatService.js | 6 +-
src/main/services/DegradationManager.js | 6 +-
src/main/services/FolderMatchingService.js | 2 +-
src/main/services/LlamaService.js | 6 +-
src/main/services/ModelDownloadManager.js | 4 +-
src/main/services/SearchService.js | 6 +-
src/main/services/SmartFolderWatcher.js | 5 +-
src/main/services/WhisperService.js | 2 +-
src/main/services/ai/AIRouter.js | 6 +-
.../services/triage/DownloadsTriageService.js | 6 +-
.../services/triage/FastTriageClassifier.js | 6 +-
src/main/simple-main.js | 4 +-
src/renderer/components/AnalysisDetails.jsx | 2 +-
src/renderer/components/ErrorBoundary.jsx | 8 +--
src/renderer/components/ModelSetupWizard.jsx | 8 +--
src/renderer/components/NavigationBar.jsx | 2 +-
src/renderer/components/SettingsPanel.jsx | 10 ++--
src/renderer/components/UndoRedoSystem.jsx | 10 ++--
.../components/common/AIProviderBadge.jsx | 2 +-
.../components/common/AIProviderIcon.jsx | 2 +-
.../components/common/CloudAIConsentModal.jsx | 2 +-
.../components/dashboard/DashboardView.jsx | 4 +-
.../dashboard/KnowledgeStatsCard.jsx | 2 +-
.../components/layout/DegradedStateBanner.jsx | 6 +-
.../organize/DuplicateResolutionModal.jsx | 4 +-
.../organize/OrganizePreviewModal.jsx | 4 +-
.../components/organize/ReadyFileItem.jsx | 4 +-
.../components/organize/TagClusterModal.jsx | 2 +-
.../components/organize/TriageModal.jsx | 2 +-
.../organize/UncategorizedActionsBar.jsx | 4 +-
.../components/search/AtlasTabContent.jsx | 6 +-
.../components/search/BridgeAnalysisModal.jsx | 2 +-
src/renderer/components/search/ChatPanel.jsx | 3 +-
.../components/search/ClusterNode.jsx | 6 +-
.../components/search/ComparisonTable.jsx | 4 +-
.../search/EmptyEmbeddingsBanner.jsx | 2 +-
.../components/search/EmptySearchState.jsx | 2 +-
.../components/search/GapAnalysisCard.jsx | 4 +-
.../components/search/GraphTabContent.jsx | 13 +++--
src/renderer/components/search/GraphTour.jsx | 4 +-
.../components/search/SimilarityEdge.jsx | 2 +-
.../components/search/TimelineTabContent.jsx | 2 +-
.../components/search/UnifiedSearchModal.jsx | 2 +-
.../components/search/hooks/useChatTab.js | 10 ++--
.../components/search/hooks/useGraphTab.js | 5 +-
.../components/search/hooks/useSearchTab.js | 4 +-
.../search/utils/searchResultUtils.js | 4 +-
.../settings/AIProviderConfigModal.jsx | 12 ++--
.../components/settings/AIProviderSection.jsx | 2 +-
.../settings/AutoOrganizeSection.jsx | 14 ++---
.../settings/ChatPersonaSection.jsx | 12 ++--
.../settings/DefaultLocationsSection.jsx | 2 +-
.../settings/DiagnosticsLogsSection.jsx | 2 +-
.../settings/EmbeddingRebuildSection.jsx | 22 +++----
.../settings/LegalNoticesSection.jsx | 2 +-
.../settings/LlamaConfigSection.jsx | 6 +-
.../components/settings/McpServerSection.jsx | 2 +-
.../settings/ModelManagementSection.jsx | 2 +-
.../components/setup/AddSmartFolderModal.jsx | 16 ++---
.../setup/SmartFolderAIOverrideField.jsx | 2 +-
.../components/setup/WatcherStatusLine.jsx | 2 +-
.../components/triage/DownloadsTriageView.jsx | 20 +++----
src/renderer/components/ui/Modal.jsx | 2 +-
src/renderer/index.js | 3 +-
src/renderer/phases/CompletePhase.jsx | 4 +-
src/renderer/phases/DiscoverPhase.jsx | 14 ++---
src/renderer/phases/OrganizePhase.jsx | 13 ++---
src/renderer/phases/SetupPhase.jsx | 10 ++--
src/renderer/phases/WelcomePhase.jsx | 7 +--
.../phases/discover/useFileHandlers.js | 8 +--
.../phases/organize/useOrganization.js | 6 +-
src/renderer/services/ipc/electronApi.js | 2 +-
src/renderer/services/ipc/smartFoldersIpc.js | 2 +-
.../store/middleware/ipcMiddleware.js | 2 +-
.../store/middleware/persistenceMiddleware.js | 8 +--
src/renderer/utils/errorMapping.js | 58 +++++++++----------
src/shared/smartFolderNameValidation.js | 2 +-
src/shared/supportInfo.js | 2 +-
test/AnalysisError.test.js | 2 +-
test/ErrorHandler.extended.test.js | 8 +--
test/SearchService.dimensionMismatch.test.js | 6 +-
test/components/AIProviderBadge.test.js | 4 +-
...artFolderModal.generateDescription.test.js | 2 +-
.../LlamaConfigSection.healthBadge.test.js | 2 +-
test/components/ModelSetupWizard.test.js | 2 +-
test/components/OrganizePhase.test.js | 4 +-
test/components/OrganizePreviewModal.test.js | 2 +-
.../ReadyFileItem.suggestedNewFolder.test.js | 2 +-
test/components/StatusBadge.test.js | 2 +-
test/components/WelcomePhase.test.js | 6 +-
.../dashboard/DashboardView.test.js | 4 +-
.../dashboard/KnowledgeStatsCard.test.js | 4 +-
test/e2e/settings/ai-provider.spec.js | 2 +-
test/errorMapping.circuitOpen.test.js | 2 +-
test/ipcServices.test.js | 2 +-
test/llamaUtils.test.js | 2 +-
.../search/useChatTab.scope.test.js | 2 +-
test/searchUtils.test.js | 2 +-
test/useOrganization.runOutcome.test.js | 4 +-
112 files changed, 321 insertions(+), 328 deletions(-)
diff --git a/src/main/errors/AnalysisError.js b/src/main/errors/AnalysisError.js
index aebe5649..1e009c5b 100644
--- a/src/main/errors/AnalysisError.js
+++ b/src/main/errors/AnalysisError.js
@@ -65,15 +65,16 @@ class AnalysisError extends Error {
PDF_PROCESSING_FAILURE:
"This PDF file couldn't be processed. It may be corrupted or password-protected.",
IMAGE_ANALYSIS_FAILURE:
- "This image couldn't be analyzed. Please check the file format and try again.",
- MODEL_NOT_INSTALLED: `Missing AI model: ${this.metadata.requiredModel}. Please install it to continue.`,
- AI_ENGINE_CONNECTION_FAILURE: 'AI engine unavailable. Check Settings > Models and try again.',
- DOCUMENT_ANALYSIS_FAILURE: 'Failed to analyze this document. Please check the file format.',
+ "This image couldn't be analyzed. Check the file format and try again.",
+ MODEL_NOT_INSTALLED: `Missing AI model: ${this.metadata.requiredModel}. Install it to continue.`,
+ AI_ENGINE_CONNECTION_FAILURE:
+ 'AI engine unavailable. Check Settings → Local AI engine and try again.',
+ DOCUMENT_ANALYSIS_FAILURE: 'Failed to analyze this document. Check the file format.',
PDF_NO_TEXT_CONTENT: 'This PDF appears to be image-based. Try using image analysis instead.',
- MODEL_VERIFICATION_FAILED: 'AI model verification failed. Please check your model downloads.',
- DEPENDENCY_MISSING: `System component missing: ${this.metadata.dependency}. Please reinstall the application.`,
+ MODEL_VERIFICATION_FAILED: 'AI model verification failed. Check your model downloads.',
+ DEPENDENCY_MISSING: `System component missing: ${this.metadata.dependency}. Reinstall the application.`,
FILE_TYPE_UNSUPPORTED: `File type "${this.metadata.fileType}" is not supported for AI analysis.`,
- FILE_TOO_LARGE: 'File is too large for processing. Please use a smaller file.',
+ FILE_TOO_LARGE: 'File is too large to process. Use a smaller file.',
FILE_EMPTY: 'This file is empty, so there was nothing to analyze.',
FILE_READ_ERROR:
"This file couldn't be read. It may be locked, moved, or you may not have permission to access it.",
@@ -97,8 +98,8 @@ class AnalysisError extends Error {
getActionableSteps() {
/** @type {Record} */
const actions = {
- MODEL_NOT_INSTALLED: ['Open Settings > Models and download the missing model'],
- AI_ENGINE_CONNECTION_FAILURE: ['Check Settings > Models', 'Restart the app'],
+ MODEL_NOT_INSTALLED: ['Open Settings → Model management and download the missing model'],
+ AI_ENGINE_CONNECTION_FAILURE: ['Check Settings → Local AI engine', 'Restart the app'],
DEPENDENCY_MISSING: [
`Check that ${this.metadata.dependency} is installed correctly`,
'Restart the application',
@@ -133,7 +134,7 @@ class ModelMissingError extends AnalysisError {
constructor(modelName) {
super('MODEL_NOT_INSTALLED', {
requiredModel: modelName,
- installCommand: `Download model in Settings > Models: ${modelName}`,
+ installCommand: `Download the model in Settings → Model management: ${modelName}`,
category: 'model'
});
}
diff --git a/src/main/errors/ErrorHandler.js b/src/main/errors/ErrorHandler.js
index 0fc67447..819e1134 100644
--- a/src/main/errors/ErrorHandler.js
+++ b/src/main/errors/ErrorHandler.js
@@ -225,7 +225,7 @@ class ErrorHandler {
parseError(error) {
const errorInfo = {
type: ERROR_TYPES.UNKNOWN,
- message: 'Something went wrong. Please try again.',
+ message: 'Something went wrong. Try again.',
details: {},
stack: error?.stack
};
@@ -286,11 +286,12 @@ class ErrorHandler {
switch (resolvedCode) {
case ERROR_CODES.LLAMA_MODEL_INCOMPATIBLE_CPU:
errorInfo.message =
- 'This build of the AI engine is not compatible with your CPU. Switch to the small Qwen 0.5B profile in Settings > Models.';
+ 'This build of the AI engine is not compatible with your CPU. Switch to the small Qwen 0.5B profile in Settings → Default AI models.';
break;
case ERROR_CODES.LLAMA_MODEL_NOT_FOUND:
case ERROR_CODES.LLAMA_MODEL_PATH_MISMATCH:
- errorInfo.message = 'AI model file is missing. Open Settings > Models to install it.';
+ errorInfo.message =
+ 'AI model file is missing. Open Settings → Model management to install it.';
break;
case ERROR_CODES.LLAMA_OOM:
errorInfo.message = 'Out of memory. Try a smaller model or close other applications.';
@@ -301,14 +302,15 @@ class ErrorHandler {
break;
case ERROR_CODES.LLAMA_MODEL_LOAD_FAILED:
errorInfo.message =
- 'Could not load the AI model. Re-download it from Settings > Models.';
+ 'Could not load the AI model. Re-download it from Settings → Model management.';
break;
case ERROR_CODES.LLAMA_INFERENCE_FAILED:
errorInfo.message =
- 'AI inference failed. The prompt may be too long for this model — shorten the input or switch to a larger model.';
+ 'AI inference failed. The prompt may be too long for this model. Shorten the input or switch to a larger model.';
break;
default:
- errorInfo.message = 'AI engine unavailable. Check Settings > Models and try again.';
+ errorInfo.message =
+ 'AI engine unavailable. Check Settings → Local AI engine and try again.';
}
} else if (isNetworkError(error)) {
errorInfo.type = ERROR_TYPES.NETWORK_ERROR;
@@ -316,7 +318,7 @@ class ErrorHandler {
errorInfo.message =
'Request timed out. The AI model may be loading or your system is busy.';
} else {
- errorInfo.message = 'A network-related error occurred. Please try again.';
+ errorInfo.message = 'A network error occurred. Try again.';
}
} else {
// Keep original message if it's user-friendly, otherwise provide generic
diff --git a/src/main/errors/FileSystemError.js b/src/main/errors/FileSystemError.js
index 873c020d..fa26987a 100644
--- a/src/main/errors/FileSystemError.js
+++ b/src/main/errors/FileSystemError.js
@@ -213,7 +213,7 @@ class FileSystemError extends Error {
[FILE_SYSTEM_ERROR_CODES.PERMISSION_DENIED]:
'You do not have permission to perform this action. Try running as administrator.',
[FILE_SYSTEM_ERROR_CODES.WRITE_FAILED]:
- 'Failed to save the file. Please check that the location is writable.',
+ 'Failed to save the file. Check that the location is writable.',
[FILE_SYSTEM_ERROR_CODES.READ_FAILED]:
'Failed to read the file. It may be corrupted or inaccessible.',
[FILE_SYSTEM_ERROR_CODES.DELETE_FAILED]:
@@ -232,8 +232,7 @@ class FileSystemError extends Error {
'The folder is not empty. Remove its contents first.',
[FILE_SYSTEM_ERROR_CODES.NOT_A_DIRECTORY]: 'Expected a folder but found a file.',
[FILE_SYSTEM_ERROR_CODES.NOT_A_FILE]: 'Expected a file but found a folder.',
- [FILE_SYSTEM_ERROR_CODES.DISK_FULL]:
- 'Your disk is full. Please free up some space and try again.',
+ [FILE_SYSTEM_ERROR_CODES.DISK_FULL]: 'Your disk is full. Free up some space and try again.',
[FILE_SYSTEM_ERROR_CODES.QUOTA_EXCEEDED]: 'Your storage quota has been exceeded.',
[FILE_SYSTEM_ERROR_CODES.TOO_MANY_OPEN_FILES]:
'Too many files are open. Close some applications and try again.',
@@ -252,8 +251,7 @@ class FileSystemError extends Error {
'File verification failed. The file may be corrupted.',
[FILE_SYSTEM_ERROR_CODES.SIZE_MISMATCH]:
'File size verification failed. The copy may be incomplete.',
- [FILE_SYSTEM_ERROR_CODES.PARTIAL_WRITE]:
- 'Only part of the file was written. Please try again.',
+ [FILE_SYSTEM_ERROR_CODES.PARTIAL_WRITE]: 'Only part of the file was written. Try again.',
[FILE_SYSTEM_ERROR_CODES.CORRUPTED_FILE]:
'The file appears to be corrupted and cannot be processed.',
[FILE_SYSTEM_ERROR_CODES.WATCHER_FAILED]: 'Failed to monitor the folder for changes.',
@@ -273,7 +271,7 @@ class FileSystemError extends Error {
[FILE_SYSTEM_ERROR_CODES.UNKNOWN_ERROR]: 'An unexpected file system error occurred.'
};
- return userMessages[this.code] || 'A file system error occurred. Please try again.';
+ return userMessages[this.code] || 'A file system error occurred. Try again.';
}
/**
diff --git a/src/main/ipc/aiProvider.js b/src/main/ipc/aiProvider.js
index 3915507f..905f39c5 100644
--- a/src/main/ipc/aiProvider.js
+++ b/src/main/ipc/aiProvider.js
@@ -66,7 +66,7 @@ const _SAFE_ERROR_MESSAGES = Object.freeze({
CONTENT_TOO_LONG: 'Request too large for the provider.',
BUDGET_EXCEEDED: 'Monthly spend cap reached. Adjust the cap or wait until next month.',
PROVIDER_DISABLED: 'This provider is not enabled.',
- NO_PROVIDER_READY: 'No AI provider is ready. Configure one in Settings → AI.',
+ NO_PROVIDER_READY: 'No AI provider is ready. Configure one in Settings → AI Provider.',
PROVIDER_FAILED: 'The provider returned an error. Try again or switch providers.',
INVALID_RESPONSE: 'The provider returned an unexpected response.'
});
@@ -368,7 +368,7 @@ function registerAiProviderIpc(servicesOrParams) {
_router.on('folder-override-unavailable', (payload) => {
const providerLabel = payload?.configuredProvider || 'cloud';
safeSendToMain(getMainWindow, IPC_EVENTS.NOTIFICATION, {
- message: `Smart folder AI override (${providerLabel}) is unavailable — using local model.`,
+ message: `Smart folder AI override (${providerLabel}) is unavailable. Using the local model.`,
severity: 'warning',
duration: 8000,
source: 'ai-provider',
diff --git a/src/main/ipc/analysisHistory.js b/src/main/ipc/analysisHistory.js
index 7912da92..bcb2478a 100644
--- a/src/main/ipc/analysisHistory.js
+++ b/src/main/ipc/analysisHistory.js
@@ -38,7 +38,7 @@ function _raiseAnalysisHistoryDegraded(detailContext) {
severity: 'error',
message:
'Analysis history is temporarily unavailable. Past results may not appear; ' +
- 're-analyzing files will not help. Try restarting the app — if this persists, ' +
+ 're-analyzing files will not help. Try restarting the app. If this persists, ' +
'check the app log.',
detail: detailContext
});
diff --git a/src/main/ipc/files/batchOrganizeHandler.js b/src/main/ipc/files/batchOrganizeHandler.js
index c4d44282..d5da7e33 100644
--- a/src/main/ipc/files/batchOrganizeHandler.js
+++ b/src/main/ipc/files/batchOrganizeHandler.js
@@ -572,7 +572,7 @@ async function handleBatchOrganize(params) {
log.warn('[FILE-OPS] Could not acquire batch lock - another batch operation is in progress');
return {
success: false,
- error: 'Another batch operation is already in progress. Please wait for it to complete.',
+ error: 'Another batch operation is already in progress. Wait for it to finish.',
errorCode: ERROR_CODES.BATCH_LOCK_TIMEOUT
};
}
diff --git a/src/main/ipc/ipcWrappers.js b/src/main/ipc/ipcWrappers.js
index 305ca334..0d9d715e 100644
--- a/src/main/ipc/ipcWrappers.js
+++ b/src/main/ipc/ipcWrappers.js
@@ -182,7 +182,7 @@ function withVectorDbInit({ ensureInit, isInitRef, handler }) {
} catch (e) {
return {
success: false,
- error: 'Vector DB is not available yet. Please try again in a moment.',
+ error: 'Vector DB is not available yet. Try again in a moment.',
code: e?.code || 'VECTOR_DB_UNAVAILABLE',
unavailable: true
};
@@ -191,7 +191,7 @@ function withVectorDbInit({ ensureInit, isInitRef, handler }) {
if (!isInitRef()) {
return {
success: false,
- error: 'Vector DB initialization pending. Please try again in a few seconds.',
+ error: 'Vector DB is still starting. Try again in a few seconds.',
code: 'VECTOR_DB_PENDING',
pending: true
};
diff --git a/src/main/ipc/semantic.js b/src/main/ipc/semantic.js
index e6b170b7..eb4f6b49 100644
--- a/src/main/ipc/semantic.js
+++ b/src/main/ipc/semantic.js
@@ -15,10 +15,17 @@ const getLlamaService = () => container.tryResolve(ServiceIds.LLAMA_SERVICE);
const getUndoRedoService = () => container.tryResolve(ServiceIds.UNDO_REDO);
const { getInstance: getAtlasService } = require('../services/AtlasProjectionService');
+/** @type {Record} */
+const SERVICE_LABELS = {
+ OramaVectorService: 'The search index',
+ ClusteringService: 'Clustering',
+ AtlasProjectionService: 'The Atlas view'
+};
+
/** @param {string} name */
const SERVICE_UNAVAILABLE = (name) => ({
success: false,
- error: `${name} not available — service may still be initializing`,
+ error: `${SERVICE_LABELS[name] || 'This feature'} isn't ready yet. It may still be starting.`,
errorCode: 'SERVICE_UNAVAILABLE'
});
@@ -185,7 +192,7 @@ async function verifyEmbeddingModelAvailable(logger, preferredModel = null) {
return {
available: false,
model: preferredModel || AI_DEFAULTS.EMBEDDING.MODEL,
- error: 'LlamaService not available — AI engine may still be initializing'
+ error: "The AI engine isn't ready yet. It may still be starting."
};
}
const cfg = await llama.getConfig();
@@ -259,7 +266,7 @@ async function verifyEmbeddingModelAvailable(logger, preferredModel = null) {
return {
available: false,
model,
- error: `Embedding model "${model}" not downloaded. Download it in Settings > Models.`,
+ error: `Embedding model "${model}" not downloaded. Download it in Settings → Model management.`,
availableModels: modelNames.slice(0, 10)
};
}
@@ -293,7 +300,7 @@ async function verifyReanalyzeModelsAvailable(logger) {
textModel: AI_DEFAULTS.TEXT.MODEL,
visionModel: AI_DEFAULTS.IMAGE.MODEL,
embeddingModel: AI_DEFAULTS.EMBEDDING.MODEL,
- error: 'LlamaService not available — AI engine may still be initializing'
+ error: "The AI engine isn't ready yet. It may still be starting."
};
}
const cfg = await llama.getConfig();
@@ -363,7 +370,7 @@ async function verifyReanalyzeModelsAvailable(logger) {
available: false,
model: textModel,
modelType: 'text',
- error: `Text model "${textModel}" not downloaded. Download it in Settings > Models.`
+ error: `Text model "${textModel}" not downloaded. Download it in Settings → Model management.`
};
}
}
@@ -395,7 +402,7 @@ async function verifyReanalyzeModelsAvailable(logger) {
available: false,
model: visionModel,
modelType: 'vision',
- error: `Vision model "${visionModel}" not downloaded. Download it in Settings > Models.`
+ error: `Vision model "${visionModel}" not downloaded. Download it in Settings → Model management.`
};
}
}
@@ -429,7 +436,7 @@ async function verifyReanalyzeModelsAvailable(logger) {
available: false,
model: embeddingModel,
modelType: 'embedding',
- error: `Embedding model "${embeddingModel}" not downloaded. Download it in Settings > Models.`
+ error: `Embedding model "${embeddingModel}" not downloaded. Download it in Settings → Model management.`
};
}
}
@@ -2561,7 +2568,7 @@ async function handleFullRebuild(
if (!llamaSvc) {
return {
success: false,
- error: 'AI engine is not available. Please wait for startup to complete and try again.',
+ error: 'AI engine is not available yet. Wait for startup to finish and try again.',
errorCode: 'SERVICE_NOT_READY'
};
}
@@ -4236,7 +4243,7 @@ function registerEmbeddingsIpc(servicesOrParams) {
} catch (e) {
return {
success: false,
- error: 'Vector DB is not available yet. Please try again in a moment.',
+ error: 'Vector DB is not available yet. Try again in a moment.',
code: e?.code || 'VECTOR_DB_UNAVAILABLE',
unavailable: true
};
diff --git a/src/main/ipc/settings.js b/src/main/ipc/settings.js
index 2cbfc8b1..7571b0bd 100644
--- a/src/main/ipc/settings.js
+++ b/src/main/ipc/settings.js
@@ -887,7 +887,7 @@ function registerSettingsIpc(servicesOrParams) {
const { bytesRead } = await fileHandle.read(buffer, 0, stats.size, 0);
const statsAfter = await fileHandle.stat();
if (statsAfter.size > MAX_IMPORT_SIZE || bytesRead > MAX_IMPORT_SIZE) {
- throw new Error('Import file size changed during read. Please try again.');
+ throw new Error('Import file size changed during read. Try again.');
}
// Read and parse import file
diff --git a/src/main/ipc/smartFolders.js b/src/main/ipc/smartFolders.js
index bf3ce68f..c2f13e31 100644
--- a/src/main/ipc/smartFolders.js
+++ b/src/main/ipc/smartFolders.js
@@ -1585,7 +1585,7 @@ async function handleSmartFoldersEdit(
if (illegalChars.test(updatedFolder.name)) {
return {
success: false,
- error: 'Folder name contains invalid characters. Please avoid: < > : " | ? *',
+ error: 'Folder name contains invalid characters: < > : " | ? *',
errorCode: ERROR_CODES.INVALID_FOLDER_NAME_CHARS
};
}
@@ -1727,7 +1727,7 @@ async function handleSmartFoldersEdit(
if (renameFailure?.code === 'EEXIST') {
return {
success: false,
- error: 'Destination directory now occupied — refusing overwrite',
+ error: 'Destination already exists. Nothing was overwritten.',
errorCode: ERROR_CODES.RENAME_FAILED,
details: renameFailure.message
};
diff --git a/src/main/ipc/undoRedo.js b/src/main/ipc/undoRedo.js
index 76b2fc4e..3a06f38f 100644
--- a/src/main/ipc/undoRedo.js
+++ b/src/main/ipc/undoRedo.js
@@ -53,7 +53,7 @@ function _raiseUndoRedoDegraded(detail) {
subsystem: 'undo-redo',
severity: 'error',
message:
- "Undo/redo isn't working — recent file moves can't be reversed from the toolbar. " +
+ "Undo/redo isn't working. Recent file moves can't be reversed from the toolbar. " +
'Avoid further destructive actions and restart the app to recover history.',
detail
});
diff --git a/src/main/ipc/validationSchemas.js b/src/main/ipc/validationSchemas.js
index 5205492f..de2af5bc 100644
--- a/src/main/ipc/validationSchemas.js
+++ b/src/main/ipc/validationSchemas.js
@@ -306,7 +306,7 @@ if (!z) {
if (data === undefined || data === null) return { data };
const n = typeof data === 'number' ? data : Number(data);
if (!Number.isFinite(n) || n < 1 || n > 500) {
- return { error: 'history limit must be a number 1–500' };
+ return { error: 'History limit must be a number from 1 to 500' };
}
return { data: n };
}),
@@ -314,7 +314,7 @@ if (!z) {
if (data === undefined || data === null) return { data: 50 };
const n = typeof data === 'number' ? data : Number(data);
if (!Number.isFinite(n) || n < 1 || n > 200) {
- return { error: 'undo history limit must be a number 1–200' };
+ return { error: 'Undo history limit must be a number from 1 to 200' };
}
return { data: Math.floor(n) };
}),
diff --git a/src/main/llamaUtils.js b/src/main/llamaUtils.js
index fc3635a2..2687ac0b 100644
--- a/src/main/llamaUtils.js
+++ b/src/main/llamaUtils.js
@@ -31,8 +31,8 @@ function _raiseLlamaConfigStale(/** @type {any} */ detail) {
subsystem: 'ai-engine',
severity: 'warning',
message:
- "Couldn't read AI model settings; using last known values. Open Settings → AI to verify " +
- 'the active models — changes you made may not be applied until the settings file is readable.',
+ "Couldn't read AI model settings; using last known values. Open Settings → Default AI models to verify " +
+ 'the active models. Changes you made may not apply until the settings file can be read.',
detail
});
} catch {
@@ -285,7 +285,7 @@ function raiseTextModelSubstitutedFlag(configuredModel, fallbackModel) {
code: TEXT_MODEL_SUBSTITUTED_FLAG,
subsystem: 'llama',
severity: 'warning',
- message: `Configured text model "${configuredModel}" is not installed. Analysis is using "${fallbackModel}" instead; pick a model in Settings → Models to clear this notice.`,
+ message: `Configured text model "${configuredModel}" is not installed. Analysis is using "${fallbackModel}" instead; pick a model in Settings → Default AI models to clear this notice.`,
detail: {
errorCode: ERROR_CODES.LLAMA_MODEL_AUTO_FALLBACK,
type: 'text',
@@ -317,7 +317,7 @@ async function ensureTextModelReadyForAnalysis() {
if (!service) {
return {
ok: false,
- error: 'AI engine unavailable. Check Settings > Models and try again.'
+ error: 'AI engine unavailable. Check Settings → Local AI engine and try again.'
};
}
@@ -327,7 +327,7 @@ async function ensureTextModelReadyForAnalysis() {
} catch (err) {
return {
ok: false,
- error: `AI engine failed to initialize: ${err?.message || String(err)}. Check Settings > Models.`
+ error: `AI engine failed to initialize: ${err?.message || String(err)}. Check Settings → Local AI engine.`
};
}
}
@@ -352,7 +352,7 @@ async function ensureTextModelReadyForAnalysis() {
} catch (err) {
return {
ok: false,
- error: `Could not verify AI models: ${err?.message || String(err)}. Check Settings > Models.`
+ error: `Could not verify AI models: ${err?.message || String(err)}. Check Settings → Model management.`
};
}
@@ -407,7 +407,7 @@ async function ensureTextModelReadyForAnalysis() {
} else {
return {
ok: false,
- error: `Text model "${textModel}" not downloaded. Download it in Settings > Models.`
+ error: `Text model "${textModel}" not downloaded. Download it in Settings → Model management.`
};
}
}
diff --git a/src/main/services/ChatService.js b/src/main/services/ChatService.js
index 3a79dee5..7f0bc580 100644
--- a/src/main/services/ChatService.js
+++ b/src/main/services/ChatService.js
@@ -919,9 +919,7 @@ Now respond as JSON:`;
this.chatHistoryStore.addMessage(memory.sessionId, {
role: 'assistant',
text: '',
- modelAnswer: [
- { text: `Error: ${error.message || 'Response failed'}. Please try again.` }
- ]
+ modelAnswer: [{ text: `Error: ${error.message || 'Response failed'}. Try again.` }]
});
}
} catch (saveErr) {
@@ -971,7 +969,7 @@ Now respond as JSON:`;
}) {
if (!this.llamaService) {
const err = new Error(
- 'LLM model not loaded — open StratoSort and wait for the model to finish loading.'
+ "The AI model isn't loaded. Open StratoSort and wait for the model to finish loading."
);
/** @type {any} */ (err).code = 'NO_MODEL';
throw err;
diff --git a/src/main/services/DegradationManager.js b/src/main/services/DegradationManager.js
index 108f46ad..21cd5356 100644
--- a/src/main/services/DegradationManager.js
+++ b/src/main/services/DegradationManager.js
@@ -212,7 +212,7 @@ class DegradationManager {
return {
action: 'redownload_model',
- message: 'Model file may be corrupted. Please re-download.',
+ message: 'Model file may be corrupted. Download it again.',
shouldNotifyUser: true,
modelType: context.modelType
};
@@ -245,7 +245,7 @@ class DegradationManager {
if (message.includes('enospc') || message.includes('no space left')) {
return {
action: 'cleanup_disk',
- message: 'Disk full. Please free up space.',
+ message: 'Disk full. Free up some space.',
shouldNotifyUser: true
};
}
@@ -281,7 +281,7 @@ class DegradationManager {
return {
canRecover: false,
action: 'download_models',
- message: 'Please download required models to continue.'
+ message: 'Download the required models to continue.'
};
}
diff --git a/src/main/services/FolderMatchingService.js b/src/main/services/FolderMatchingService.js
index b6ef7079..6a3a45c7 100644
--- a/src/main/services/FolderMatchingService.js
+++ b/src/main/services/FolderMatchingService.js
@@ -1120,7 +1120,7 @@ class FolderMatchingService {
});
throw new Error(
`Embedding dimension mismatch: expected ${expectedDim}, got ${vector?.length}. ` +
- `Model "${model}" may have changed. Please rebuild your embedding index.`
+ `Model "${model}" may have changed. Rebuild your embedding index.`
);
}
diff --git a/src/main/services/LlamaService.js b/src/main/services/LlamaService.js
index 573781c3..aa407ecc 100644
--- a/src/main/services/LlamaService.js
+++ b/src/main/services/LlamaService.js
@@ -1448,7 +1448,7 @@ class LlamaService extends EventEmitter {
if (settings.llamaGpuLayers === 0) {
logger.warn(
'[LlamaService] GPU layers set to 0 in settings — AI inference will use CPU only. ' +
- 'Set to -1 (auto) in Settings > AI Models for GPU acceleration.'
+ 'Set to -1 (auto) in Settings → Default AI models for GPU acceleration.'
);
}
}
@@ -1818,7 +1818,7 @@ class LlamaService extends EventEmitter {
}
if (resolution.action === 'cleanup_disk') {
const diskError = /** @type {Error & { code?: string }} */ (
- new Error(`Disk full, cannot load ${modelType} model. Please free up space.`)
+ new Error(`Disk full, cannot load ${modelType} model. Free up some space.`)
);
diskError.code = ERROR_CODES.LLAMA_MODEL_LOAD_FAILED;
throw diskError;
@@ -2724,7 +2724,7 @@ class LlamaService extends EventEmitter {
code: `llama.auto-fallback.${type}`,
subsystem: 'llama',
severity: 'warning',
- message: `Configured ${type} model is missing; using default "${defaultModel}" instead. Reinstall the preferred model from Settings → Models.`,
+ message: `Configured ${type} model is missing; using default "${defaultModel}" instead. Reinstall the preferred model from Settings → Model management.`,
detail: {
errorCode: ERROR_CODES.LLAMA_MODEL_AUTO_FALLBACK,
type,
diff --git a/src/main/services/ModelDownloadManager.js b/src/main/services/ModelDownloadManager.js
index bac3c66a..21c08979 100644
--- a/src/main/services/ModelDownloadManager.js
+++ b/src/main/services/ModelDownloadManager.js
@@ -928,7 +928,7 @@ class ModelDownloadManager {
return {
success: false,
error: inUse
- ? 'Model file is in use — it may be loaded by the AI engine. Switch the active model or restart the app, then try again.'
+ ? 'Model file is in use. The AI engine may have it loaded. Switch the active model or restart the app, then try again.'
: `Could not delete model file: ${error.message}`,
errorCode: error?.code || 'DELETE_FAILED'
};
@@ -979,7 +979,7 @@ class ModelDownloadManager {
const code = error?.code;
/** @type {Record} */
const messageMap = {
- ENOSPC: `Disk full — not enough free space to download ${filename}`,
+ ENOSPC: `Disk full: not enough free space to download ${filename}`,
EACCES: `Permission denied writing ${filename} (check models directory permissions)`,
EPERM: `Permission denied writing ${filename} (check models directory permissions)`,
ENOENT: `Models directory missing while writing ${filename}`,
diff --git a/src/main/services/SearchService.js b/src/main/services/SearchService.js
index 2a2f3173..e35ba2fb 100644
--- a/src/main/services/SearchService.js
+++ b/src/main/services/SearchService.js
@@ -717,7 +717,7 @@ class SearchService {
const errorMsg =
`Embedding model changed. Your search index uses ${expectedDim}-dimension embeddings, ` +
`but your current model produces ${vector.length}-dimension embeddings. ` +
- `Please rebuild your search index to use the new model.`;
+ `Rebuild your search index to use the new model.`;
logger.error('[SearchService] Embedding dimension mismatch - failing vector search', {
collectionType,
@@ -3389,7 +3389,7 @@ class SearchService {
'Failed to generate test embedding. The AI engine may be unavailable or the embedding model is missing.'
});
diagnostics.recommendations.push(
- 'Ensure the embedding model is downloaded and available in Settings > Models.'
+ 'Ensure the embedding model is downloaded and available in Settings → Model management.'
);
}
} catch (e) {
@@ -3558,7 +3558,7 @@ class SearchService {
message: `${label}: ${deadLetterCount} embeddings permanently failed (dead letter).`
});
diagnostics.recommendations.push(
- 'Review dead letter items in Settings > Advanced to identify recurring failures.'
+ 'Check Settings → Diagnostics → Troubleshooting logs to find what keeps failing.'
);
}
diff --git a/src/main/services/SmartFolderWatcher.js b/src/main/services/SmartFolderWatcher.js
index 25e4e0ef..29721697 100644
--- a/src/main/services/SmartFolderWatcher.js
+++ b/src/main/services/SmartFolderWatcher.js
@@ -656,8 +656,7 @@ class SmartFolderWatcher {
const folders = this.getSmartFolders();
if (!folders || folders.length === 0) {
- const errorMsg =
- 'No smart folders configured. Please add smart folders in the Setup phase first.';
+ const errorMsg = 'No smart folders set up yet. Add them in the Setup phase first.';
logger.warn('[SMART-FOLDER-WATCHER] Start failed:', errorMsg);
this._lastStartError = errorMsg;
return false;
@@ -666,7 +665,7 @@ class SmartFolderWatcher {
const validPaths = await this._getValidFolderPaths(folders);
if (validPaths.length === 0) {
- const errorMsg = `All ${folders.length} smart folder path(s) are inaccessible. Please check that the folders exist and you have read permissions.`;
+ const errorMsg = `All ${folders.length} smart folder path(s) are inaccessible. Check that the folders exist and you have read permissions.`;
logger.warn('[SMART-FOLDER-WATCHER] Start failed:', errorMsg);
this._lastStartError = errorMsg;
return false;
diff --git a/src/main/services/WhisperService.js b/src/main/services/WhisperService.js
index 74278b39..34d55e6a 100644
--- a/src/main/services/WhisperService.js
+++ b/src/main/services/WhisperService.js
@@ -200,7 +200,7 @@ function _ffmpegUnavailableMessage() {
return `${base} Install ffmpeg via your package manager (e.g. \`apt install ffmpeg\` or \`dnf install ffmpeg\`). ${escapeHatch}`;
}
if (process.platform === 'darwin') {
- return `${base} The bundled binary should ship with the app — reinstall, or install ffmpeg via Homebrew (\`brew install ffmpeg\`). ${escapeHatch}`;
+ return `${base} The app should include ffmpeg. Reinstall it, or install ffmpeg via Homebrew (\`brew install ffmpeg\`). ${escapeHatch}`;
}
return `${base} Run 'npm run setup:ffmpeg-runtime' (dev), reinstall the app, or install ffmpeg manually. ${escapeHatch}`;
}
diff --git a/src/main/services/ai/AIRouter.js b/src/main/services/ai/AIRouter.js
index 02a3de3f..51c172f1 100644
--- a/src/main/services/ai/AIRouter.js
+++ b/src/main/services/ai/AIRouter.js
@@ -119,7 +119,7 @@ class AIRouter extends EventEmitter {
// 5. Nothing works
throw new AIProviderError(
'NO_PROVIDER_READY',
- 'No AI provider is ready. Configure a provider in Settings → AI.'
+ 'No AI provider is ready. Configure a provider in Settings → AI Provider.'
);
}
@@ -132,7 +132,7 @@ class AIRouter extends EventEmitter {
}
throw new AIProviderError(
'NO_PROVIDER_READY',
- 'No AI provider is ready. Configure a provider in Settings → AI.'
+ 'No AI provider is ready. Configure a provider in Settings → AI Provider.'
);
}
@@ -168,7 +168,7 @@ class AIRouter extends EventEmitter {
if (!name) return 'no provider name configured';
if (!provider) return `provider "${name}" is not registered`;
const cfg = settings.providers?.[name];
- if (!cfg?.enabled) return `provider "${name}" is disabled in Settings → AI`;
+ if (!cfg?.enabled) return `provider "${name}" is disabled in Settings → AI Provider`;
if (!provider.ready()) {
// The most common ready()=false cause for cloud providers is a missing
// API key; surface that distinctly.
diff --git a/src/main/services/triage/DownloadsTriageService.js b/src/main/services/triage/DownloadsTriageService.js
index 810f96d1..2fd44a3d 100644
--- a/src/main/services/triage/DownloadsTriageService.js
+++ b/src/main/services/triage/DownloadsTriageService.js
@@ -861,7 +861,7 @@ class DownloadsTriageService {
confidence: score,
suggestedFolder: { id: top.id, name: top.name, path: top.path },
signal: 'deep-embedding',
- why: `Possible match "${top.name || top.id}" (${Math.round(score * 100)}%) — review`
+ why: `Possible match "${top.name || top.id}" (${Math.round(score * 100)}%). Needs review.`
};
} else {
next = {
@@ -1087,7 +1087,7 @@ class DownloadsTriageService {
}));
try {
await undo.recordBatch(ACTION_TYPES.TRASH_BATCH, operations, {
- summary: summary || { label: 'Downloads triage — Send to Trash' }
+ summary: summary || { label: 'Downloads triage: Send to Trash' }
});
} catch (err) {
undoUnavailable = true;
@@ -1322,7 +1322,7 @@ class DownloadsTriageService {
if (undo && typeof undo.recordBatch === 'function') {
try {
await undo.recordBatch(ACTION_TYPES.MOVE_BATCH, undoOps, {
- summary: summary || { label: 'Downloads triage — Organize' }
+ summary: summary || { label: 'Downloads triage: Organize' }
});
} catch (err) {
moveUndoUnavailable = true;
diff --git a/src/main/services/triage/FastTriageClassifier.js b/src/main/services/triage/FastTriageClassifier.js
index 7f448e85..d0ef4a62 100644
--- a/src/main/services/triage/FastTriageClassifier.js
+++ b/src/main/services/triage/FastTriageClassifier.js
@@ -195,7 +195,7 @@ class FastTriageClassifier {
bucket: BUCKET.EXCLUDED,
signal: SIGNAL.TOO_RECENT,
confidence: 1,
- why: `Too recent (${hoursOld}h old — wait before triaging)`
+ why: `Too recent (${hoursOld}h old). Wait before triaging.`
};
}
@@ -256,7 +256,7 @@ class FastTriageClassifier {
signal: SIGNAL.CACHED_EMBEDDING,
confidence: score,
suggestedFolder: { id: top.id, name: top.name, path: top.path },
- why: `Cached embedding suggests "${top.name || top.id}" (${confidencePercent(score)}%) — below confidence threshold`
+ why: `Cached embedding suggests "${top.name || top.id}" (${confidencePercent(score)}%), below the confidence threshold`
};
}
}
@@ -291,7 +291,7 @@ class FastTriageClassifier {
signal: SIGNAL.LEXICAL_MATCH,
confidence: top.score,
suggestedFolder: { id: top.id, name: top.name, path: top.path },
- why: `Weak keyword match to "${top.name}" — needs deeper scan to confirm`
+ why: `Weak keyword match to "${top.name}". Needs a deeper scan to confirm.`
};
}
} catch (err) {
diff --git a/src/main/simple-main.js b/src/main/simple-main.js
index 374694de..c1f909ee 100644
--- a/src/main/simple-main.js
+++ b/src/main/simple-main.js
@@ -1005,7 +1005,7 @@ function raiseCoordinatedStartupFailure(/** @type {any} */ error) {
subsystem: 'startup',
severity: 'error',
message:
- 'AI services did not fully start — analysis and semantic search may be unavailable. Restart StratoSort to retry.',
+ 'AI services did not fully start. Analysis and semantic search may be unavailable. Restart StratoSort to retry.',
detail: { error: error || null }
});
} catch (trackerErr) {
@@ -1036,7 +1036,7 @@ function raiseCoordinatedStartupNotice(startupResult) {
subsystem: 'startup',
severity: 'warning',
message:
- 'AI services are still starting — analysis and semantic search will be ready shortly. ' +
+ 'AI services are still starting. Analysis and semantic search will be ready shortly. ' +
'A large library can take a few minutes; StratoSort keeps loading in the background.',
detail: { error: startupResult.error || null }
});
diff --git a/src/renderer/components/AnalysisDetails.jsx b/src/renderer/components/AnalysisDetails.jsx
index 543854aa..b4c0006c 100644
--- a/src/renderer/components/AnalysisDetails.jsx
+++ b/src/renderer/components/AnalysisDetails.jsx
@@ -148,7 +148,7 @@ const AnalysisDetails = memo(function AnalysisDetails({
if (result?.success) {
setExportStatus(
result?.truncated
- ? `Saved ${format.toUpperCase()} — long recording: transcript was truncated at 1,000 segments`
+ ? `Saved ${format.toUpperCase()}. Long recording, so the transcript was cut off at 1,000 segments.`
: `Saved ${format.toUpperCase()}`
);
} else if (!result?.canceled) {
diff --git a/src/renderer/components/ErrorBoundary.jsx b/src/renderer/components/ErrorBoundary.jsx
index 7cd0e5c3..d6b8eab9 100644
--- a/src/renderer/components/ErrorBoundary.jsx
+++ b/src/renderer/components/ErrorBoundary.jsx
@@ -306,7 +306,7 @@ class ErrorBoundaryCore extends React.Component {
{needsRestart
- ? 'StratoSort was updated while it was running. Please quit and reopen the app to finish updating — reloading won’t resolve this.'
+ ? 'StratoSort was updated while it was running. Quit and reopen the app to finish updating. Reloading won’t fix this.'
: isChunk
? 'App assets failed to load. This usually happens after an update.'
: 'The application encountered an unexpected error.'}
@@ -316,7 +316,7 @@ class ErrorBoundaryCore extends React.Component {
{errorCount > 2 && !needsRestart && (
- Multiple errors detected. Consider reloading the application.
+ Multiple errors detected. Try reloading the app.
)}
@@ -355,7 +355,7 @@ class ErrorBoundaryCore extends React.Component {
- If this problem persists, please check your settings or contact support.
+ If this keeps happening, check your settings or contact support.
@@ -389,7 +389,7 @@ class ErrorBoundaryCore extends React.Component {
{isChunk && (
{needsRestart
- ? 'StratoSort was updated while running. Please quit and reopen the app to finish updating — reloading won’t help.'
+ ? 'StratoSort was updated while running. Quit and reopen the app to finish updating. Reloading won’t help.'
: 'This looks like an app asset mismatch. Reloading usually fixes it after an update.'}
)}
diff --git a/src/renderer/components/ModelSetupWizard.jsx b/src/renderer/components/ModelSetupWizard.jsx
index 1ff92616..6a5400b0 100644
--- a/src/renderer/components/ModelSetupWizard.jsx
+++ b/src/renderer/components/ModelSetupWizard.jsx
@@ -38,7 +38,7 @@ const STEP_TITLES = {
downloading: 'Download',
complete: 'Finish'
};
-const DOWNLOADS_STOPPED_MESSAGE = 'Required model downloads stopped. Please retry downloads.';
+const DOWNLOADS_STOPPED_MESSAGE = 'Required model downloads stopped. Retry the downloads.';
// Main says "started" before the download is in its status list (it checks
// disk space and any partial file first), so for this long after a request an
// empty list does not mean the download stopped.
@@ -48,7 +48,7 @@ const PROJECTOR_MISSING_MESSAGE =
// The vision model is optional: when it does not install, setup can still
// finish on the required models, and this warning says what is missing.
const VISION_NOT_INSTALLED_MESSAGE =
- 'The image analysis model is not installed, so images cannot be understood yet. Documents are analyzed as usual, and you can download it later from Settings.';
+ 'The image analysis model is not installed, so images cannot be analyzed yet. Documents are analyzed as usual, and you can download it later from Settings.';
const CHECKING_STATUS_MESSAGES = [
'Detecting available local models...',
'Checking active background downloads...',
@@ -475,7 +475,7 @@ function ModelSetupWizardBody({ onComplete, onSkip, onDismiss, onStepChange }) {
if (!hasLlamaApi) {
if (!isMountedRef.current) return;
applyFallbackSelection();
- setInitError('AI engine is still starting. Please try again in a moment.');
+ setInitError('AI engine is still starting. Try again in a moment.');
setStep('select');
setIsRefreshing(false);
return;
@@ -657,7 +657,7 @@ function ModelSetupWizardBody({ onComplete, onSkip, onDismiss, onStepChange }) {
if (step === 'checking' && !pendingEmbeddingSwitch) {
const timer = setTimeout(() => {
if (isMountedRef.current) {
- setInitError('AI system check timed out. Please select models manually.');
+ setInitError('AI system check timed out. Select models manually.');
setStep('select');
setIsRefreshing(false);
}
diff --git a/src/renderer/components/NavigationBar.jsx b/src/renderer/components/NavigationBar.jsx
index 18e5abb9..59e69607 100644
--- a/src/renderer/components/NavigationBar.jsx
+++ b/src/renderer/components/NavigationBar.jsx
@@ -1087,7 +1087,7 @@ function NavigationBar() {
? executionStatus?.label
? `${executionStatus.label} Step navigation is paused until file moves finish.`
: 'Step navigation is paused while undo/redo moves files.'
- : 'Step navigation is paused. Please wait for the current operation to finish.'}
+ : 'Step navigation is paused until the current operation finishes.'}
)}
diff --git a/src/renderer/components/SettingsPanel.jsx b/src/renderer/components/SettingsPanel.jsx
index 7ec12437..4d77a366 100644
--- a/src/renderer/components/SettingsPanel.jsx
+++ b/src/renderer/components/SettingsPanel.jsx
@@ -1388,7 +1388,7 @@ const SettingsPanel = React.memo(function SettingsPanel() {
title={`Save failed: ${lastSaveError}. Click to retry.`}
>
- Save failed — retry
+ Save failed. Retry
);
} else if (isSaving) {
@@ -1440,7 +1440,7 @@ const SettingsPanel = React.memo(function SettingsPanel() {
- Electron API not available. Please restart the application.
+ Electron API not available. Restart the application.
- Electron API not available. Please restart the application.
+ Electron API not available. Restart the application.
{isSimpleMode
- ? 'Simple mode hides the advanced configuration panels and uses a streamlined retrieval path, while still embedding your files on-device in the background — so nothing needs re-processing if you switch to Advanced later.'
- : 'Advanced reveals every configuration panel — AI models, semantic search, chat-with-documents, and the knowledge graph — and enables graph-aware retrieval at search time.'}
+ ? 'Simple mode hides the advanced configuration panels and uses a simpler retrieval path. It still embeds your files on-device in the background, so nothing needs re-processing if you switch to Advanced later.'
+ : 'Advanced reveals every configuration panel (AI models, semantic search, chat-with-documents, and the knowledge graph) and enables graph-aware retrieval at search time.'}
diff --git a/src/renderer/components/UndoRedoSystem.jsx b/src/renderer/components/UndoRedoSystem.jsx
index 8fabde7e..7485dc01 100644
--- a/src/renderer/components/UndoRedoSystem.jsx
+++ b/src/renderer/components/UndoRedoSystem.jsx
@@ -925,7 +925,7 @@ export function UndoRedoProvider({ children }) {
const executeAction = useCallback(
async (actionConfig) => {
if (actionMutexRef.current) {
- showInfo('Please wait for the current action to complete');
+ showInfo('Wait for the current action to finish');
return null;
}
@@ -981,7 +981,7 @@ export function UndoRedoProvider({ children }) {
const undo = useCallback(async () => {
if (actionMutexRef.current) {
- showInfo('Please wait for the current action to complete');
+ showInfo('Wait for the current action to finish');
return;
}
@@ -1072,7 +1072,7 @@ export function UndoRedoProvider({ children }) {
const redo = useCallback(async () => {
if (actionMutexRef.current) {
- showInfo('Please wait for the current action to complete');
+ showInfo('Wait for the current action to finish');
return;
}
@@ -1159,7 +1159,7 @@ export function UndoRedoProvider({ children }) {
const jumpToPoint = useCallback(
async (targetIndex) => {
if (actionMutexRef.current) {
- showInfo('Please wait for the current action to complete');
+ showInfo('Wait for the current action to finish');
return;
}
@@ -1179,7 +1179,7 @@ export function UndoRedoProvider({ children }) {
beginExecution(
'jump',
targetIndex < currentIndex ? 'Jumping back in history…' : 'Jumping forward in history…',
- `${steps} step${steps === 1 ? '' : 's'} — files will move as each step runs`
+ `${steps} step${steps === 1 ? '' : 's'}: files will move as each step runs`
);
try {
diff --git a/src/renderer/components/common/AIProviderBadge.jsx b/src/renderer/components/common/AIProviderBadge.jsx
index c6c3c66f..de7077ee 100644
--- a/src/renderer/components/common/AIProviderBadge.jsx
+++ b/src/renderer/components/common/AIProviderBadge.jsx
@@ -33,7 +33,7 @@ function AIProviderBadge() {
const distinct = new Set(routes.map((route) => route.providerId));
const summary =
distinct.size === 1
- ? `Cloud AI — ${labelFor(routes[0].providerId)}.`
+ ? `Cloud AI: ${labelFor(routes[0].providerId)}.`
: `Cloud AI: ${routes
.map((route) => {
const where =
diff --git a/src/renderer/components/common/AIProviderIcon.jsx b/src/renderer/components/common/AIProviderIcon.jsx
index e28c645d..1a744a82 100644
--- a/src/renderer/components/common/AIProviderIcon.jsx
+++ b/src/renderer/components/common/AIProviderIcon.jsx
@@ -5,7 +5,7 @@ import { Cloud, Cpu } from 'lucide-react';
const PROVIDER_META = {
local: {
label: 'Local Llama',
- title: 'Analyzed locally — no data left this machine',
+ title: 'Analyzed locally. No data left this machine.',
Icon: Cpu,
tone: 'text-system-gray-500'
},
diff --git a/src/renderer/components/common/CloudAIConsentModal.jsx b/src/renderer/components/common/CloudAIConsentModal.jsx
index 400e35a1..327b2e22 100644
--- a/src/renderer/components/common/CloudAIConsentModal.jsx
+++ b/src/renderer/components/common/CloudAIConsentModal.jsx
@@ -86,7 +86,7 @@ function CloudAIConsentModal({ provider, onAccept, onDecline }) {
persistLocalAcknowledgment();
onAccept();
} catch (err) {
- setError(err?.message || 'Could not record consent. Please try again.');
+ setError(err?.message || 'Could not record consent. Try again.');
} finally {
setSubmitting(false);
}
diff --git a/src/renderer/components/dashboard/DashboardView.jsx b/src/renderer/components/dashboard/DashboardView.jsx
index 971a328a..dac52a1e 100644
--- a/src/renderer/components/dashboard/DashboardView.jsx
+++ b/src/renderer/components/dashboard/DashboardView.jsx
@@ -911,8 +911,8 @@ export default function DashboardView() {
)}
{stats.failed > 0 && (
- {stats.failed} {stats.failed === 1 ? 'file' : 'files'} couldn't be analyzed —
- retry {stats.failed === 1 ? 'it' : 'them'} in Discover.
+ {stats.failed} {stats.failed === 1 ? 'file' : 'files'} couldn't be analyzed.
+ Retry {stats.failed === 1 ? 'it' : 'them'} in Discover.
)}
diff --git a/src/renderer/components/dashboard/KnowledgeStatsCard.jsx b/src/renderer/components/dashboard/KnowledgeStatsCard.jsx
index 591619c2..7b2e1d8d 100644
--- a/src/renderer/components/dashboard/KnowledgeStatsCard.jsx
+++ b/src/renderer/components/dashboard/KnowledgeStatsCard.jsx
@@ -180,7 +180,7 @@ export default function KnowledgeStatsCard({ className = '' }) {
if (hasYears) {
tiles.push({
icon: CalendarRange,
- value: `${startYear} – ${endYear}`,
+ value: `${startYear} to ${endYear}`,
label: yearLabel
});
}
diff --git a/src/renderer/components/layout/DegradedStateBanner.jsx b/src/renderer/components/layout/DegradedStateBanner.jsx
index 0db087a5..80639c21 100644
--- a/src/renderer/components/layout/DegradedStateBanner.jsx
+++ b/src/renderer/components/layout/DegradedStateBanner.jsx
@@ -179,7 +179,7 @@ const MIGRATION_FLAG_DEFINITIONS = [
code: 'state-migration.gap',
severity: 'error',
message:
- "Your saved workspace state needs an upgrade step that this build is missing — it couldn't be loaded safely. Recent selections, file states, and analysis results were reset. Smart folders and settings should still be intact."
+ "Your saved workspace state needs an upgrade step that this build is missing, so it couldn't be loaded safely. Recent selections, file states, and analysis results were reset. Smart folders and settings should still be intact."
},
{
windowKey: '__STRATOSORT_STATE_SHAPE_RECOVERED__',
@@ -445,7 +445,7 @@ function DegradedStateBanner() {
code: 'renderer.smart-folders-load',
subsystem: 'smart-folders',
severity: 'error',
- message: `Smart folders could not be loaded — organization suggestions may be incomplete. (${smartFoldersError})`,
+ message: `Smart folders could not be loaded, so organization suggestions may be incomplete. (${smartFoldersError})`,
raisedAt: now,
lastSeenAt: now,
count: 1,
@@ -456,7 +456,7 @@ function DegradedStateBanner() {
code: 'renderer.settings-load',
subsystem: 'settings',
severity: 'warning',
- message: `Settings could not be loaded — defaults are in effect. (${settingsError})`,
+ message: `Settings could not be loaded, so defaults are in effect. (${settingsError})`,
raisedAt: now,
lastSeenAt: now,
count: 1,
diff --git a/src/renderer/components/organize/DuplicateResolutionModal.jsx b/src/renderer/components/organize/DuplicateResolutionModal.jsx
index 7c4bf01b..4a55f9c9 100644
--- a/src/renderer/components/organize/DuplicateResolutionModal.jsx
+++ b/src/renderer/components/organize/DuplicateResolutionModal.jsx
@@ -37,7 +37,7 @@ const TIER_CONFIG = {
related: {
label: 'Related',
reasonCopy:
- 'Topically similar — may be drafts or versions. Do not bulk-delete without reviewing.',
+ 'Topically similar, so they may be drafts or versions. Do not bulk-delete without reviewing.',
badgeClass: 'bg-system-gray-100 text-system-gray-600 border-system-gray-200'
}
};
@@ -710,7 +710,7 @@ export default function DuplicateResolutionModal({
relatedHiddenByThreshold > 0
? ` (${relatedHiddenByThreshold} related group${
relatedHiddenByThreshold === 1 ? '' : 's'
- } below ${Math.round(relatedThreshold * 100)}% — lower the related slider to show)`
+ } below ${Math.round(relatedThreshold * 100)}%; lower the related slider to show them)`
: ''
}.${
dismissedCount > 0
diff --git a/src/renderer/components/organize/OrganizePreviewModal.jsx b/src/renderer/components/organize/OrganizePreviewModal.jsx
index c25f5ad9..a83ec456 100644
--- a/src/renderer/components/organize/OrganizePreviewModal.jsx
+++ b/src/renderer/components/organize/OrganizePreviewModal.jsx
@@ -168,12 +168,12 @@ function OrganizePreviewModal({ isOpen, plan, onClose, onConfirm, redactPaths, i
)}
{f.staysInFolder && (
- {renamed ? 'Already in this folder' : 'Already here — no change'}
+ {renamed ? 'Already in this folder' : 'Already here, no change'}
)}
{f.collision && (
- Name taken — number added
+ Name taken, number added
)}
diff --git a/src/renderer/components/organize/ReadyFileItem.jsx b/src/renderer/components/organize/ReadyFileItem.jsx
index 9598d493..03d1a3c0 100644
--- a/src/renderer/components/organize/ReadyFileItem.jsx
+++ b/src/renderer/components/organize/ReadyFileItem.jsx
@@ -248,7 +248,7 @@ function ReadyFileItem({
className="min-w-0 w-full text-sm"
>
{categoryIsFallback && (
-
+
)}
{!hasCategoryOption && category && (
@@ -330,7 +330,7 @@ function ReadyFileItem({
) : (
- Analysis failed - will be skipped
+ Analysis failed. It will be skipped.
)}
diff --git a/src/renderer/components/organize/TagClusterModal.jsx b/src/renderer/components/organize/TagClusterModal.jsx
index f8071e93..c7128184 100644
--- a/src/renderer/components/organize/TagClusterModal.jsx
+++ b/src/renderer/components/organize/TagClusterModal.jsx
@@ -71,7 +71,7 @@ export default function TagClusterModal({
error: error?.message,
stack: error?.stack
});
- setApplyError(error?.message || 'Failed to apply tags. Please try again.');
+ setApplyError(error?.message || 'Failed to apply tags. Try again.');
} finally {
setIsApplying(false);
}
diff --git a/src/renderer/components/organize/TriageModal.jsx b/src/renderer/components/organize/TriageModal.jsx
index e8213fc7..c6158c66 100644
--- a/src/renderer/components/organize/TriageModal.jsx
+++ b/src/renderer/components/organize/TriageModal.jsx
@@ -212,7 +212,7 @@ export default function TriageModal({
error: error?.message,
stack: error?.stack
});
- setMoveError(error?.message || 'Failed to move files. Please try again.');
+ setMoveError(error?.message || 'Failed to move files. Try again.');
} finally {
setIsMoving(false);
}
diff --git a/src/renderer/components/organize/UncategorizedActionsBar.jsx b/src/renderer/components/organize/UncategorizedActionsBar.jsx
index 015bb75a..30b723b6 100644
--- a/src/renderer/components/organize/UncategorizedActionsBar.jsx
+++ b/src/renderer/components/organize/UncategorizedActionsBar.jsx
@@ -200,8 +200,8 @@ function UncategorizedActionsBar({
{suggestion.displayName}
{suggestion.earlierCount > 0
? ` (${suggestion.earlierCount} analyzed earlier)`
- : ''}{' '}
- — want a Smart Folder for them?
+ : ''}
+ . Want a Smart Folder for them?
) : (
diff --git a/src/renderer/components/search/AtlasTabContent.jsx b/src/renderer/components/search/AtlasTabContent.jsx
index 3126cc63..8680b11a 100644
--- a/src/renderer/components/search/AtlasTabContent.jsx
+++ b/src/renderer/components/search/AtlasTabContent.jsx
@@ -179,7 +179,7 @@ function AtlasTabContent({ isActive, openFile, revealFile, setError, simpleMode
const api = /** @type {any} */ (window).electronAPI?.atlas;
if (!api?.getProjection) {
setStatus('error');
- setBothErrors('Atlas is unavailable — the projection service did not load.');
+ setBothErrors('Atlas is unavailable. The projection service did not load.');
return;
}
// Generation token: a newer load (e.g. a forced rebuild racing the
@@ -240,7 +240,7 @@ function AtlasTabContent({ isActive, openFile, revealFile, setError, simpleMode
} else if (pageSignature !== fitSignature) {
restarts += 1;
if (restarts > 3) {
- throw new Error('Atlas projection kept changing while loading — try again');
+ throw new Error('Atlas projection kept changing while loading. Try again.');
}
offset = 0;
total = 0;
@@ -1261,7 +1261,7 @@ function AtlasTabContent({ isActive, openFile, revealFile, setError, simpleMode
{status === 'rebuilding'
- ? 'Embeddings are rebuilding — the map will refresh shortly.'
+ ? 'Embeddings are rebuilding. The map will refresh shortly.'
: 'Projecting your library…'}
diff --git a/src/renderer/components/search/BridgeAnalysisModal.jsx b/src/renderer/components/search/BridgeAnalysisModal.jsx
index c65ef49d..d48e65c5 100644
--- a/src/renderer/components/search/BridgeAnalysisModal.jsx
+++ b/src/renderer/components/search/BridgeAnalysisModal.jsx
@@ -220,7 +220,7 @@ export default function BridgeAnalysisModal({
}
title={
selectedBridge.centroidOnly
- ? 'No concrete files to move — this bridge is a topical overlap only.'
+ ? 'No concrete files to move. This bridge is a topical overlap only.'
: `Move ${selectedBridge.bridgeFiles.length} bridge file${selectedBridge.bridgeFiles.length === 1 ? '' : 's'} into a folder of your choice.`
}
onClick={() =>
diff --git a/src/renderer/components/search/ChatPanel.jsx b/src/renderer/components/search/ChatPanel.jsx
index bb003091..b0b7e003 100644
--- a/src/renderer/components/search/ChatPanel.jsx
+++ b/src/renderer/components/search/ChatPanel.jsx
@@ -1064,8 +1064,7 @@ function ChatPanel({
>
{messages.length === 0 ? (
- Ask me anything about your documents — search by meaning, summarize, or explore
- connections.
+ Ask about your documents. You can search by meaning, summarize, or explore connections.
) : null}
diff --git a/src/renderer/components/search/ClusterNode.jsx b/src/renderer/components/search/ClusterNode.jsx
index 4516bc31..25ca66aa 100644
--- a/src/renderer/components/search/ClusterNode.jsx
+++ b/src/renderer/components/search/ClusterNode.jsx
@@ -316,10 +316,10 @@ const ClusterNode = memo(({ data, selected }) => {
style={{ margin: '-6px' }}
title={
confidence === 'high'
- ? 'High confidence — AI generated a descriptive label from file content'
+ ? 'High confidence: AI generated a descriptive label from file content'
: confidence === 'medium'
- ? 'Medium confidence — label derived from shared tags or categories'
- : 'Low confidence — label auto-generated from file count only'
+ ? 'Medium confidence: label derived from shared tags or categories'
+ : 'Low confidence: label auto-generated from file count only'
}
aria-label={`Cluster confidence: ${confidence}`}
/>
diff --git a/src/renderer/components/search/ComparisonTable.jsx b/src/renderer/components/search/ComparisonTable.jsx
index d2316d45..2b115376 100644
--- a/src/renderer/components/search/ComparisonTable.jsx
+++ b/src/renderer/components/search/ComparisonTable.jsx
@@ -81,8 +81,8 @@ export default function ComparisonTable({ documentAnswer, sources, onOpenSource
{onlyDoc
- ? `Only one document matched (${onlyDoc.name}). Comparison needs at least two — broaden the scope or try a less specific query.`
- : 'No documents matched. Comparison needs at least two — broaden the scope or try a less specific query.'}
+ ? `Only one document matched (${onlyDoc.name}). Comparison needs at least two. Broaden the scope or try a less specific query.`
+ : 'No documents matched. Comparison needs at least two. Broaden the scope or try a less specific query.'}
diff --git a/src/renderer/components/search/EmptyEmbeddingsBanner.jsx b/src/renderer/components/search/EmptyEmbeddingsBanner.jsx
index 08d635f5..e316b7da 100644
--- a/src/renderer/components/search/EmptyEmbeddingsBanner.jsx
+++ b/src/renderer/components/search/EmptyEmbeddingsBanner.jsx
@@ -57,7 +57,7 @@ function EmptyEmbeddingsBanner({
? `${mismatchDetails} Rebuild the search index to restore reliable semantic search.`
: `${mismatchDetails} Rebuild embeddings to restore reliable semantic search.`
: needsFileEmbeddingRebuild
- ? 'You already have analyzed files, but the embedding index is empty or incomplete. Run a file embedding rebuild from analysis history to restore full Knowledge OS coverage.'
+ ? 'You already have analyzed files, but the embedding index is empty or incomplete. Rebuild file embeddings from analysis history to restore full Knowledge OS coverage.'
: isManual
? simpleMode
? 'Knowledge OS search needs a local search index, but your settings are set to Manual only. Turn automatic indexing back on (Settings -> Embedding behavior), then rebuild to populate the index.'
diff --git a/src/renderer/components/search/EmptySearchState.jsx b/src/renderer/components/search/EmptySearchState.jsx
index 6114cbf0..acd6670b 100644
--- a/src/renderer/components/search/EmptySearchState.jsx
+++ b/src/renderer/components/search/EmptySearchState.jsx
@@ -87,7 +87,7 @@ const EmptySearchState = memo(function EmptySearchState({
tone="error"
size="lg"
title="Search is offline"
- description="The local AI engine or vector database is currently unavailable. Please check your model downloads in Settings or restart the app."
+ description="The local AI engine or vector database is currently unavailable. Check your model downloads in Settings or restart the app."
action={
onOpenSettings && (
- Topics with only 1 source may benefit from additional documents. Click any topic to
- explore it further.
+ Topics with only 1 source could use more documents. Click any topic to explore it
+ further.
diff --git a/src/renderer/components/search/GraphTabContent.jsx b/src/renderer/components/search/GraphTabContent.jsx
index a2fb3acb..ec9cdb43 100644
--- a/src/renderer/components/search/GraphTabContent.jsx
+++ b/src/renderer/components/search/GraphTabContent.jsx
@@ -244,7 +244,7 @@ export default function GraphTabContent({
tone="error"
size="lg"
title="Graph is offline"
- description="The local AI engine or vector database is currently unavailable. Please check your model downloads in Settings or restart the app."
+ description="The local AI engine or vector database is currently unavailable. Check your model downloads in Settings or restart the app."
action={
{currentOverrideUnavailable && (
- Saved override is not ready — analysis will use the app default or local model until the
+ Saved override is not ready. Analysis will use the app default or local model until the
provider is configured.
)}
diff --git a/src/renderer/components/setup/WatcherStatusLine.jsx b/src/renderer/components/setup/WatcherStatusLine.jsx
index 90f2b763..fea38778 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 — 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 "Watch smart folders" in Settings → Auto-organize.';
tone = 'text-stratosort-warning';
} else {
const watched = Number(status.watchedCount) || 0;
diff --git a/src/renderer/components/triage/DownloadsTriageView.jsx b/src/renderer/components/triage/DownloadsTriageView.jsx
index 9e7e64ac..06f62f82 100644
--- a/src/renderer/components/triage/DownloadsTriageView.jsx
+++ b/src/renderer/components/triage/DownloadsTriageView.jsx
@@ -50,7 +50,7 @@ const TAB_DEFS = [
{
key: 'keep',
label: 'Keep',
- copy: 'High-confidence matches to your Smart Folders — ready to organize.'
+ copy: 'High-confidence matches to your Smart Folders, ready to organize.'
},
{
key: 'excluded',
@@ -70,7 +70,7 @@ const TAB_DEFS = [
{
key: 'unmatched',
label: 'Unmatched',
- copy: "Deep scan couldn't find a folder match. These are likely orphans — decide manually."
+ copy: "Deep scan couldn't find a folder match. These are likely orphans. Decide manually."
}
];
@@ -208,7 +208,7 @@ export default function DownloadsTriageView({ isOpen, onClose }) {
setActiveTab('trash');
setIsDeepScanning(false);
hasAutoSelectedTrashRef.current = null;
- setError('Triage session expired — rescan the folder.');
+ setError('Triage session expired. Rescan the folder.');
});
}, []);
@@ -393,7 +393,7 @@ export default function DownloadsTriageView({ isOpen, onClose }) {
triageId,
action,
files,
- summary: { label: `Downloads triage — ${action}` }
+ summary: { label: `Downloads triage: ${action}` }
});
if (result?.errorCode === 'NO_SESSION' || result?.errorCode === 'NOT_IN_SESSION') {
setTriageId(null);
@@ -412,8 +412,8 @@ export default function DownloadsTriageView({ isOpen, onClose }) {
hasAutoSelectedTrashRef.current = null;
setError(
result?.errorCode === 'NOT_IN_SESSION'
- ? 'Those files are not in this triage session — rescan.'
- : 'Session expired — rescan the folder.'
+ ? 'Those files are not in this triage session. Rescan.'
+ : 'Session expired. Rescan the folder.'
);
return;
}
@@ -421,7 +421,7 @@ export default function DownloadsTriageView({ isOpen, onClose }) {
const failed = Array.isArray(result?.failed) ? result.failed.length : 0;
const done = action === 'trash' ? result?.trashed?.length : result?.moved?.length;
setError(
- `${action === 'trash' ? 'Trashed' : 'Organized'} ${done || 0} of ${files.length}. ${failed} failed — see logs.`
+ `${action === 'trash' ? 'Trashed' : 'Organized'} ${done || 0} of ${files.length}. ${failed} failed. See logs.`
);
} else if (!result?.success) {
setError(toErrorMessage(result?.error, 'Action failed'));
@@ -434,8 +434,8 @@ export default function DownloadsTriageView({ isOpen, onClose }) {
if (result?.undoUnavailable) {
actWarnings.push(
action === 'trash'
- ? 'Undo could not record this trash — restore from the OS Trash manually if needed.'
- : 'Undo could not record this move — undo will not cover these files.'
+ ? 'Undo could not record this trash. Restore from the OS Trash manually if needed.'
+ : 'Undo could not record this move, so undo will not cover these files.'
);
}
const rejectedCount = Array.isArray(result?.rejected) ? result.rejected.length : 0;
@@ -578,7 +578,7 @@ export default function DownloadsTriageView({ isOpen, onClose }) {
/>
- {scanWarning.partial ? 'Partial scan — results may be incomplete' : 'Scan note'}
+ {scanWarning.partial ? 'Partial scan: results may be incomplete' : 'Scan note'}
{(typeof scanWarning.filesIncluded === 'number' &&
typeof scanWarning.maxFiles === 'number') ||
diff --git a/src/renderer/components/ui/Modal.jsx b/src/renderer/components/ui/Modal.jsx
index 1a23f041..c40fd1a2 100644
--- a/src/renderer/components/ui/Modal.jsx
+++ b/src/renderer/components/ui/Modal.jsx
@@ -466,7 +466,7 @@ export const ConfirmModal = memo(function ConfirmModal({
const message =
(error && typeof error.message === 'string' && error.message.trim()) ||
(typeof error === 'string' && error.trim()) ||
- 'Something went wrong. Please try again.';
+ 'Something went wrong. Try again.';
setConfirmError(message);
}
} finally {
diff --git a/src/renderer/index.js b/src/renderer/index.js
index e4d6bddf..62d4e7dd 100644
--- a/src/renderer/index.js
+++ b/src/renderer/index.js
@@ -631,8 +631,7 @@ function initializeApp() {
const description = document.createElement('p');
description.className = 'splash-error-message';
- description.textContent =
- 'The application encountered an error during startup. Please try reloading.';
+ description.textContent = 'StratoSort hit an error during startup. Try reloading.';
const details = document.createElement('details');
details.className = 'splash-error-details';
diff --git a/src/renderer/phases/CompletePhase.jsx b/src/renderer/phases/CompletePhase.jsx
index 3b59782b..db780fd9 100644
--- a/src/renderer/phases/CompletePhase.jsx
+++ b/src/renderer/phases/CompletePhase.jsx
@@ -216,7 +216,7 @@ function CompletePhase() {
const openFolderLabel = primaryFolderName ? `Open ${primaryFolderName}` : 'Open folder';
const openFolderHint =
destinationCount > 1
- ? `Opens ${redactPaths ? 'the folder' : primaryDestination} — it received the most files. Use the folder button on a row to see any other file.`
+ ? `Opens ${redactPaths ? 'the folder' : primaryDestination}, which received the most files. Use the folder button on a row to see any other file.`
: `Opens ${redactPaths ? 'the folder these files were moved to' : primaryDestination}`;
const showCelebration = totalFiles > 0 && !shouldReduceMotion;
@@ -304,7 +304,7 @@ function CompletePhase() {
A clean finish for this batch
- Review what changed, confirm the outcome, and start the next batch when you are ready.
+ Review what changed, then start the next batch when you're ready.
diff --git a/src/renderer/phases/DiscoverPhase.jsx b/src/renderer/phases/DiscoverPhase.jsx
index 098ba44e..e29a10af 100644
--- a/src/renderer/phases/DiscoverPhase.jsx
+++ b/src/renderer/phases/DiscoverPhase.jsx
@@ -448,12 +448,12 @@ function DiscoverPhase() {
collapsedSummary={
{isAnalyzing
- ? 'Analysis running now - expand for review tips'
+ ? 'Analysis running now. Expand for review tips.'
: visibleReadyCount > 0
- ? `${visibleReadyCount} file${visibleReadyCount !== 1 ? 's' : ''} ready to review - expand for review tips`
+ ? `${visibleReadyCount} file${visibleReadyCount !== 1 ? 's' : ''} ready to review. Expand for review tips.`
: pendingAnalysisCount > 0
- ? `${pendingAnalysisCount} file${pendingAnalysisCount !== 1 ? 's' : ''} waiting for analysis - expand for review tips`
- : 'Add files to begin - expand for review tips'}
+ ? `${pendingAnalysisCount} file${pendingAnalysisCount !== 1 ? 's' : ''} waiting for analysis. Expand for review tips.`
+ : 'Add files to begin. Expand for review tips.'}
}
>
@@ -483,8 +483,8 @@ function DiscoverPhase() {
Build a clean review queue
- This step is designed to stay simple: add files, let local AI prepare suggestions, and
- move forward only when the review list feels ready.
+ Add files, let local AI prepare suggestions, and move on when the review list looks
+ ready.
@@ -873,7 +873,7 @@ function DiscoverPhase() {
addNotification(
visibleFailedCount > 0
? 'All files failed analysis. Retry them, or clear the queue and try again.'
- : 'Please analyze files first',
+ : 'Analyze files first',
'warning',
4000
);
diff --git a/src/renderer/phases/OrganizePhase.jsx b/src/renderer/phases/OrganizePhase.jsx
index 37a880bf..15e344eb 100644
--- a/src/renderer/phases/OrganizePhase.jsx
+++ b/src/renderer/phases/OrganizePhase.jsx
@@ -602,8 +602,7 @@ function OrganizePhase() {
Review & Organize
- Review the move plan, refine anything that needs attention, and stay in control before
- files are relocated.
+ Review the move plan and fix anything that needs attention before files move.
{isAnalysisRunning && (
@@ -630,8 +629,8 @@ function OrganizePhase() {
collapsedSummary={
{readyFilesCount > 0
- ? `${readyFilesCount} file${readyFilesCount !== 1 ? 's' : ''} ready for review - expand for organize tips`
- : 'Waiting for review items - expand for organize tips'}
+ ? `${readyFilesCount} file${readyFilesCount !== 1 ? 's' : ''} ready for review. Expand for organize tips.`
+ : 'Waiting for review items. Expand for organize tips.'}
}
>
@@ -646,7 +645,7 @@ function OrganizePhase() {
- Approve the move plan with confidence
+ Approve the move plan
This is the last review step before files move. Focus on anything uncertain, confirm
@@ -928,8 +927,8 @@ function OrganizePhase() {
{isOrganizing
- ? 'Please wait — destinations update as each file lands. You can cancel or pause below.'
- : `${readyFilesCount} file${readyFilesCount !== 1 ? 's' : ''} prepared for movement. Undo remains available after the batch completes.`}
+ ? 'Destinations update as each file lands. You can cancel or pause below.'
+ : `${readyFilesCount} file${readyFilesCount !== 1 ? 's' : ''} ready to move. You can still undo after the batch finishes.`}
{!isOrganizing && !isPaused ? (
diff --git a/src/renderer/phases/SetupPhase.jsx b/src/renderer/phases/SetupPhase.jsx
index 2e6c4e87..8095ed56 100644
--- a/src/renderer/phases/SetupPhase.jsx
+++ b/src/renderer/phases/SetupPhase.jsx
@@ -191,7 +191,7 @@ function SetupPhase() {
if (!Array.isArray(folders)) {
logger.warn('Received non-array response', { folders });
- notifyRef.current.showError?.('Failed to load smart folders. Please try again.');
+ notifyRef.current.showError?.('Failed to load smart folders. Try again.');
return;
}
@@ -587,10 +587,10 @@ function SetupPhase() {
collapsedSummary={
{hasConfiguredFolders
- ? `${destinationCount} destination${destinationCount !== 1 ? 's' : ''} ready — expand for setup tips`
+ ? `${destinationCount} destination${destinationCount !== 1 ? 's' : ''} ready. Expand for setup tips.`
: onlyFallbackFolder
- ? 'No destination yet, so files can only go to Uncategorized — expand for setup tips'
- : 'Add a destination to continue — expand for setup tips'}
+ ? 'No destination yet, so files can only go to Uncategorized. Expand for setup tips.'
+ : 'Add a destination to continue. Expand for setup tips.'}
}
>
@@ -854,7 +854,7 @@ function SetupPhase() {
}
if (currentFolders.length === 0) {
- showWarning('Please add at least one smart folder before continuing.');
+ showWarning('Add at least one smart folder before continuing.');
} else {
actions.setPhaseData('smartFolders', currentFolders);
setSmartFolders(currentFolders);
diff --git a/src/renderer/phases/WelcomePhase.jsx b/src/renderer/phases/WelcomePhase.jsx
index b97a6896..562af32d 100644
--- a/src/renderer/phases/WelcomePhase.jsx
+++ b/src/renderer/phases/WelcomePhase.jsx
@@ -380,7 +380,7 @@ function WelcomePhase() {
{
icon: CheckCircle2,
title: 'Complete',
- copy: 'See what changed and start the next batch with confidence.'
+ copy: 'See what changed, then start the next batch.'
}
];
@@ -433,7 +433,7 @@ function WelcomePhase() {
- Finish local AI setup when you are ready
+ Finish local AI setup when you're ready
You can use the app now; open model setup when you want full AI features.
@@ -655,8 +655,7 @@ function WelcomePhase() {
>
- StratoSort follows a simple, review-first workflow so you stay in control before any
- files move.
+ StratoSort is review-first, so you stay in control before any files move.
{flowSteps.map((item, idx) => (
diff --git a/src/renderer/phases/discover/useFileHandlers.js b/src/renderer/phases/discover/useFileHandlers.js
index 68cdbef2..a17c90f6 100644
--- a/src/renderer/phases/discover/useFileHandlers.js
+++ b/src/renderer/phases/discover/useFileHandlers.js
@@ -23,7 +23,7 @@ const ensureFileApi = (/** @type {any} */ addNotification, /** @type {any} */ ac
if (!window?.electronAPI?.files) {
logger.warn('[DiscoverPhase] File API unavailable', { actionLabel });
addNotification?.(
- 'File system API not ready. Please wait for the app to finish loading.',
+ 'File system API not ready. Wait for the app to finish loading.',
'warning',
3000,
'file-api-unavailable'
@@ -40,7 +40,7 @@ const ensureSmartFolderApi = (
if (!window?.electronAPI?.smartFolders) {
logger.warn('[DiscoverPhase] Smart folder API unavailable', { actionLabel });
addNotification?.(
- 'Smart folder API not ready. Please wait for the app to finish loading.',
+ 'Smart folder API not ready. Wait for the app to finish loading.',
'warning',
3000,
'smart-folder-api-unavailable'
@@ -435,7 +435,7 @@ export function useFileHandlers({
() =>
reject(
new Error(
- 'Folder scan timeout - the folder may be on a slow network drive or contain too many files'
+ 'Folder scan timed out. The folder may be on a slow network drive or contain too many files'
)
),
SCAN_TIMEOUT
@@ -650,7 +650,7 @@ export function useFileHandlers({
() =>
reject(
new Error(
- 'Folder scan timeout - the folder may be on a slow network drive or contain too many files'
+ 'Folder scan timed out. The folder may be on a slow network drive or contain too many files'
)
),
SCAN_TIMEOUT
diff --git a/src/renderer/phases/organize/useOrganization.js b/src/renderer/phases/organize/useOrganization.js
index e9bc2645..a77584f5 100644
--- a/src/renderer/phases/organize/useOrganization.js
+++ b/src/renderer/phases/organize/useOrganization.js
@@ -1036,7 +1036,7 @@ export function useOrganization({
if (!resumeInfo && filesToProcess.length === 0) {
addNotification(
- 'No files ready to organize. Please ensure files have been analyzed.',
+ 'No files ready to organize. Make sure the files have been analyzed.',
'warning'
);
logger.warn('[ORGANIZE] No files to process - returning early');
@@ -1641,7 +1641,7 @@ export function useOrganization({
});
}
addNotification(
- `Organization paused — ${successCount} file${successCount === 1 ? '' : 's'} organized so far. Resume when ready.`,
+ `Organization paused with ${successCount} file${successCount === 1 ? '' : 's'} organized so far. Resume when ready.`,
'info',
5000,
'organize-paused'
@@ -1672,7 +1672,7 @@ export function useOrganization({
? result.cancelledCount
: Math.max(0, totalResultCount - successCount);
addNotification(
- `Organization cancelled — ${successCount} file${successCount === 1 ? '' : 's'} organized, ${remaining} skipped.`,
+ `Organization cancelled: ${successCount} file${successCount === 1 ? '' : 's'} organized, ${remaining} skipped.`,
'warning'
);
return;
diff --git a/src/renderer/services/ipc/electronApi.js b/src/renderer/services/ipc/electronApi.js
index 6b8ca0b4..7d182eeb 100644
--- a/src/renderer/services/ipc/electronApi.js
+++ b/src/renderer/services/ipc/electronApi.js
@@ -13,7 +13,7 @@ export function getElectronAPI() {
export function requireElectronAPI() {
const api = getElectronAPI();
if (!api) {
- throw new Error('Electron API not available. Please restart the application.');
+ throw new Error('Electron API not available. Restart the app.');
}
return api;
}
diff --git a/src/renderer/services/ipc/smartFoldersIpc.js b/src/renderer/services/ipc/smartFoldersIpc.js
index 83c4b313..0b800365 100644
--- a/src/renderer/services/ipc/smartFoldersIpc.js
+++ b/src/renderer/services/ipc/smartFoldersIpc.js
@@ -21,7 +21,7 @@ function withDescriptionTimeout(promise, timeoutMs) {
timeoutId = setTimeout(() => {
resolve({
success: false,
- error: 'Description generation timed out. Please try again.'
+ error: 'Description generation timed out. Try again.'
});
}, effectiveTimeoutMs);
});
diff --git a/src/renderer/store/middleware/ipcMiddleware.js b/src/renderer/store/middleware/ipcMiddleware.js
index e321aa7c..b9b0ca2c 100644
--- a/src/renderer/store/middleware/ipcMiddleware.js
+++ b/src/renderer/store/middleware/ipcMiddleware.js
@@ -235,7 +235,7 @@ function safeDispatch(actionCreator, data) {
eventQueue.push({
actionCreator: addNotification,
data: {
- message: 'System is busy - some updates may be delayed.',
+ message: 'System is busy, so some updates may be delayed.',
severity: 'warning',
duration: 5000
}
diff --git a/src/renderer/store/middleware/persistenceMiddleware.js b/src/renderer/store/middleware/persistenceMiddleware.js
index 8b41103d..fee74e66 100644
--- a/src/renderer/store/middleware/persistenceMiddleware.js
+++ b/src/renderer/store/middleware/persistenceMiddleware.js
@@ -667,11 +667,11 @@ const persistenceMiddleware = (/** @type {any} */ store) => {
if (saveResult.degraded) {
const messages = {
reduced:
- 'Storage space limited - some file history may not be preserved between sessions.',
+ 'Storage space limited. Some file history may not be preserved between sessions.',
minimal:
- 'Storage space very limited - only settings and current phase will be preserved.',
- emergency: 'Storage space critically low - cleared old data to continue.',
- failed: 'Unable to save any data - changes will be lost when you close the app.'
+ 'Storage space very limited. Only settings and the current phase will be preserved.',
+ emergency: 'Storage space critically low. Old data was cleared to continue.',
+ failed: 'Unable to save any data. Changes will be lost when you close the app.'
};
const severity = saveResult.degraded === 'failed' ? 'error' : 'warning';
store.dispatch(
diff --git a/src/renderer/utils/errorMapping.js b/src/renderer/utils/errorMapping.js
index 08164009..5f460c71 100644
--- a/src/renderer/utils/errorMapping.js
+++ b/src/renderer/utils/errorMapping.js
@@ -13,23 +13,23 @@ const DEFAULT_NOTIFICATION = {
const ERROR_TYPE_MAP = {
TIMEOUT: {
severity: 'warning',
- message: 'Operation timed out. Please try again.'
+ message: 'Operation timed out. Try again.'
},
IPC_TIMEOUT: {
severity: 'warning',
- message: 'The AI is busy processing other requests. Please try again shortly.'
+ message: 'The AI is busy with other requests. Try again shortly.'
},
RATE_LIMITED: {
severity: 'warning',
- message: 'Too many requests. Please wait a moment and try again.'
+ message: 'Too many requests. Wait a moment and try again.'
},
CIRCUIT_OPEN: {
severity: 'warning',
- message: 'AI service is temporarily recovering. Please wait a moment and try again.'
+ message: 'AI service is temporarily recovering. Wait a moment and try again.'
},
HANDLER_NOT_READY: {
severity: 'warning',
- message: 'Service is still starting up. Please wait a moment and try again.'
+ message: 'Service is still starting up. Wait a moment and try again.'
},
NETWORK: {
severity: 'warning',
@@ -146,17 +146,17 @@ const ERROR_CODE_MAP = {
[AI_ERROR_CODES.LLAMA_MODEL_LOAD_FAILED]: {
severity: 'error',
message:
- 'Could not load the AI model. Re-download it from Settings → Models, or switch to a smaller model if this keeps happening.'
+ 'Could not load the AI model. Re-download it from Settings → Model management, or switch to a smaller model if this keeps happening.'
},
[AI_ERROR_CODES.LLAMA_MODEL_NOT_FOUND]: {
severity: 'error',
message:
- 'AI model file is missing. Open Settings → Models to install it, or run the model setup wizard from the welcome screen.'
+ 'AI model file is missing. Open Settings → Model management to install it, or run the model setup wizard from the welcome screen.'
},
[AI_ERROR_CODES.LLAMA_MODEL_INCOMPATIBLE_CPU]: {
severity: 'error',
message:
- 'Your CPU does not support instructions required by this model (SIGILL). Switch to the small Qwen 0.5B profile in Settings → Models, or install a build matching your CPU.'
+ 'Your CPU does not support instructions required by this model (SIGILL). Switch to the small Qwen 0.5B profile in Settings → Default AI models, or install a build matching your CPU.'
},
[AI_ERROR_CODES.LLAMA_MODEL_PATH_MISMATCH]: {
severity: 'error',
@@ -166,11 +166,11 @@ const ERROR_CODE_MAP = {
[AI_ERROR_CODES.LLAMA_MODEL_AUTO_FALLBACK]: {
severity: 'warning',
message:
- 'The configured AI model was unavailable, so StratoSort switched to a smaller default model. Quality may be reduced — reinstall the preferred model from Settings → Models to restore it.'
+ 'The configured AI model was unavailable, so StratoSort switched to a smaller default model. Quality may be reduced. Reinstall the preferred model from Settings → Model management to restore it.'
},
[AI_ERROR_CODES.LLAMA_INFERENCE_FAILED]: {
severity: 'error',
- message: 'AI inference failed. Please try again.'
+ message: 'AI inference failed. Try again.'
},
[AI_ERROR_CODES.LLAMA_GPU_ERROR]: {
severity: 'warning',
@@ -182,7 +182,7 @@ const ERROR_CODE_MAP = {
},
[AI_ERROR_CODES.VECTOR_DB_INIT_FAILED]: {
severity: 'error',
- message: 'Vector database failed to initialize. Please restart the app.'
+ message: 'Vector database failed to initialize. Restart the app.'
},
[AI_ERROR_CODES.VECTOR_DB_PERSIST_FAILED]: {
severity: 'warning',
@@ -190,7 +190,7 @@ const ERROR_CODE_MAP = {
},
[AI_ERROR_CODES.VECTOR_DB_QUERY_FAILED]: {
severity: 'error',
- message: 'Search failed. Please try again.'
+ message: 'Search failed. Try again.'
},
[AI_ERROR_CODES.VECTOR_DB_DIMENSION_MISMATCH]: {
severity: 'warning',
@@ -198,15 +198,15 @@ const ERROR_CODE_MAP = {
},
[AI_ERROR_CODES.EMBEDDING_GENERATION_FAILED]: {
severity: 'error',
- message: 'Failed to generate embeddings. Please try again.'
+ message: 'Failed to generate embeddings. Try again.'
},
[AI_ERROR_CODES.ANALYSIS_FAILED]: {
severity: 'error',
- message: 'Analysis failed. Please try again.'
+ message: 'Analysis failed. Try again.'
},
[AI_ERROR_CODES.MIGRATION_FAILED]: {
severity: 'error',
- message: 'Migration failed. Please restart the app or check logs.'
+ message: 'Migration failed. Restart the app or check logs.'
},
// ── File-system codes surfaced at the IPC boundary ──
[AI_ERROR_CODES.FILE_NOT_FOUND]: {
@@ -248,7 +248,7 @@ const ERROR_CODE_MAP = {
// ── Availability / model state ──
[AI_ERROR_CODES.MODEL_NOT_AVAILABLE]: {
severity: 'warning',
- message: 'AI model is not ready. Wait for setup to finish or open Settings → Models.'
+ message: 'AI model is not ready. Wait for setup to finish or open Settings → Model management.'
},
[AI_ERROR_CODES.INVALID_FILE_TYPE]: {
severity: 'warning',
@@ -257,11 +257,11 @@ const ERROR_CODE_MAP = {
// ── Validation ──
[AI_ERROR_CODES.VALIDATION_ERROR]: {
severity: 'warning',
- message: 'Request was invalid. Please check the form and try again.'
+ message: 'Request was invalid. Check the form and try again.'
},
[AI_ERROR_CODES.INVALID_INPUT]: {
severity: 'warning',
- message: 'One or more inputs were invalid. Please review and try again.'
+ message: 'One or more inputs were invalid. Review them and try again.'
},
[AI_ERROR_CODES.INVALID_PATH]: {
severity: 'warning',
@@ -277,7 +277,7 @@ const ERROR_CODE_MAP = {
},
[AI_ERROR_CODES.INVALID_FOLDER_DATA]: {
severity: 'warning',
- message: 'Folder configuration is invalid. Please review the values and retry.'
+ message: 'Folder configuration is invalid. Review the values and retry.'
},
[AI_ERROR_CODES.INVALID_FOLDER_NAME]: {
severity: 'warning',
@@ -321,27 +321,27 @@ const ERROR_CODE_MAP = {
// ── Smart folder operations ──
[AI_ERROR_CODES.SAVE_FAILED]: {
severity: 'error',
- message: 'Save failed. Please try again.'
+ message: 'Save failed. Try again.'
},
[AI_ERROR_CODES.UPDATE_FAILED]: {
severity: 'error',
- message: 'Update failed. Please try again.'
+ message: 'Update failed. Try again.'
},
[AI_ERROR_CODES.EDIT_FAILED]: {
severity: 'error',
- message: 'Edit failed. Please try again.'
+ message: 'Edit failed. Try again.'
},
[AI_ERROR_CODES.DELETE_FAILED]: {
severity: 'error',
- message: 'Delete failed. Please try again.'
+ message: 'Delete failed. Try again.'
},
[AI_ERROR_CODES.ADD_FOLDER_FAILED]: {
severity: 'error',
- message: 'Could not add that folder. Please try again.'
+ message: 'Could not add that folder. Try again.'
},
[AI_ERROR_CODES.CONFIG_SAVE_FAILED]: {
severity: 'error',
- message: 'Could not save configuration. Please try again.'
+ message: 'Could not save configuration. Try again.'
},
// ── Batch operations ──
[AI_ERROR_CODES.BATCH_OPERATION_FAILED]: {
@@ -375,16 +375,16 @@ const ERROR_CODE_MAP = {
},
[AI_ERROR_CODES.TIMEOUT]: {
severity: 'warning',
- message: 'Operation timed out. Please try again.'
+ message: 'Operation timed out. Try again.'
},
[AI_ERROR_CODES.SERVICE_UNAVAILABLE]: {
severity: 'warning',
- message: 'A service is temporarily unavailable. Please try again shortly.'
+ message: 'A service is temporarily unavailable. Try again shortly.'
},
// ── Generic ──
[AI_ERROR_CODES.UNKNOWN_ERROR]: {
severity: 'error',
- message: 'Something went wrong. Please try again.'
+ message: 'Something went wrong. Try again.'
},
[AI_ERROR_CODES.OPERATION_CANCELLED]: {
severity: 'info',
@@ -392,7 +392,7 @@ const ERROR_CODE_MAP = {
},
[AI_ERROR_CODES.QUEUE_FULL]: {
severity: 'warning',
- message: 'The processing queue is full. Please wait for current work to finish.'
+ message: 'The processing queue is full. Wait for current work to finish.'
}
};
diff --git a/src/shared/smartFolderNameValidation.js b/src/shared/smartFolderNameValidation.js
index 2956d693..cb57caad 100644
--- a/src/shared/smartFolderNameValidation.js
+++ b/src/shared/smartFolderNameValidation.js
@@ -71,7 +71,7 @@ function validateSmartFolderName(rawName) {
if (ILLEGAL_CHARS.test(sanitizedName)) {
return {
valid: false,
- error: 'Folder name contains invalid characters. Please avoid: < > : " | ? *',
+ error: 'Folder name contains invalid characters: < > : " | ? *',
errorCode: ERROR_CODES.INVALID_FOLDER_NAME_CHARS,
sanitizedName,
warning: null
diff --git a/src/shared/supportInfo.js b/src/shared/supportInfo.js
index fea6b020..75126fe4 100644
--- a/src/shared/supportInfo.js
+++ b/src/shared/supportInfo.js
@@ -118,7 +118,7 @@ function buildVersionString(info) {
*/
function buildSupportMailtoUrl(info = {}) {
const versionLabel = info?.appVersion ? `v${info.appVersion}` : 'unknown version';
- const subject = encodeURIComponent(`StratoSort Stack support — ${versionLabel}`);
+ const subject = encodeURIComponent(`StratoSort Stack support (${versionLabel})`);
const body = encodeURIComponent(buildSupportReportBody(info));
return `mailto:${SUPPORT_EMAIL}?subject=${subject}&body=${body}`;
}
diff --git a/test/AnalysisError.test.js b/test/AnalysisError.test.js
index 5b14ac88..28acdfda 100644
--- a/test/AnalysisError.test.js
+++ b/test/AnalysisError.test.js
@@ -31,7 +31,7 @@ describe('AnalysisError', () => {
const message = error.getUserFriendlyMessage();
const steps = error.getActionableSteps();
expect(message).toContain('AI engine');
- expect(steps).toContain('Check Settings > Models');
+ expect(steps).toContain('Check Settings → Local AI engine');
});
test('model missing error formats message', () => {
diff --git a/test/ErrorHandler.extended.test.js b/test/ErrorHandler.extended.test.js
index fc64cfe6..8cb9910f 100644
--- a/test/ErrorHandler.extended.test.js
+++ b/test/ErrorHandler.extended.test.js
@@ -178,7 +178,7 @@ describe('ErrorHandler - extended coverage', () => {
const result = errorHandler.parseError(error);
expect(result.type).toBe('NETWORK_ERROR');
- expect(result.message).toContain('network-related error');
+ expect(result.message).toContain('network error');
});
test('preserves short user-friendly error messages', () => {
@@ -196,21 +196,21 @@ describe('ErrorHandler - extended coverage', () => {
const result = errorHandler.parseError(error);
expect(result.type).toBe('UNKNOWN');
- expect(result.message).toBe('Something went wrong. Please try again.');
+ expect(result.message).toBe('Something went wrong. Try again.');
});
test('replaces messages containing undefined with generic', () => {
const error = new Error('Cannot read property of undefined');
const result = errorHandler.parseError(error);
- expect(result.message).toBe('Something went wrong. Please try again.');
+ expect(result.message).toBe('Something went wrong. Try again.');
});
test('replaces messages containing null with generic', () => {
const error = new Error('Expected value but got null');
const result = errorHandler.parseError(error);
- expect(result.message).toBe('Something went wrong. Please try again.');
+ expect(result.message).toBe('Something went wrong. Try again.');
});
test('includes originalMessage in details', () => {
diff --git a/test/SearchService.dimensionMismatch.test.js b/test/SearchService.dimensionMismatch.test.js
index 8fcd9c7b..db3f100b 100644
--- a/test/SearchService.dimensionMismatch.test.js
+++ b/test/SearchService.dimensionMismatch.test.js
@@ -83,7 +83,7 @@ describe('SearchService — dimension mismatch must surface, not silently degrad
const service = makeService();
await expect(service.vectorSearch('quarterly report', 5)).rejects.toMatchObject({
isDimensionMismatch: true,
- message: expect.stringContaining('rebuild your search index')
+ message: expect.stringMatching(/rebuild your search index/i)
});
});
@@ -119,7 +119,7 @@ describe('SearchService — dimension mismatch must surface, not silently degrad
expect.objectContaining({
type: 'VECTOR_DIMENSION_MISMATCH',
severity: 'high',
- message: expect.stringContaining('rebuild your search index')
+ message: expect.stringMatching(/rebuild your search index/i)
})
])
);
@@ -135,6 +135,6 @@ describe('SearchService — dimension mismatch must surface, not silently degrad
});
expect(result.success).toBe(false);
- expect(result.error).toContain('rebuild your search index');
+ expect(result.error).toMatch(/rebuild your search index/i);
});
});
diff --git a/test/components/AIProviderBadge.test.js b/test/components/AIProviderBadge.test.js
index 2f3e4bfc..4a5a0797 100644
--- a/test/components/AIProviderBadge.test.js
+++ b/test/components/AIProviderBadge.test.js
@@ -78,7 +78,7 @@ describe('AIProviderBadge', () => {
routing: { default: 'anthropic', perFolder: {} }
}
});
- const badge = screen.getByRole('status', { name: /cloud ai — anthropic claude/i });
+ const badge = screen.getByRole('status', { name: /cloud ai: anthropic claude/i });
expect(badge).toBeInTheDocument();
});
@@ -94,7 +94,7 @@ describe('AIProviderBadge', () => {
routing: { default: 'openaiCompatible', perFolder: {} }
}
});
- const badge = screen.getByRole('status', { name: /cloud ai — openai/i });
+ const badge = screen.getByRole('status', { name: /cloud ai: openai/i });
expect(badge).toBeInTheDocument();
});
diff --git a/test/components/AddSmartFolderModal.generateDescription.test.js b/test/components/AddSmartFolderModal.generateDescription.test.js
index 14ddc56d..35f01d4a 100644
--- a/test/components/AddSmartFolderModal.generateDescription.test.js
+++ b/test/components/AddSmartFolderModal.generateDescription.test.js
@@ -204,7 +204,7 @@ describe('AddSmartFolderModal — Generate with AI feedback', () => {
test('timed-out response surfaces a hint asking the user to retry or type manually', async () => {
mockGenerateDescription.mockResolvedValueOnce({
success: false,
- error: 'Description generation timed out. Please try again.'
+ error: 'Description generation timed out. Try again.'
});
const { showNotification } = renderModal();
diff --git a/test/components/LlamaConfigSection.healthBadge.test.js b/test/components/LlamaConfigSection.healthBadge.test.js
index 9410e3d2..258dff43 100644
--- a/test/components/LlamaConfigSection.healthBadge.test.js
+++ b/test/components/LlamaConfigSection.healthBadge.test.js
@@ -120,7 +120,7 @@ describe('LlamaConfigSection health badge', () => {
cpuFallbackTypes: []
});
const badge = screen.getByTestId('health-badge');
- expect(badge).toHaveTextContent('Ready (CPU only — GPU backend unavailable)');
+ expect(badge).toHaveTextContent('Ready (CPU only, GPU backend unavailable)');
expect(badge).not.toHaveTextContent(/cpu unavailable/);
expect(badge).toHaveAttribute('data-variant', 'warning');
});
diff --git a/test/components/ModelSetupWizard.test.js b/test/components/ModelSetupWizard.test.js
index 5828ec8a..d53083ce 100644
--- a/test/components/ModelSetupWizard.test.js
+++ b/test/components/ModelSetupWizard.test.js
@@ -1033,7 +1033,7 @@ describe('ModelSetupWizard download status it cannot trust yet', () => {
expect(screen.getByText(/Choose AI Models/i)).toBeInTheDocument();
expect(
- screen.getByText('Required model downloads stopped. Please retry downloads.')
+ screen.getByText('Required model downloads stopped. Retry the downloads.')
).toBeInTheDocument();
// The retry starts real downloads: the old message must not sit above them.
diff --git a/test/components/OrganizePhase.test.js b/test/components/OrganizePhase.test.js
index e7975839..674e88f0 100644
--- a/test/components/OrganizePhase.test.js
+++ b/test/components/OrganizePhase.test.js
@@ -333,11 +333,11 @@ describe('OrganizePhase premium preflight copy', () => {
test('allows the top review card to be minimized', () => {
render();
- expect(screen.getByText(/Approve the move plan with confidence/i)).toBeInTheDocument();
+ expect(screen.getByText(/Approve the move plan/i)).toBeInTheDocument();
fireEvent.click(screen.getByRole('button', { name: /minimize .*guide/i }));
- expect(screen.queryByText(/Approve the move plan with confidence/i)).not.toBeInTheDocument();
+ expect(screen.queryByText(/Approve the move plan/i)).not.toBeInTheDocument();
expect(screen.getByText(/2 files ready for review/i)).toBeInTheDocument();
});
diff --git a/test/components/OrganizePreviewModal.test.js b/test/components/OrganizePreviewModal.test.js
index 384b4584..031bb403 100644
--- a/test/components/OrganizePreviewModal.test.js
+++ b/test/components/OrganizePreviewModal.test.js
@@ -112,7 +112,7 @@ describe('OrganizePreviewModal', () => {
test('is marked as unchanged when its name stays too', () => {
renderModal({ plan: stayPlan('C:\\Docs\\Finance\\budget.xlsx') });
- expect(screen.getByText('Already here — no change')).toBeInTheDocument();
+ expect(screen.getByText('Already here, no change')).toBeInTheDocument();
expect(screen.queryByText('Already in this folder')).not.toBeInTheDocument();
});
diff --git a/test/components/ReadyFileItem.suggestedNewFolder.test.js b/test/components/ReadyFileItem.suggestedNewFolder.test.js
index f2f1b929..94cdca11 100644
--- a/test/components/ReadyFileItem.suggestedNewFolder.test.js
+++ b/test/components/ReadyFileItem.suggestedNewFolder.test.js
@@ -76,7 +76,7 @@ describe('ReadyFileItem suggestedNewFolder surfacing', () => {
// Built-in catch-all is shown as an automatic fallback label, not as a
// peer category named "Uncategorized".
expect(screen.getByRole('combobox', { name: /Category/i })).toHaveTextContent(
- /Fallback — no folder match \(Uncategorized\)/i
+ /Fallback: no folder match \(Uncategorized\)/i
);
});
diff --git a/test/components/StatusBadge.test.js b/test/components/StatusBadge.test.js
index 0b045b99..1c2cbca1 100644
--- a/test/components/StatusBadge.test.js
+++ b/test/components/StatusBadge.test.js
@@ -63,7 +63,7 @@ describe('StatusBadge', () => {
// Exactly one raw occurrence remains: the interactive save-failed retry
// (documented in-component — StatusBadge renders a static span).
expect(occurrences).toHaveLength(1);
- const buttonIdx = src.indexOf('Save failed — retry');
+ const buttonIdx = src.indexOf('Save failed. Retry');
const recipeIdx = src.indexOf('text-micro font-semibold uppercase tracking-wide');
expect(Math.abs(buttonIdx - recipeIdx)).toBeLessThan(600);
});
diff --git a/test/components/WelcomePhase.test.js b/test/components/WelcomePhase.test.js
index 389151b8..72dd2366 100644
--- a/test/components/WelcomePhase.test.js
+++ b/test/components/WelcomePhase.test.js
@@ -297,7 +297,7 @@ describe('WelcomePhase', () => {
await waitFor(() => {
expect(screen.getByText(/Organize files now/i)).toBeInTheDocument();
});
- expect(screen.queryByText(/Finish local AI setup when you are ready/i)).not.toBeInTheDocument();
+ expect(screen.queryByText(/Finish local AI setup when you're ready/i)).not.toBeInTheDocument();
});
describe('modelAutoDownloadSkipped persistence', () => {
@@ -345,7 +345,7 @@ describe('WelcomePhase', () => {
// The setup card and wizard close for the session too.
expect(screen.queryByTestId('model-setup-wizard')).not.toBeInTheDocument();
expect(
- screen.queryByText(/Finish local AI setup when you are ready/i)
+ screen.queryByText(/Finish local AI setup when you're ready/i)
).not.toBeInTheDocument();
});
@@ -368,7 +368,7 @@ describe('WelcomePhase', () => {
expect(screen.queryByTestId('model-setup-wizard')).not.toBeInTheDocument();
expect(
- screen.queryByText(/Finish local AI setup when you are ready/i)
+ screen.queryByText(/Finish local AI setup when you're ready/i)
).not.toBeInTheDocument();
});
diff --git a/test/components/dashboard/DashboardView.test.js b/test/components/dashboard/DashboardView.test.js
index 36dee2e1..e617b163 100644
--- a/test/components/dashboard/DashboardView.test.js
+++ b/test/components/dashboard/DashboardView.test.js
@@ -482,7 +482,7 @@ describe('DashboardView', () => {
render();
expect(screen.getByRole('alert')).toHaveTextContent('2');
- expect(screen.getByRole('alert')).toHaveTextContent('retry them in Discover');
+ expect(screen.getByRole('alert')).toHaveTextContent('Retry them in Discover');
const failedChip = screen.getByText('2 failed').closest('button');
expect(failedChip).not.toBeNull();
fireEvent.click(failedChip);
@@ -513,7 +513,7 @@ describe('DashboardView', () => {
render();
const alert = screen.getByRole('alert');
expect(alert).toHaveTextContent('1 file');
- expect(alert).toHaveTextContent('retry it in Discover');
+ expect(alert).toHaveTextContent('Retry it in Discover');
});
});
diff --git a/test/components/dashboard/KnowledgeStatsCard.test.js b/test/components/dashboard/KnowledgeStatsCard.test.js
index 4bd703a3..d7fb5b2d 100644
--- a/test/components/dashboard/KnowledgeStatsCard.test.js
+++ b/test/components/dashboard/KnowledgeStatsCard.test.js
@@ -26,7 +26,7 @@ describe('KnowledgeStatsCard', () => {
test('renders years covered, items, storage, and categories from statistics', async () => {
render();
- await waitFor(() => expect(screen.getByText(/2016\s*–\s*2026/)).toBeTruthy());
+ await waitFor(() => expect(screen.getByText(/2016 to 2026/)).toBeTruthy());
expect(screen.getByText(/10 years/i)).toBeTruthy();
expect(screen.getByText('1,234')).toBeTruthy();
// formatBytes uses value.toFixed(2) for values < 10 → "5.50 GB"
@@ -81,6 +81,6 @@ describe('KnowledgeStatsCard', () => {
isEmpty: false
});
render();
- await waitFor(() => expect(screen.getByText(/2025\s*–\s*2026/)).toBeTruthy());
+ await waitFor(() => expect(screen.getByText(/2025 to 2026/)).toBeTruthy());
});
});
diff --git a/test/e2e/settings/ai-provider.spec.js b/test/e2e/settings/ai-provider.spec.js
index 529ee0a0..b4b27d6e 100644
--- a/test/e2e/settings/ai-provider.spec.js
+++ b/test/e2e/settings/ai-provider.spec.js
@@ -208,7 +208,7 @@ test.describe('AI Provider — Settings UI', () => {
await window.waitForTimeout(200);
const hasBadge = await window.evaluate(() => {
- return Boolean(document.querySelector('[role="status"][aria-label^="Cloud AI —"]'));
+ return Boolean(document.querySelector('[role="status"][aria-label^="Cloud AI"]'));
});
expect(hasBadge).toBe(false);
});
diff --git a/test/errorMapping.circuitOpen.test.js b/test/errorMapping.circuitOpen.test.js
index 1c3974c0..9b91379a 100644
--- a/test/errorMapping.circuitOpen.test.js
+++ b/test/errorMapping.circuitOpen.test.js
@@ -10,7 +10,7 @@
const { mapErrorToNotification } = require('../src/renderer/utils/errorMapping');
describe('errorMapping: open circuit breaker', () => {
- const recovering = 'AI service is temporarily recovering. Please wait a moment and try again.';
+ const recovering = 'AI service is temporarily recovering. Wait a moment and try again.';
test('maps the breaker message that CircuitBreaker.execute actually throws', () => {
expect(
diff --git a/test/ipcServices.test.js b/test/ipcServices.test.js
index 56fcc1ed..e48093ea 100644
--- a/test/ipcServices.test.js
+++ b/test/ipcServices.test.js
@@ -91,7 +91,7 @@ describe('ipc services', () => {
await expect(pending).resolves.toEqual({
success: false,
- error: 'Description generation timed out. Please try again.'
+ error: 'Description generation timed out. Try again.'
});
} finally {
jest.useRealTimers();
diff --git a/test/llamaUtils.test.js b/test/llamaUtils.test.js
index 3c2901c9..3519d4ae 100644
--- a/test/llamaUtils.test.js
+++ b/test/llamaUtils.test.js
@@ -327,7 +327,7 @@ describe('llamaUtils', () => {
const result = await llamaUtils.ensureTextModelReadyForAnalysis();
expect(result.ok).toBe(false);
- expect(result.error).toMatch(/Settings > Models/i);
+ expect(result.error).toMatch(/Settings → Local AI engine/i);
});
test('canonicalizes casing when configured basename matches disk but case differs', async () => {
diff --git a/test/renderer/components/search/useChatTab.scope.test.js b/test/renderer/components/search/useChatTab.scope.test.js
index b3a64248..d3536896 100644
--- a/test/renderer/components/search/useChatTab.scope.test.js
+++ b/test/renderer/components/search/useChatTab.scope.test.js
@@ -338,7 +338,7 @@ describe('useChatTab conversation state', () => {
await act(async () => {
result.current.handleResponseModeChange('deep');
});
- expect(result.current.chatWarning).toBe('Failed to save chat response mode. Please try again.');
+ expect(result.current.chatWarning).toBe('Failed to save chat response mode. Try again.');
// Not the chat error banner: its Retry button would regenerate an answer.
expect(result.current.chatError).toBe('');
});
diff --git a/test/searchUtils.test.js b/test/searchUtils.test.js
index f5747eed..46a0d8b7 100644
--- a/test/searchUtils.test.js
+++ b/test/searchUtils.test.js
@@ -276,7 +276,7 @@ describe('getErrorMessage', () => {
it('returns embedding model changed message', () => {
const result = getErrorMessage({ message: 'Embedding model changed recently' });
- expect(result).toMatch(/rebuild your index/);
+ expect(result).toMatch(/Rebuild your index/);
});
it('falls back to error.message', () => {
diff --git a/test/useOrganization.runOutcome.test.js b/test/useOrganization.runOutcome.test.js
index fd822153..aaaf9771 100644
--- a/test/useOrganization.runOutcome.test.js
+++ b/test/useOrganization.runOutcome.test.js
@@ -379,9 +379,7 @@ describe('useOrganization: how a finished run is reported', () => {
});
const toasts = outcomeToasts(options);
- expect(toasts).toEqual([
- ['Organization cancelled — 1 file organized, 2 skipped.', 'warning']
- ]);
+ expect(toasts).toEqual([['Organization cancelled: 1 file organized, 2 skipped.', 'warning']]);
expect(lastRun(options)).toMatchObject({ outcome: 'moved', count: 1 });
expect(options.actions.advancePhase).not.toHaveBeenCalled();
});
From cb7fc4290c91ceee84593e79a966143ad3661ea1 Mon Sep 17 00:00:00 2001
From: Levy Tate <78818969+iLevyTate@users.noreply.github.com>
Date: Mon, 16 Nov 2026 14:39:54 -0500
Subject: [PATCH 5/5] test(settings): mock the Documents folder in the
platform's own path form
On Linux a Windows path is not absolute, so the settings sanitizer drops
it and auto-recovery returned no defaultSmartFolderLocation. The app is
right: Electron never reports a Windows path there. The mock now matches
the platform, which fixes the ci (ubuntu-latest) failure on this branch.
---
test/SettingsService.restoreRuntimeDefaults.test.js | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/test/SettingsService.restoreRuntimeDefaults.test.js b/test/SettingsService.restoreRuntimeDefaults.test.js
index c343a3bd..692aaafd 100644
--- a/test/SettingsService.restoreRuntimeDefaults.test.js
+++ b/test/SettingsService.restoreRuntimeDefaults.test.js
@@ -7,11 +7,15 @@
* Auto-recovery wrote the full merged object, stamping every default.
*/
+// The Documents folder in this platform's own form, as Electron reports it.
+// A Windows path on Linux is not an absolute path there, so the settings
+// sanitizer drops it and the recovered location comes back undefined.
+const mockDocumentsDir =
+ process.platform === 'win32' ? 'C:\\Users\\a-user\\Documents' : '/home/a-user/Documents';
+
jest.mock('electron', () => ({
app: {
- getPath: jest.fn((name) =>
- name === 'documents' ? 'C:\\Users\\a-user\\Documents' : 'C:\\user-data'
- )
+ getPath: jest.fn((name) => (name === 'documents' ? mockDocumentsDir : 'C:\\user-data'))
}
}));