Skip to content

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

TypeScript

feat(control-ui): move Marketplace below Contexts in the sidebar

Miguelon Peluchon37c6d35f06b4
diff --git a/control-ui/components/Sidebar/constants.tsx b/control-ui/components/Sidebar/constants.tsx
index 1903a7561..41fa0eee6 100644
--- a/control-ui/components/Sidebar/constants.tsx
+++ b/control-ui/components/Sidebar/constants.tsx
@@ -128,3 +128,19 @@ export const SIDEBAR_TABS: Record<SidebarTab, SidebarItem> = {
},
settings: { label: 'Settings', href: CONTROL_ROUTES.settings.ui, icon: <IconSettings /> },
}
+
+export const SIDEBAR_TAB_ORDER: SidebarTab[] = [
+ 'hosts',
+ 'contexts',
+ 'registry-catalog',
+ 'cost',
+ 'communication-channels',
+ 'directories',
+ 'mcp-servers',
+ 'workflow-recipes',
+ 'llm-models',
+ 'llm-secrets',
+ 'profile-admin',
+ 'traces',
+ 'settings',
+]
diff --git a/control-ui/components/Sidebar/index.tsx b/control-ui/components/Sidebar/index.tsx
index e7a3543cf..860e26e7f 100644
--- a/control-ui/components/Sidebar/index.tsx
+++ b/control-ui/components/Sidebar/index.tsx
@@ -7,7 +7,7 @@ import { usePathname } from 'next/navigation'
import packageJson from '../../package.json'
import { IconChevronRight } from '../icons'
import { activeSidebarChildHref } from './activeChild'
-import { SIDEBAR_TABS } from './constants'
+import { SIDEBAR_TABS, SIDEBAR_TAB_ORDER } from './constants'
import { IconLogout } from './icons'
import type { SidebarItem, SidebarProps, SidebarTab } from './types'
@@ -18,7 +18,7 @@ export function Sidebar({ currentTab, isOpen = false, onNavigate, onLogout }: Si
)
const entries = (Object.entries(SIDEBAR_TABS) as Array<[SidebarTab, SidebarItem]>)
.filter(([tabKey, item]) => !item.hidden && tabKey !== 'settings')
- .sort(([, first], [, second]) => first.label.localeCompare(second.label))
+ .sort(([a], [b]) => SIDEBAR_TAB_ORDER.indexOf(a) - SIDEBAR_TAB_ORDER.indexOf(b))
const settings = SIDEBAR_TABS.settings
function toggleGroup(tabKey: SidebarTab) {
diff --git a/control-ui/components/__tests__/Sidebar.test.tsx b/control-ui/components/__tests__/Sidebar.test.tsx
index e4376917a..423365202 100644
--- a/control-ui/components/__tests__/Sidebar.test.tsx
+++ b/control-ui/components/__tests__/Sidebar.test.tsx
@@ -50,7 +50,7 @@ describe('Sidebar publisher gating', () => {
expect(screen.getByRole('link', { name: /agents/i })).toBeInTheDocument()
})
- it('keeps Traces hidden and sorts visible navigation labels alphabetically', () => {
+ it('keeps Traces hidden and renders visible navigation in the defined order', () => {
vi.mocked(hook.usePublishScope).mockReturnValue(
publishScopeState({ scope: null, loading: false, error: false })
)
@@ -61,9 +61,19 @@ describe('Sidebar publisher gating', () => {
const labels = Array.from(nav.children).map(item =>
item.querySelector('.cu-sidebar__label')?.textContent?.trim()
)
- expect(labels).toEqual(
- [...labels].sort((first, second) => (first ?? '').localeCompare(second ?? ''))
- )
+ expect(labels).toEqual([
+ 'Agents',
+ 'Contexts',
+ 'Marketplace',
+ 'Cost & Usage',
+ 'External Channels',
+ 'Files',
+ 'Installed connectors',
+ 'Installed plugins',
+ 'LLM Models',
+ 'Secrets',
+ 'Users & Teams',
+ ])
})
it('keeps Settings in the footer on its canonical route', () => {
diff --git a/control-ui/package-lock.json b/control-ui/package-lock.json
index c32e3e6cd..b7e9ac144 100644
--- a/control-ui/package-lock.json
+++ b/control-ui/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "clerum-control-ui",
- "version": "0.1.407",
+ "version": "0.1.408",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-control-ui",
- "version": "0.1.407",
+ "version": "0.1.408",
"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 d0679198c..ada0c958f 100644
--- a/control-ui/package.json
+++ b/control-ui/package.json
@@ -1,6 +1,6 @@
{
"name": "clerum-control-ui",
- "version": "0.1.407",
+ "version": "0.1.408",
"private": true,
"scripts": {
"dev": "NEXT_IGNORE_INCORRECT_LOCKFILE=1 next dev",