Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
fix(control-ui): widen context descriptions
Josué5969f8985f1c
diff --git a/control-ui/components/ContextTable.tsx b/control-ui/components/ContextTable.tsxindex c74e5bb49..b4b21d38e 100644--- a/control-ui/components/ContextTable.tsx+++ b/control-ui/components/ContextTable.tsx@@ -1,7 +1,13 @@'use client'import React, { useMemo, useState } from 'react'-import { DataTable, TableRow, TableStateRow, useTableSort } from '@clerum/frontend-components'+import {+ DataTable,+ TableRow,+ TableStateRow,+ TruncatedText,+ useTableSort,+} from '@clerum/frontend-components'import { ContextResource } from '../lib/api'import { RowActionsMenu } from './RowActionsMenu'import { SectionSearchInput } from './SectionSearchInput'@@ -15,8 +21,7 @@ type ContextRef = { name: string }const CONTEXT_COLUMNS: TableHeaderColumn[] = [{ key: 'name', label: 'Name' },- { key: 'identifier', label: 'Identifier' },- { key: 'description', label: 'Description' },+ { key: 'description', label: 'Description', minWidth: '20rem' },{ key: 'servers', label: 'Connectors', width: '7rem' },{ key: 'actions', label: 'Actions', width: '8rem', align: 'right' },]@@ -71,13 +76,12 @@ export function ContextTable({}, [normalizedSearch, rows])const contextSort = useTableSort<(typeof filteredRows)[number],- 'name' | 'identifier' | 'description' | 'servers'+ 'name' | 'description' | 'servers'>({rows: filteredRows,defaultKey: 'name',accessors: {name: row => row.displayName,- identifier: row => row.name,description: row => String(row.item.spec?.description || ''),servers: row => row.mcpServers.length,},@@ -88,8 +92,7 @@ export function ContextTable({...(column.key !== 'actions'? {activeDirection: contextSort.key === column.key ? contextSort.direction : null,- onSort: () =>- contextSort.sortBy(column.key as 'name' | 'identifier' | 'description' | 'servers'),+ onSort: () => contextSort.sortBy(column.key as 'name' | 'description' | 'servers'),}: {}),}))@@ -168,10 +171,10 @@ export function ContextTable({><td><span className="cu-table__cell-name">{displayName}</span>+ <span className="cu-table__cell-subtle">{name}</span></td>- <td className="cu-table__cell-subtle">{name}</td>- <td className="cu-registry-description" title={item.spec?.description || '—'}>- {item.spec?.description || '—'}+ <td className="cu-registry-description">+ <TruncatedText value={item.spec?.description} /></td><td style={{ color: 'var(--cu-text-muted)', fontVariantNumeric: 'tabular-nums' }}>{mcpServers.length}diff --git a/control-ui/components/__tests__/ContextTable.test.tsx b/control-ui/components/__tests__/ContextTable.test.tsxindex 4d0dad440..2f4db8d3d 100644--- a/control-ui/components/__tests__/ContextTable.test.tsx+++ b/control-ui/components/__tests__/ContextTable.test.tsx@@ -36,7 +36,7 @@ describe('ContextTable', () => {expect(onView).toHaveBeenCalledWith({ name: 'business' })})- it('stacks a non-link context name and its description in one cell', () => {+ it('keeps context identity in the Name column and uses Description as its own column', () => {const { container } = render(<ContextTableitems={contexts}@@ -51,8 +51,10 @@ describe('ContextTable', () => {)expect(screen.getAllByText('business')[0]).toHaveClass('cu-table__cell-name')- expect(screen.getByText('Business context')).toHaveClass('cu-registry-description')- expect(container.querySelectorAll('thead th')).toHaveLength(5)+ expect(screen.queryByRole('columnheader', { name: 'Identifier' })).not.toBeInTheDocument()+ expect(screen.getByRole('columnheader', { name: 'Description' })).toBeInTheDocument()+ expect(screen.getByText('Business context')).toHaveClass('eft-truncated-text__value')+ expect(container.querySelectorAll('thead th')).toHaveLength(4)expect(screen.queryByRole('button', { name: 'business' })).not.toBeInTheDocument()})diff --git a/control-ui/package-lock.json b/control-ui/package-lock.jsonindex 9bd07a350..a1e37e9fa 100644--- a/control-ui/package-lock.json+++ b/control-ui/package-lock.json@@ -1,12 +1,12 @@{"name": "clerum-control-ui",- "version": "0.1.515",+ "version": "0.1.516","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "clerum-control-ui",- "version": "0.1.515",+ "version": "0.1.516","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.jsonindex c743c232d..ee661c445 100644--- a/control-ui/package.json+++ b/control-ui/package.json@@ -1,6 +1,6 @@{"name": "clerum-control-ui",- "version": "0.1.515",+ "version": "0.1.516","private": true,"scripts": {"dev": "NEXT_IGNORE_INCORRECT_LOCKFILE=1 next dev",