Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(aui): correct agent status test for running state

Steven Enamakelae48d29bb4ef
diff --git a/app/src/features/conversations/aui/AgentRunningStatus.test.tsx b/app/src/features/conversations/aui/AgentRunningStatus.test.tsx
index ffa498b3ea..e6ff689106 100644
--- a/app/src/features/conversations/aui/AgentRunningStatus.test.tsx
+++ b/app/src/features/conversations/aui/AgentRunningStatus.test.tsx
@@ -1,15 +1,52 @@
+import { combineReducers, configureStore } from '@reduxjs/toolkit';
import { render, screen } from '@testing-library/react';
-import { describe, expect, it } from 'vitest';
+import { Provider } from 'react-redux';
+import { describe, expect, it, vi } from 'vitest';
+import { threadApi } from '../../../services/api/threadApi';
import { AssistantUiRuntimeProvider } from '../../../providers/AssistantUiRuntimeProvider';
+import chatRuntimeReducer from '../../../store/chatRuntimeSlice';
+import threadReducer from '../../../store/threadSlice';
import { AgentRunningStatus } from './AgentRunningStatus';
+vi.mock('../../../services/api/threadApi', () => ({
+ threadApi: {
+ getDerivedTranscript: vi
+ .fn()
+ .mockResolvedValue({ threadId: 't-status', items: [], total: 0, hasMore: false, hasTranscript: false }),
+ },
+}));
+void threadApi;
+
+const THREAD_ID = 't-status';
+
+function buildStore() {
+ return configureStore({
+ reducer: combineReducers({ thread: threadReducer, chatRuntime: chatRuntimeReducer }),
+ preloadedState: {
+ thread: {
+ threads: [],
+ selectedThreadId: THREAD_ID,
+ activeThreadIds: {},
+ welcomeThreadId: null,
+ messagesByThreadId: { [THREAD_ID]: [] },
+ messages: [],
+ isLoadingThreads: false,
+ isLoadingMessages: false,
+ messagesError: null,
+ },
+ } as never,
+ });
+}
+
describe('AgentRunningStatus', () => {
it('falls back to the thinking indicator when assistant-ui has no tasks', () => {
render(
- <AssistantUiRuntimeProvider>
- <AgentRunningStatus />
- </AssistantUiRuntimeProvider>
+ <Provider store={buildStore()}>
+ <AssistantUiRuntimeProvider>
+ <AgentRunningStatus />
+ </AssistantUiRuntimeProvider>
+ </Provider>
);
expect(screen.getByTestId('agent-running-status-thinking')).toBeInTheDocument();
diff --git a/crates/openhuman-core/src/channels/runtime/startup/start_channels.rs b/crates/openhuman-core/src/channels/runtime/startup/start_channels.rs
index 471db5a5ed..47476b0137 100644
--- a/crates/openhuman-core/src/channels/runtime/startup/start_channels.rs
+++ b/crates/openhuman-core/src/channels/runtime/startup/start_channels.rs
@@ -85,6 +85,11 @@ async fn start_channels_inner(mut config: Config) -> Result<()> {
// `queue_item_queued`/`queue_item_delivered` web-channel events so the
// desktop goal chip, todo drawer, and message-queue UI stay live (C3).
crate::web_chat::register_agent_surface_subscriber();
+ // Surface memory store/recall activity (MemoryStored/MemoryRecalled) as
+ // `memory_activity` web-channel events, routed to the turn's own
+ // thread/client only (C5) — never carries memory content or the raw
+ // recall query, only a short clipped preview.
+ crate::web_chat::register_memory_activity_surface_subscriber();
// Spawn the per-toolkit provider periodic sync scheduler. This is
// a thin tokio task that ticks every minute and dispatches into
// any provider whose `sync_interval_secs` has elapsed for an