fix: clean up review metadata when archiving sessions
Treat archived sessions like deleted sessions for review metadata cleanup Preserve linked review session state consistency
This commit is contained in:
@@ -503,6 +503,7 @@ export async function archiveSession(sessionId: string): Promise<boolean> {
|
|||||||
ui.setCurrentSession(null)
|
ui.setCurrentSession(null)
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
await cleanupReviewMetadataBeforeDelete(sessionId, sessionDirectory)
|
||||||
const archived = await opencodeClient.updateSession(sessionId, { time: { archived: archivedAt } }, sessionDirectory)
|
const archived = await opencodeClient.updateSession(sessionId, { time: { archived: archivedAt } }, sessionDirectory)
|
||||||
if (!archived) {
|
if (!archived) {
|
||||||
throw new Error("session.update failed: server did not return the archived session")
|
throw new Error("session.update failed: server did not return the archived session")
|
||||||
|
|||||||
Reference in New Issue
Block a user