Skip to content

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

TypeScript

fix(control-ui): restore route loading feedback

Josué072dd5374acb
diff --git a/control-ui/app/loading.tsx b/control-ui/app/loading.tsx
new file mode 100644
index 000000000..22b1dd0b6
--- /dev/null
+++ b/control-ui/app/loading.tsx
@@ -0,0 +1,11 @@
+import { SectionLoadingSkeleton } from '@components/SectionLoadingSkeleton'
+
+export default function Loading() {
+ return (
+ <section className="cu-card">
+ <div className="cu-card__body">
+ <SectionLoadingSkeleton label="Loading Control UI section" rows={4} />
+ </div>
+ </section>
+ )
+}
diff --git a/control-ui/components/__tests__/RouteLoading.test.tsx b/control-ui/components/__tests__/RouteLoading.test.tsx
new file mode 100644
index 000000000..55bbc105b
--- /dev/null
+++ b/control-ui/components/__tests__/RouteLoading.test.tsx
@@ -0,0 +1,20 @@
+import { describe, expect, it } from 'vitest'
+import '@testing-library/jest-dom/vitest'
+import { render, screen } from '@testing-library/react'
+import Loading from '../../app/loading'
+
+describe('Control UI root loading boundary', () => {
+ it('renders an accessible body skeleton without replacing the persistent shell', () => {
+ const view = render(<Loading />)
+
+ expect(screen.getByRole('status', { name: /loading control ui section/i })).toHaveAttribute(
+ 'aria-busy',
+ 'true'
+ )
+ expect(view.container.querySelector('.cu-section-loading-skeleton')).toBeInTheDocument()
+ expect(view.container.querySelectorAll('.cu-section-loading-skeleton__row')).toHaveLength(4)
+ expect(view.container.querySelector('main')).not.toBeInTheDocument()
+ expect(view.container.querySelector('.cu-app--auth')).not.toBeInTheDocument()
+ expect(view.container.querySelector('.cu-loading-screen')).not.toBeInTheDocument()
+ })
+})
diff --git a/control-ui/package-lock.json b/control-ui/package-lock.json
index dab1ec250..b7f470314 100644
--- a/control-ui/package-lock.json
+++ b/control-ui/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "clerum-control-ui",
- "version": "0.1.381",
+ "version": "0.1.382",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-control-ui",
- "version": "0.1.381",
+ "version": "0.1.382",
"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 ea18ac732..0a9dd53ed 100644
--- a/control-ui/package.json
+++ b/control-ui/package.json
@@ -1,6 +1,6 @@
{
"name": "clerum-control-ui",
- "version": "0.1.381",
+ "version": "0.1.382",
"private": true,
"scripts": {
"dev": "NEXT_IGNORE_INCORRECT_LOCKFILE=1 next dev",