Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: verify summary detail retries after fetch failures

[._.]/ Adam Eivy1815c1daed3a
diff --git a/client/src/components/cos/tabs/AgentCard.test.jsx b/client/src/components/cos/tabs/AgentCard.test.jsx
index 63f421e120..187bcbc5da 100644
--- a/client/src/components/cos/tabs/AgentCard.test.jsx
+++ b/client/src/components/cos/tabs/AgentCard.test.jsx
@@ -1290,3 +1290,16 @@ it.each([false, true])('keeps a completed summary behind Show and its duplicate
await userEvent.click(screen.getByRole('button', { name: 'Hide', exact: true }));
expect(screen.queryByText(summary)).not.toBeInTheDocument();
});
+
+
+it('retries a clipped summary after the expanded detail request fails', async () => {
+ api.getCosAgent.mockRejectedValueOnce(new Error('Temporary failure'))
+ .mockResolvedValueOnce({ ...agent, metadata: { ...agent.metadata, taskSummary: 'Recovered full summary.' }, output: [] });
+ render(<MemoryRouter><AgentCard agent={{ ...agent, metadata: { ...agent.metadata, taskSummary: 'Clipped preview', taskSummaryTruncated: true } }} completed /></MemoryRouter>);
+ await userEvent.click(screen.getByRole('button', { name: 'Show', exact: true }));
+ const retry = await screen.findByRole('button', { name: 'Load full summary' });
+ await waitFor(() => expect(retry).toBeEnabled());
+ await userEvent.click(retry);
+ expect(await screen.findByText('Recovered full summary.')).toBeInTheDocument();
+ expect(api.getCosAgent).toHaveBeenCalledTimes(2);
+});