diff --git a/CHANGELOG.md b/CHANGELOG.md index 0950858..b182cfe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -55,7 +55,9 @@ version with its date and start a fresh empty `[Unreleased]` above it. - Startup session restore no longer fails silently: when the tab layout, an individual tab, session metadata, or conversation history cannot be read, Qoderian now shows a single notice with the issue - count and logs per-stage details to the developer console. + count and logs per-stage details to the developer console, including + the underlying file error (such as a permission denial) for each + session history file that fails to load. ## [1.0.4] - 2026-08-12 diff --git a/src/qoder/history/qoder-conversation-history-service.ts b/src/qoder/history/qoder-conversation-history-service.ts index 4a077a8..d532e17 100644 --- a/src/qoder/history/qoder-conversation-history-service.ts +++ b/src/qoder/history/qoder-conversation-history-service.ts @@ -385,6 +385,7 @@ export class QoderConversationHistoryService { let missingSessionCount = 0; let errorCount = 0; let successCount = 0; + const loadErrors: string[] = []; const currentSessionId = isPendingFork ? state.forkSource!.sessionId @@ -404,6 +405,7 @@ export class QoderConversationHistoryService { if (result.error) { errorCount++; + loadErrors.push(`${sessionId}: ${result.error}`); continue; } @@ -415,7 +417,8 @@ export class QoderConversationHistoryService { if (errorCount > 0) { reportRestoreIssue( 'history', - `Conversation "${conversation.id}": ${errorCount} of ${allSessionIds.length} session file(s) failed to load.`, + `Conversation "${conversation.id}": ${errorCount} of ${allSessionIds.length} session file(s) failed to load. ` + + `Errors: ${loadErrors.join('; ')}`, ); } else if (allSessionsMissing) { reportRestoreIssue( diff --git a/tests/unit/qoder/history/qoder-conversation-history-service.test.ts b/tests/unit/qoder/history/qoder-conversation-history-service.test.ts index b363e89..80df444 100644 --- a/tests/unit/qoder/history/qoder-conversation-history-service.test.ts +++ b/tests/unit/qoder/history/qoder-conversation-history-service.test.ts @@ -93,6 +93,8 @@ describe('QoderConversationHistoryService restore diagnostics', () => { stage: 'history', detail: expect.stringContaining('conv-1'), }); + // The underlying error and session id must surface for diagnostics. + expect(issues[0].detail).toContain('sess-1: read failed'); }); it('reports a history issue when session files are missing on disk', async () => {