feat: v2.6 follow-ups — apps/server close-hook caller + DiffPanel staging hint (3.7)
apps/server fire-and-forgets BooCoder's Phase-3 close hooks (new coder-notify.ts, reuses BOOCODER_URL, never-rejects) on session-delete + chat archive/archive-all/delete, so warm backends + worktrees tear down immediately (idle-evict/reaper was the backstop). 3.7: BooCoder DiffPanel shows a muted one-liner when the selected provider can't see another agent's unapplied worktree edits (pure derivation from per-change agent + current provider, no new state). 6 new server tests (coder-notify); 537 server tests pass; web+server tsc/build clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -4,6 +4,7 @@ import type { Sql } from '../db.js';
|
||||
import type { Broker } from '../services/broker.js';
|
||||
import type { Chat, Message } from '../types/api.js';
|
||||
import { getModelContext } from '../services/model-context.js';
|
||||
import { notifyCoderClose } from '../services/coder-notify.js';
|
||||
|
||||
const CreateBody = z.object({
|
||||
name: z.string().min(1).max(200).optional(),
|
||||
@@ -167,6 +168,9 @@ export function registerChatRoutes(
|
||||
chat_id: id,
|
||||
session_id: req.params.id,
|
||||
});
|
||||
// Fire-and-forget per archived chat: tear down its warm agent backends
|
||||
// on the coder. Best-effort — never blocks/fails the bulk archive.
|
||||
void notifyCoderClose('chat', id, req.log);
|
||||
}
|
||||
return { archived: ids.length, ids };
|
||||
}
|
||||
@@ -208,6 +212,9 @@ export function registerChatRoutes(
|
||||
chat_id: row.id,
|
||||
session_id: row.session_id,
|
||||
});
|
||||
// Fire-and-forget: tear down this chat's warm agent backends + (last-chat)
|
||||
// worktree on the coder. Best-effort — never blocks/fails the archive.
|
||||
void notifyCoderClose('chat', row.id, req.log);
|
||||
reply.code(204);
|
||||
return null;
|
||||
}
|
||||
@@ -248,6 +255,9 @@ export function registerChatRoutes(
|
||||
chat_id: row.id,
|
||||
session_id: row.session_id,
|
||||
});
|
||||
// Fire-and-forget: tear down this chat's warm agent backends + (last-chat)
|
||||
// worktree on the coder. Best-effort — never blocks/fails the delete.
|
||||
void notifyCoderClose('chat', row.id, req.log);
|
||||
reply.code(204);
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user