From 32de3cd47d3638e980bdef88abb8d4809c0246e7 Mon Sep 17 00:00:00 2001 From: liuxuezhuo Date: Mon, 17 Aug 2026 15:21:00 +0800 Subject: [PATCH 1/2] chore: surface underlying errors when session history fails to load The restore report only counted failed session files, discarding the underlying readSDKSession error, so user feedback could not reveal the root cause. Append each failing session id and its error to the reported detail. Co-authored-by: QoderAI (Qwen 3.8 Max) --- src/qoder/history/qoder-conversation-history-service.ts | 5 ++++- .../qoder/history/qoder-conversation-history-service.test.ts | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) 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 () => { From 578a9890282cc68751f2f2b420b9096a42b9abdd Mon Sep 17 00:00:00 2001 From: liuxuezhuo Date: Mon, 17 Aug 2026 19:37:18 +0800 Subject: [PATCH 2/2] docs: note the underlying file error in the restore diagnostics changelog entry Co-authored-by: QoderAI (Qwen 3.8 Max) --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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