fix(cli): store annonces inter-agent borné par projectId avec reset et réhydratation busy au changement de projet — #236

This commit is contained in:
2026-08-22 10:02:41 +02:00
parent 85f659c788
commit 8deaa1fd6c
7 changed files with 167 additions and 26 deletions

View File

@ -52,6 +52,7 @@ import {
type SettingsSection,
} from "@/features/settings";
import { GitGraphView } from "@/features/git";
import { AnnouncementsProvider } from "@/features/announcements";
import { usePluginMenus, usePluginRuntime } from "@/features/plugins";
import type { WhenContext } from "@/plugins/runtime";
import {
@ -735,7 +736,7 @@ export function ProjectsView() {
<p className="text-sm text-muted">Open a project to use this panel.</p>
);
}
return (
const body = (
<ViewPanelBody
panel={panel as ViewPanelId}
projectId={active.id}
@ -743,6 +744,11 @@ export function ProjectsView() {
onOpenConversation={openConversation}
/>
);
return panel === "agents" ? (
<AnnouncementsProvider projectId={active.id}>{body}</AnnouncementsProvider>
) : (
body
);
}
// Projects manager renders inline in the welcome area only when it is not
@ -924,17 +930,19 @@ export function ProjectsView() {
projectId={active.id}
/>
) : (
<LayoutGrid
key={`${active.id}-${activeLayout?.id ?? "default"}`}
projectId={active.id}
cwd={active.root}
layoutId={activeLayout?.id}
onOpenConversation={openConversation}
onOpenPluginsSettings={() => {
setSettingsSection("plugins");
dismissFloating();
}}
/>
<AnnouncementsProvider projectId={active.id}>
<LayoutGrid
key={`${active.id}-${activeLayout?.id ?? "default"}`}
projectId={active.id}
cwd={active.root}
layoutId={activeLayout?.id}
onOpenConversation={openConversation}
onOpenPluginsSettings={() => {
setSettingsSection("plugins");
dismissFloating();
}}
/>
</AnnouncementsProvider>
)}
</>
) : viewerConversation ? (