Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
fix(control-ui): r2-m1 bypass clamping for interactive subtitles
Josué972380e4807a
diff --git a/control-ui/components/TablePanelHeader/index.tsx b/control-ui/components/TablePanelHeader/index.tsxindex 3f447d5f1..d21c8c72d 100644--- a/control-ui/components/TablePanelHeader/index.tsx+++ b/control-ui/components/TablePanelHeader/index.tsx@@ -15,6 +15,17 @@ function flattenTitleNodes(title: ReactNode): ReactNode[] {)}+function hasInteractiveDescendant(node: ReactNode): boolean {+ if (!isValidElement<{ children?: ReactNode }>(node)) return false+ if (+ typeof node.type === 'string' &&+ ['a', 'button', 'input', 'select', 'textarea'].includes(node.type)+ ) {+ return true+ }+ return Children.toArray(node.props.children).some(hasInteractiveDescendant)+}+/** Control UI compatibility adapter for the shared list header. */export function TablePanelHeader({actionsClassName,@@ -47,7 +58,15 @@ export function TablePanelHeader({) : undefined}className="cu-table-panel__head"- description={subtitle ? <ClampedDescription>{subtitle}</ClampedDescription> : undefined}+ description={+ subtitle ? (+ hasInteractiveDescendant(subtitle) ? (+ subtitle+ ) : (+ <ClampedDescription>{subtitle}</ClampedDescription>+ )+ ) : undefined+ }title={<span className="cu-panel-title cu-table-panel__title-row">{titleIcon ? <span className="cu-table-panel__title-icon">{titleIcon}</span> : null}diff --git a/control-ui/components/__tests__/TablePanelHeader.test.tsx b/control-ui/components/__tests__/TablePanelHeader.test.tsxindex 45bcdf983..813e9c4d9 100644--- a/control-ui/components/__tests__/TablePanelHeader.test.tsx+++ b/control-ui/components/__tests__/TablePanelHeader.test.tsx@@ -54,6 +54,22 @@ describe('TablePanelHeader', () => {expect(document.querySelector('.cu-table-panel__title-icon')).toBeNull()})+ it('leaves interactive subtitle content unclamped and directly focusable', () => {+ render(+ <TablePanelHeader+ subtitle={+ <>+ Read the <a href="/api-keys">API Keys</a> guide.+ </>+ }+ title="Images"+ />+ )++ expect(screen.getByRole('link', { name: 'API Keys' })).toBeVisible()+ expect(document.querySelector('.cu-table-panel__description')).toBeNull()+ })+it('renders secondary actions, search, refresh, and the primary action in focus order', () => {render(<TablePanelHeaderdiff --git a/control-ui/package-lock.json b/control-ui/package-lock.jsonindex aa6fe2991..5340e6d03 100644--- a/control-ui/package-lock.json+++ b/control-ui/package-lock.json@@ -1,12 +1,12 @@{"name": "clerum-control-ui",- "version": "0.1.592",+ "version": "0.1.593","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "clerum-control-ui",- "version": "0.1.592",+ "version": "0.1.593","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 a2f38f71b..7174bcbb0 100644--- a/control-ui/package.json+++ b/control-ui/package.json@@ -1,6 +1,6 @@{"name": "clerum-control-ui",- "version": "0.1.592",+ "version": "0.1.593","private": true,"scripts": {"dev": "NEXT_IGNORE_INCORRECT_LOCKFILE=1 next dev",