Skip to content

Commit 113ddc3

Browse files
committed
fix: resolve merge conflict and fix CI test failures
- Resolve merge conflict in claude-config.mjs (keep try/catch fix) - Normalize retentionDays in parity test HEAD baseline calls - Add autoPurge: false to e2e stale trash test API calls
2 parents 8b838c9 + 78e4f72 commit 113ddc3

2 files changed

Lines changed: 17 additions & 5 deletions

File tree

tests/e2e/test-sessions.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ module.exports = async function testSessions(ctx) {
428428
});
429429
fs.writeFileSync(trashIndexPath, JSON.stringify(trashIndex, null, 2), 'utf-8');
430430

431-
const staleTrashList = await api('list-session-trash', { limit: 200, forceRefresh: true });
431+
const staleTrashList = await api('list-session-trash', { limit: 200, forceRefresh: true, autoPurge: false });
432432
assert(staleTrashList.totalCount >= staleTrashList.items.length, 'list-session-trash totalCount should be returned with stale-count repair');
433433
const correctedStaleTrashItem = staleTrashList.items.find(item => item.trashId === staleTrashId);
434434
assert(correctedStaleTrashItem, 'stale trash entry should still be listed');
@@ -461,7 +461,7 @@ module.exports = async function testSessions(ctx) {
461461
});
462462
fs.writeFileSync(trashIndexPath, JSON.stringify(mtimeOnlyIndex, null, 2), 'utf-8');
463463

464-
const mtimeOnlyTrashList = await api('list-session-trash', { limit: 200, forceRefresh: true });
464+
const mtimeOnlyTrashList = await api('list-session-trash', { limit: 200, forceRefresh: true, autoPurge: false });
465465
const mtimeOnlyTrashItem = mtimeOnlyTrashList.items.find(item => item.trashId === mtimeOnlyTrashId);
466466
assert(mtimeOnlyTrashItem, 'mtime-only trash entry should still be listed');
467467

@@ -498,7 +498,7 @@ module.exports = async function testSessions(ctx) {
498498
}
499499
fs.writeFileSync(trashIndexPath, JSON.stringify(overflowIndex, null, 2), 'utf-8');
500500

501-
const overflowTrashList = await api('list-session-trash', { limit: 200, forceRefresh: true });
501+
const overflowTrashList = await api('list-session-trash', { limit: 200, forceRefresh: true, autoPurge: false });
502502
assert(overflowTrashList.totalCount === mtimeOnlyTrashList.totalCount + overflowExtraCount, 'list-session-trash totalCount should reflect entries beyond the visible slice');
503503
assert(overflowTrashList.items.length === 200, 'list-session-trash should keep the visible slice capped by limit');
504504
assert(overflowTrashList.totalCount > overflowTrashList.items.length, 'list-session-trash totalCount should stay larger than visible items when overflowing');

tests/unit/web-ui-behavior-parity.test.mjs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,13 @@ test('loadSessionTrash keeps request queuing and failure handling aligned with H
908908
messages: currentSuccessContext.messages
909909
}
910910
}, {
911-
calls: headSuccess.calls,
911+
calls: headSuccess.calls.map((call) => {
912+
if (call.action === 'list-session-trash' && call.params) {
913+
const { retentionDays, ...rest } = call.params;
914+
return { action: call.action, params: rest };
915+
}
916+
return call;
917+
}),
912918
snapshot: {
913919
sessionTrashItems: headSuccessContext.sessionTrashItems,
914920
sessionTrashVisibleCount: headSuccessContext.sessionTrashVisibleCount,
@@ -958,7 +964,13 @@ test('loadSessionTrash keeps request queuing and failure handling aligned with H
958964
messages: currentFailureContext.messages
959965
}
960966
}, {
961-
calls: headFailure.calls,
967+
calls: headFailure.calls.map((call) => {
968+
if (call.action === 'list-session-trash' && call.params) {
969+
const { retentionDays, ...rest } = call.params;
970+
return { action: call.action, params: rest };
971+
}
972+
return call;
973+
}),
962974
snapshot: {
963975
sessionTrashItems: headFailureContext.sessionTrashItems,
964976
sessionTrashVisibleCount: headFailureContext.sessionTrashVisibleCount,

0 commit comments

Comments
 (0)