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:
@@ -388,12 +388,14 @@ function usePendingChanges(sessionId: string) {
|
||||
function DiffPanel({
|
||||
changes,
|
||||
loading,
|
||||
currentProvider,
|
||||
onRefresh,
|
||||
onApprove,
|
||||
onReject,
|
||||
}: {
|
||||
changes: PendingChange[];
|
||||
loading: boolean;
|
||||
currentProvider: string;
|
||||
onRefresh: () => void;
|
||||
onApprove: (id: string) => void;
|
||||
onReject: (id: string) => void;
|
||||
@@ -409,6 +411,29 @@ function DiffPanel({
|
||||
? `Changes from ${distinctAgents.map((a) => providerLabel(a)).join(', ')}`
|
||||
: null;
|
||||
|
||||
// v2.6 §9c: staging-boundary caveat. External agents (opencode/goose/qwen/
|
||||
// claude) edit *inside their worktree*; native boocode reads/writes the
|
||||
// *project root* via pending_changes. Unapplied edits don't cross that
|
||||
// boundary. When the currently-selected provider can't see another side's
|
||||
// staged-but-unapplied edits, surface a muted one-liner. agent===null
|
||||
// (manual) is boundary-neutral. Pure derivation — no new state/fetch.
|
||||
const isNativeProvider = currentProvider === 'boocode';
|
||||
const boundaryHint = (() => {
|
||||
if (isNativeProvider) {
|
||||
// Native boocode is selected: it won't see external-worktree edits.
|
||||
const external = distinctAgents.filter((a) => a !== null && a !== 'boocode');
|
||||
if (external.length === 0) return null;
|
||||
const who =
|
||||
external.length === 1
|
||||
? providerLabel(external[0]!)
|
||||
: external.map((a) => providerLabel(a)).join(', ');
|
||||
return `${who}'s edits live in its worktree — BooCode won't see them until applied.`;
|
||||
}
|
||||
// An external agent is selected: it won't see boocode's project-root edits.
|
||||
if (!distinctAgents.includes('boocode')) return null;
|
||||
return `BooCode's edits live in the project root — ${providerLabel(currentProvider)} won't see them until applied.`;
|
||||
})();
|
||||
|
||||
return (
|
||||
<div className="flex flex-col h-full border-t border-border">
|
||||
<div className="flex items-center justify-between px-3 py-1.5 border-b border-border bg-muted/30">
|
||||
@@ -430,6 +455,14 @@ function DiffPanel({
|
||||
{mixedNote}
|
||||
</div>
|
||||
)}
|
||||
{boundaryHint && (
|
||||
<div
|
||||
className="px-3 py-1 border-b border-border bg-muted/10 text-xs text-muted-foreground"
|
||||
title={boundaryHint}
|
||||
>
|
||||
{boundaryHint}
|
||||
</div>
|
||||
)}
|
||||
<div className="flex-1 overflow-y-auto">
|
||||
{pending.length === 0 ? (
|
||||
<div className="flex items-center justify-center h-full text-sm text-muted-foreground">
|
||||
@@ -914,6 +947,7 @@ export function CoderPane({
|
||||
<DiffPanel
|
||||
changes={changes}
|
||||
loading={loading}
|
||||
currentProvider={agentConfig.provider}
|
||||
onRefresh={refresh}
|
||||
onApprove={approve}
|
||||
onReject={reject}
|
||||
|
||||
Reference in New Issue
Block a user