fix(frontend): la conversation survit au redemarrage agent et a l'aller-retour projet — #291 (ProjectsView/WebWorkspace conservent le pointeur viewerConversation mais ne rendent le viewer que si sa conversation appartient au projet actif: le projet intermediaire affiche sa propre surface sans fuite, le retour au projet source remonte la vue avec la meme cle project/conversation et relit le transcript persiste; useConversationThread ne vide plus le buffer au changement de conversation cible, un contenu deja visible reste affiche pendant relecture ou echec; l'erreur de lecture devient "Impossible de recharger la conversation." avec bouton Reessayer branchant refreshTail sans retirer les tours visibles; QA verte reconfirmee par Git: ProjectsView.ls7 scenario "rehydrates the same conversation" (restart agent, switch alpha->beta->alpha, deux readPage identiques sur {projectId, conversationId}), ConversationViewer + useConversationThread 19/19, npm run build, git diff --check; reserves hors perimetre preexistantes: 3 echecs historiques ProjectsView.ls7 (helper panneau Work/open conversation) + 1 echec WebDesktopWorkspace (libelle anglais Project context); validation runtime AppImage/live restante; aucun push)
This commit is contained in:
@ -247,6 +247,8 @@ export function ProjectsView() {
|
||||
const [taskToasts, setTaskToasts] = useState<BackgroundTaskToast[]>([]);
|
||||
|
||||
const active = vm.openTabs.find((t) => t.id === vm.activeTabId) ?? null;
|
||||
const activeViewerConversation =
|
||||
viewerConversation?.projectId === active?.id ? viewerConversation : null;
|
||||
const projectNameById = useMemo(() => {
|
||||
const names = new Map<string, string>();
|
||||
for (const project of vm.projects) names.set(project.id, project.name);
|
||||
@ -924,11 +926,11 @@ export function ProjectsView() {
|
||||
projectId={active.id}
|
||||
onActiveLayoutChange={setActiveLayout}
|
||||
/>
|
||||
{viewerConversation ? (
|
||||
{activeViewerConversation ? (
|
||||
<ConversationViewer
|
||||
key={`${viewerConversation.projectId}-${viewerConversation.conversationId}`}
|
||||
projectId={viewerConversation.projectId}
|
||||
conversationId={viewerConversation.conversationId}
|
||||
key={`${activeViewerConversation.projectId}-${activeViewerConversation.conversationId}`}
|
||||
projectId={activeViewerConversation.projectId}
|
||||
conversationId={activeViewerConversation.conversationId}
|
||||
onClose={() => setViewerConversation(null)}
|
||||
onOpenConversation={openConversation}
|
||||
/>
|
||||
@ -953,14 +955,6 @@ export function ProjectsView() {
|
||||
</AnnouncementsProvider>
|
||||
)}
|
||||
</>
|
||||
) : viewerConversation ? (
|
||||
<ConversationViewer
|
||||
key={`${viewerConversation.projectId}-${viewerConversation.conversationId}`}
|
||||
projectId={viewerConversation.projectId}
|
||||
conversationId={viewerConversation.conversationId}
|
||||
onClose={() => setViewerConversation(null)}
|
||||
onOpenConversation={openConversation}
|
||||
/>
|
||||
) : (
|
||||
<div className="flex flex-1 justify-center overflow-y-auto p-6">
|
||||
<div className="w-full max-w-xl">
|
||||
|
||||
Reference in New Issue
Block a user