Skip to content

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

TypeScript

fix(control-ui): preserve wide llm discovery actions

Josué55620f68bee4
diff --git a/control-ui/app/globals.css b/control-ui/app/globals.css
index 2e3b39d5b..1ff1cf6bb 100644
--- a/control-ui/app/globals.css
+++ b/control-ui/app/globals.css
@@ -11151,9 +11151,6 @@ textarea.cu-input {
display: flex;
justify-content: flex-end;
gap: var(--cu-space-2);
- max-width: 3.5rem;
- min-width: 3rem;
- width: 3.5rem;
}
.cu-llm-model-table {
@@ -11671,9 +11668,6 @@ textarea.cu-input {
display: flex;
justify-content: flex-end;
gap: var(--cu-space-2);
- max-width: 3.5rem;
- min-width: 3rem;
- width: 3.5rem;
}
/* Scope editor (create/edit form) */
diff --git a/control-ui/components/__tests__/LlmDiscoveryPanel.test.tsx b/control-ui/components/__tests__/LlmDiscoveryPanel.test.tsx
index 397ca0f2a..0ca1099e5 100644
--- a/control-ui/components/__tests__/LlmDiscoveryPanel.test.tsx
+++ b/control-ui/components/__tests__/LlmDiscoveryPanel.test.tsx
@@ -1,6 +1,8 @@
import type { ReactNode } from 'react'
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
import { cleanup, fireEvent, render as rtlRender, screen, waitFor } from '@testing-library/react'
+import { readFileSync } from 'node:fs'
+import { resolve } from 'node:path'
import * as api from '../../lib/api'
import type { LlmAllowedModel } from '../../lib/api'
import { LlmDiscoveryPanel } from '../LlmDiscoveryPanel'
@@ -47,6 +49,13 @@ function render(children: ReactNode) {
return rtlRender(<ToastProvider>{children}</ToastProvider>)
}
+function cssRuleBody(selector: string) {
+ const css = readFileSync(resolve(__dirname, '../../app/globals.css'), 'utf8')
+ const escaped = selector.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
+ const match = css.match(new RegExp(`(?:^|\\n)${escaped}\\s*\\{([^}]*)\\}`, 'm'))
+ return match?.[1] ?? ''
+}
+
beforeEach(() => {
vi.mocked(api.getDiscoveryStatus).mockResolvedValue({
ranAt: '2026-07-29T12:00:00.000Z',
@@ -107,6 +116,23 @@ describe('LlmDiscoveryPanel merged lifecycle workflow', () => {
expect(onRefresh).toHaveBeenCalledTimes(1)
})
+ it('keeps the per-row enable action cell wide enough for its button', () => {
+ render(
+ <LlmDiscoveryPanel
+ items={[reviewModel]}
+ loading={false}
+ onRefresh={vi.fn().mockResolvedValue(undefined)}
+ />
+ )
+
+ const actionCell = screen.getByRole('button', { name: 'Enable' }).closest('td')
+ expect(actionCell).toHaveClass('cu-px-actions')
+ expect(actionCell).not.toHaveClass('cu-table__cell-actions')
+ expect(cssRuleBody('.cu-px-actions')).not.toMatch(/\b(?:max-width|min-width|width)\s*:/)
+ expect(cssRuleBody('.cu-tb-actions')).not.toMatch(/\b(?:max-width|min-width|width)\s*:/)
+ expect(cssRuleBody('.cu-table__cell-actions')).toMatch(/\bwidth:\s*3\.5rem\b/)
+ })
+
it('does not render a dedicated stale-model management section', () => {
render(
<LlmDiscoveryPanel
diff --git a/control-ui/package-lock.json b/control-ui/package-lock.json
index 113c65c13..4a0156754 100644
--- a/control-ui/package-lock.json
+++ b/control-ui/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "clerum-control-ui",
- "version": "0.1.535",
+ "version": "0.1.538",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-control-ui",
- "version": "0.1.535",
+ "version": "0.1.538",
"dependencies": {
"@clerum/display-field": "file:../packages/display-field",
"@clerum/frontend-components": "file:../packages/frontend-components",
diff --git a/control-ui/package.json b/control-ui/package.json
index 8d9fd8b8e..8e200ceab 100644
--- a/control-ui/package.json
+++ b/control-ui/package.json
@@ -1,6 +1,6 @@
{
"name": "clerum-control-ui",
- "version": "0.1.535",
+ "version": "0.1.538",
"private": true,
"scripts": {
"dev": "NEXT_IGNORE_INCORRECT_LOCKFILE=1 next dev",