Skip to content

The agent that grows with you

test(desktop): resumed-runtime submit binding answers prompt.submit with a canonical receipt

teknium17c6fc5b9c998
diff --git a/apps/desktop/src/app/session/hooks/use-prompt-actions/submit-view-binding.test.tsx b/apps/desktop/src/app/session/hooks/use-prompt-actions/submit-view-binding.test.tsx
index 99618264bb8..e7c66d93c63 100644
--- a/apps/desktop/src/app/session/hooks/use-prompt-actions/submit-view-binding.test.tsx
+++ b/apps/desktop/src/app/session/hooks/use-prompt-actions/submit-view-binding.test.tsx
@@ -105,9 +105,22 @@ async function mountOnStaleRuntime() {
setSelectedStoredSessionId(STORED)
setActiveSessionId(STALE_RUNTIME)
- const requestGateway = vi.fn(
- async (method: string) => (method === 'session.resume' ? { session_id: RESUMED_RUNTIME } : {}) as never
- )
+ // prompt.submit answers with a canonical admission receipt: the client keeps
+ // the optimistic bubble only for a receipt that echoes its submission id.
+ const requestGateway = vi.fn(async (method: string, params?: Record<string, unknown>) => {
+ if (method === 'session.resume') { return { session_id: RESUMED_RUNTIME } as never }
+
+ if (method === 'prompt.submit') {
+ return {
+ admission_id: params?.submission_id,
+ submission_id: params?.submission_id,
+ session_id: params?.session_id,
+ status: 'started'
+ } as never
+ }
+
+ return {} as never
+ })
let submit!: Submit
let cache!: Cache