Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript

test: update chat route assertions for bounded history

Josué52d98cbd22a2
diff --git a/desktop-app/package-lock.json b/desktop-app/package-lock.json
index d554b86d2..fe3f9cad0 100644
--- a/desktop-app/package-lock.json
+++ b/desktop-app/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "evenfire",
- "version": "0.1.334",
+ "version": "0.1.335",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "evenfire",
- "version": "0.1.334",
+ "version": "0.1.335",
"license": "MPL-2.0",
"dependencies": {
"@tanstack/react-query": "5.100.10",
diff --git a/desktop-app/package.json b/desktop-app/package.json
index afbf6e5ee..469f173e4 100644
--- a/desktop-app/package.json
+++ b/desktop-app/package.json
@@ -1,7 +1,7 @@
{
"name": "evenfire",
"productName": "Evenfire",
- "version": "0.1.334",
+ "version": "0.1.335",
"private": true,
"license": "MPL-2.0",
"description": "Evenfire desktop client for secure agent and workflow access",
diff --git a/desktop-app/ui/src/hooks/domain/__tests__/chatSelectionAcrossRouteChange.test.tsx b/desktop-app/ui/src/hooks/domain/__tests__/chatSelectionAcrossRouteChange.test.tsx
index e6bf35a00..ba9c5be89 100644
--- a/desktop-app/ui/src/hooks/domain/__tests__/chatSelectionAcrossRouteChange.test.tsx
+++ b/desktop-app/ui/src/hooks/domain/__tests__/chatSelectionAcrossRouteChange.test.tsx
@@ -143,14 +143,22 @@ describe('selecting a chat session across a route change', () => {
})
await waitFor(() =>
- expect(clerum.rpc.loadSessionMessages).toHaveBeenCalledWith('agent-x', 'agent-x', 'c-old')
+ expect(clerum.rpc.loadSessionMessages).toHaveBeenCalledWith(
+ 'agent-x',
+ 'agent-x',
+ 'c-old',
+ undefined,
+ { limit: 80 }
+ )
)
expect(result.current.activeChatId).toBe('c-old')
// It must not fall back to the most recently updated chat.
expect(clerum.rpc.loadSessionMessages).not.toHaveBeenCalledWith(
'agent-x',
'agent-x',
- 'c-newest'
+ 'c-newest',
+ undefined,
+ { limit: 80 }
)
})
@@ -169,7 +177,13 @@ describe('selecting a chat session across a route change', () => {
await waitFor(() => expect(result.current.chatMessagesLoading).toBe(false))
expect(result.current.activeChatId).toBe('c-old')
- expect(clerum.rpc.loadSessionMessages).toHaveBeenCalledWith('agent-x', 'agent-x', 'c-old')
+ expect(clerum.rpc.loadSessionMessages).toHaveBeenCalledWith(
+ 'agent-x',
+ 'agent-x',
+ 'c-old',
+ undefined,
+ { limit: 80 }
+ )
})
it('notification -> session from another route opens the notified chat', async () => {
@@ -194,13 +208,21 @@ describe('selecting a chat session across a route change', () => {
expect(result.current.activeChatId).toBe('c-old')
await waitFor(() =>
- expect(clerum.rpc.loadSessionMessages).toHaveBeenCalledWith('agent-x', 'agent-x', 'c-old')
+ expect(clerum.rpc.loadSessionMessages).toHaveBeenCalledWith(
+ 'agent-x',
+ 'agent-x',
+ 'c-old',
+ undefined,
+ { limit: 80 }
+ )
)
expect(result.current.activeChatId).toBe('c-old')
expect(clerum.rpc.loadSessionMessages).not.toHaveBeenCalledWith(
'agent-x',
'agent-x',
- 'c-newest'
+ 'c-newest',
+ undefined,
+ { limit: 80 }
)
})
@@ -339,7 +361,13 @@ describe('chat-route guard on the real selection entry points', () => {
)
await waitFor(
() =>
- expect(clerum.rpc.loadSessionMessages).toHaveBeenCalledWith('agent-x', 'agent-x', 'c-old'),
+ expect(clerum.rpc.loadSessionMessages).toHaveBeenCalledWith(
+ 'agent-x',
+ 'agent-x',
+ 'c-old',
+ undefined,
+ { limit: 80 }
+ ),
SLOW
)
expect(result.current.activeChatId).toBe('c-old')
@@ -377,7 +405,13 @@ describe('chat-route guard on the real selection entry points', () => {
await waitFor(
() =>
- expect(clerum.rpc.loadSessionMessages).toHaveBeenCalledWith('agent-x', 'agent-x', 'c-old'),
+ expect(clerum.rpc.loadSessionMessages).toHaveBeenCalledWith(
+ 'agent-x',
+ 'agent-x',
+ 'c-old',
+ undefined,
+ { limit: 80 }
+ ),
SLOW
)
expect(result.current.activeChatId).toBe('c-old')
@@ -432,7 +466,13 @@ describe('chat-route guard on the real selection entry points', () => {
)
await waitFor(
() =>
- expect(clerum.rpc.loadSessionMessages).toHaveBeenCalledWith('agent-x', 'agent-x', 'c-old'),
+ expect(clerum.rpc.loadSessionMessages).toHaveBeenCalledWith(
+ 'agent-x',
+ 'agent-x',
+ 'c-old',
+ undefined,
+ { limit: 80 }
+ ),
SLOW
)
expect(result.current.activeChatId).toBe('c-old')