Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
fix(desktop-app): r8-l20 omit user stream cursor
Josué049548a98c0b
diff --git a/desktop-app/src/__tests__/authClient.entityChanges.test.ts b/desktop-app/src/__tests__/authClient.entityChanges.test.tsindex 4694a0bcb..52d595f08 100644--- a/desktop-app/src/__tests__/authClient.entityChanges.test.ts+++ b/desktop-app/src/__tests__/authClient.entityChanges.test.ts@@ -37,7 +37,7 @@ describe('AuthClient.openEntityChangeStream', () => {const events: Array<Record<string, unknown>> = []await new AuthClient().openEntityChangeStream('session-token',- null,+ CURSOR,event => events.push(event as unknown as Record<string, unknown>),new AbortController().signal)@@ -53,6 +53,8 @@ describe('AuthClient.openEntityChangeStream', () => {headers: expect.objectContaining({ authorization: 'Bearer session-token' }),}))+ const requestedUrl = new URL(String(vi.mocked(fetch).mock.calls[0]?.[0]))+ expect(requestedUrl.searchParams.has('cursor')).toBe(false)})it('rejects an unsupported schema without converting it into a destructive resync', async () => {diff --git a/desktop-app/src/authClient.ts b/desktop-app/src/authClient.tsindex 3bab266ff..57474de63 100644--- a/desktop-app/src/authClient.ts+++ b/desktop-app/src/authClient.ts@@ -564,12 +564,14 @@ export class AuthClient {async openEntityChangeStream(sessionToken: string,- cursor: string | null,+ _cursor: string | null,onEvent: (event: EntityChangeStreamEvent) => void,signal: AbortSignal): Promise<void> {const streamUrl = new URL(url('/api/v1/entity-changes/stream'))- if (cursor) streamUrl.searchParams.set('cursor', cursor)+ // The user stream intentionally starts from a fixed coarse invalidation+ // checkpoint. Sending the local cursor would disclose feed position while+ // the server correctly ignores it to prevent hidden-change timing leaks.const response = await fetch(streamUrl, {method: 'GET',headers: {