Skip to content

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

TypeScript

test(control-ui): restore the no-polling / single-refetch guard on the attention banner (R2-L2)

Diego Zacarias58906ce4c37f
diff --git a/control-ui/components/__tests__/LlmModelsCatalogAttention.test.tsx b/control-ui/components/__tests__/LlmModelsCatalogAttention.test.tsx
index 66ceb0bb2..7e53394a3 100644
--- a/control-ui/components/__tests__/LlmModelsCatalogAttention.test.tsx
+++ b/control-ui/components/__tests__/LlmModelsCatalogAttention.test.tsx
@@ -277,6 +277,10 @@ describe('delete impact gate (409 model_in_use → force)', () => {
// The stale item is visible in the banner before any mutation.
expect(await screen.findByText('GPT-5 Mini')).toBeInTheDocument()
+ // Exactly one feed fetch on mount — the banner re-fetches on demand only, so
+ // no polling and no double-fetch (a mount-effect regression the observable
+ // assertion below would not catch on its own).
+ expect(vi.mocked(getAdminAttention)).toHaveBeenCalledTimes(1)
fireEvent.click(screen.getByRole('button', { name: 'Delete claude-haiku-4-5' }))
fireEvent.click(await screen.findByRole('button', { name: 'Delete' }))
@@ -286,5 +290,8 @@ describe('delete impact gate (409 model_in_use → force)', () => {
await waitFor(() => {
expect(screen.queryByText('GPT-5 Mini')).not.toBeInTheDocument()
})
+ // Exactly one additional fetch for the post-mutation refresh — one bump per
+ // mutation, not a polling loop.
+ expect(vi.mocked(getAdminAttention)).toHaveBeenCalledTimes(2)
})
})
diff --git a/control-ui/package-lock.json b/control-ui/package-lock.json
index 51480167a..b41ff749a 100644
--- a/control-ui/package-lock.json
+++ b/control-ui/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "clerum-control-ui",
- "version": "0.1.424",
+ "version": "0.1.425",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-control-ui",
- "version": "0.1.424",
+ "version": "0.1.425",
"dependencies": {
"@clerum/llm-providers": "file:../packages/llm-providers",
"@clerum/workflow-recipe-capability-policy": "file:../packages/workflow-recipe-capability-policy",
diff --git a/control-ui/package.json b/control-ui/package.json
index 180be428b..c1c2cd362 100644
--- a/control-ui/package.json
+++ b/control-ui/package.json
@@ -1,6 +1,6 @@
{
"name": "clerum-control-ui",
- "version": "0.1.424",
+ "version": "0.1.425",
"private": true,
"scripts": {
"dev": "NEXT_IGNORE_INCORRECT_LOCKFILE=1 next dev",