Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
fix: minor improvements to desktop app and comntrol-ui
Miguelon Peluchonc462c8aec641
diff --git a/control-ui/app/globals.css b/control-ui/app/globals.cssindex 66a0029da..c0344abe0 100644--- a/control-ui/app/globals.css+++ b/control-ui/app/globals.css@@ -5357,10 +5357,17 @@ textarea.cu-input {.cu-agent-radio-group {display: grid;+ grid-template-columns: repeat(2, minmax(0, 1fr));gap: 0.55rem;width: min(36rem, 100%);}+@media (max-width: 640px) {+ .cu-agent-radio-group {+ grid-template-columns: minmax(0, 1fr);+ }+}+.cu-agent-radio--card {align-items: flex-start;padding: 0.75rem 0.85rem;diff --git a/control-ui/next-env.d.ts b/control-ui/next-env.d.tsindex c4b7818fb..9edff1c7c 100644--- a/control-ui/next-env.d.ts+++ b/control-ui/next-env.d.ts@@ -1,6 +1,6 @@/// <reference types="next" />/// <reference types="next/image-types/global" />-import "./.next/dev/types/routes.d.ts";+import "./.next/types/routes.d.ts";// NOTE: This file should not be edited// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.diff --git a/control-ui/package-lock.json b/control-ui/package-lock.jsonindex 9c97858f2..ebdcfde2b 100644--- a/control-ui/package-lock.json+++ b/control-ui/package-lock.json@@ -1,12 +1,12 @@{"name": "clerum-control-ui",- "version": "0.1.344",+ "version": "0.1.345","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "clerum-control-ui",- "version": "0.1.344",+ "version": "0.1.345","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.jsonindex 925194420..d2e7b9c55 100644--- a/control-ui/package.json+++ b/control-ui/package.json@@ -1,6 +1,6 @@{"name": "clerum-control-ui",- "version": "0.1.344",+ "version": "0.1.345","private": true,"scripts": {"dev": "NEXT_IGNORE_INCORRECT_LOCKFILE=1 next dev",diff --git a/desktop-app/169 b/desktop-app/169new file mode 100644index 000000000..e69de29bbdiff --git a/desktop-app/NEXT_IGNORE_INCORRECT_LOCKFILE=1 b/desktop-app/NEXT_IGNORE_INCORRECT_LOCKFILE=1new file mode 100644index 000000000..e69de29bbdiff --git a/desktop-app/[email protected] b/desktop-app/[email protected]new file mode 100644index 000000000..e69de29bbdiff --git a/desktop-app/package-lock.json b/desktop-app/package-lock.jsonindex 871deded7..f5fad84ae 100644--- a/desktop-app/package-lock.json+++ b/desktop-app/package-lock.json@@ -1,12 +1,12 @@{"name": "evenfire",- "version": "0.1.312",+ "version": "0.1.313","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "evenfire",- "version": "0.1.312",+ "version": "0.1.313","license": "MPL-2.0","dependencies": {"@tanstack/react-query": "5.100.10",diff --git a/desktop-app/package.json b/desktop-app/package.jsonindex 71b857979..ba540b0c3 100644--- a/desktop-app/package.json+++ b/desktop-app/package.json@@ -1,7 +1,7 @@{"name": "evenfire","productName": "Evenfire",- "version": "0.1.312",+ "version": "0.1.313","private": true,"license": "MPL-2.0","description": "Evenfire desktop client for secure agent and workflow access",diff --git a/desktop-app/ui/src/components/AppHeader/__tests__/notifications.test.tsx b/desktop-app/ui/src/components/AppHeader/__tests__/notifications.test.tsxindex b9a81d95c..e288aab36 100644--- a/desktop-app/ui/src/components/AppHeader/__tests__/notifications.test.tsx+++ b/desktop-app/ui/src/components/AppHeader/__tests__/notifications.test.tsx@@ -7,6 +7,16 @@ import { AppHeader } from '../index'const notificationMocks = vi.hoisted(() => ({clear: vi.fn(),markRead: vi.fn(),+ notifications: [] as Array<{+ id: string+ kind: 'assistant_reply'+ agentName: string+ text: string+ timestamp: number+ read: boolean+ }>,+ open: vi.fn(),+ remove: vi.fn(),refresh: vi.fn(async () => undefined),}))@@ -45,7 +55,7 @@ vi.mock('@contexts/NavigationContext', () => ({vi.mock('@contexts/NotificationsContext', () => ({useNotificationsContext: () => ({- notifications: [],+ notifications: notificationMocks.notifications,unreadNotificationCount: 0,notificationActionById: {},pendingApprovals: [],@@ -53,8 +63,8 @@ vi.mock('@contexts/NotificationsContext', () => ({pendingApprovalActionId: null,markNotificationsRead: notificationMocks.markRead,clearNotifications: notificationMocks.clear,- removeNotification: vi.fn(),- handleOpenNotification: vi.fn(),+ removeNotification: notificationMocks.remove,+ handleOpenNotification: notificationMocks.open,handleApproveNotification: vi.fn(),handleDenyNotification: vi.fn(),handleRefreshPendingApprovals: notificationMocks.refresh,@@ -67,9 +77,50 @@ vi.mock('@hooks/useClickOutside', () => ({ useClickOutside: vi.fn() }))describe('AppHeader notification tray presentation', () => {afterEach(() => {cleanup()+ notificationMocks.notifications.length = 0vi.clearAllMocks()})+ it('opens a notification when its card surface is clicked', () => {+ const notification = {+ id: 'notification-1',+ kind: 'assistant_reply' as const,+ agentName: 'Research agent',+ text: 'Your answer is ready.',+ timestamp: Date.now(),+ read: true,+ }+ notificationMocks.notifications.push(notification)++ render(<AppHeader />)+ fireEvent.click(screen.getByRole('button', { name: 'Notifications and approvals' }))+ expect(screen.getByText('Inbox (1)')).toBeTruthy()+ expect(screen.queryByText('1 item')).toBeNull()+ fireEvent.click(screen.getByTestId('notification-menu-item'))++ expect(notificationMocks.open).toHaveBeenCalledWith(notification)+ expect(screen.queryByRole('dialog', { name: 'Notifications and approvals' })).toBeNull()+ })++ it('does not open a notification when its delete button is clicked', () => {+ const notification = {+ id: 'notification-1',+ kind: 'assistant_reply' as const,+ agentName: 'Research agent',+ text: 'Your answer is ready.',+ timestamp: Date.now(),+ read: true,+ }+ notificationMocks.notifications.push(notification)++ render(<AppHeader />)+ fireEvent.click(screen.getByRole('button', { name: 'Notifications and approvals' }))+ fireEvent.click(screen.getByRole('button', { name: 'Delete notification' }))++ expect(notificationMocks.remove).toHaveBeenCalledWith(notification.id)+ expect(notificationMocks.open).not.toHaveBeenCalled()+ })+it('waits for embedded app bounds before showing the drawer', async () => {const onShellOverlayOpenChange = vi.fn()const onNotificationTrayOpenChange = vi.fn()diff --git a/desktop-app/ui/src/components/AppHeader/index.tsx b/desktop-app/ui/src/components/AppHeader/index.tsxindex 962013c6b..2109ef39b 100644--- a/desktop-app/ui/src/components/AppHeader/index.tsx+++ b/desktop-app/ui/src/components/AppHeader/index.tsx@@ -10,11 +10,7 @@ import { useContextsDataController } from '@hooks/domain/useContextsDataControllimport { useMcpServersDataController } from '@hooks/domain/useMcpServersDataController'import { useTeamsDataController } from '@hooks/domain/useTeamsDataController'import { useClickOutside } from '@hooks/useClickOutside'-import {- notificationInboxDescription,- notificationKindLabel,- notificationPreviewText,-} from '@/lib/notifications'+import { notificationKindLabel, notificationPreviewText } from '@/lib/notifications'import type { AppNotificationKind } from '@/uiTypes'import type {AppHeaderProps,@@ -196,6 +192,25 @@ export const AppHeader = React.memo(function AppHeader({return `${Math.floor(elapsedMs / 86_400_000)}d ago`}+ const openNotification = (notification: (typeof notifications)[number]) => {+ setNotificationsOpen(false)+ void onOpenNotification(notification)+ }++ const handleNotificationCardClick = (+ event: React.MouseEvent<HTMLDivElement>,+ notification: (typeof notifications)[number]+ ) => {+ if (notification.kind === 'approval_required') return++ const target = event.target as Element+ if (target.closest('button, a, input, select, textarea, [role="button"], [role="link"]')) {+ return+ }++ openNotification(notification)+ }+const selectedTeamMembers = useMemo<SearchMemberResult[]>(() => {return teamMembers.map(member => ({key: `${currentTeamId}:${member.id}`,@@ -448,7 +463,6 @@ export const AppHeader = React.memo(function AppHeader({const pendingApprovalsCount = pendingApprovals.lengthconst inboxNotificationCount = notifications.lengthconst totalAttentionCount = pendingApprovalsCount + unreadNotificationCount- const totalInboxCount = pendingApprovalsCount + inboxNotificationCountconst notificationButtonLabel =totalAttentionCount === 0? 'Inbox'@@ -719,34 +733,6 @@ export const AppHeader = React.memo(function AppHeader({role="dialog"aria-label="Notifications and approvals">- <div className="notification-menu-header">- <div className="notification-menu-title-row">- <strong>- {totalInboxCount} item{totalInboxCount === 1 ? '' : 's'}- </strong>- <span className="notification-menu-section-meta">- {notificationInboxDescription(- pendingApprovalsCount > 0,- inboxNotificationCount > 0- )}- </span>- {pendingApprovalsLoading && (- <span className="notification-inline-spinner" aria-label="Refreshing inbox" />- )}- </div>- <div className="notification-menu-header-actions">- <Button- className="notification-clear-btn"- color="neutral"- onClick={onClearNotifications}- disabled={!notifications.length}- size="sm"- variant="soft"- >- Clear- </Button>- </div>- </div><div className="notification-menu-body">{pendingApprovalsCount > 0 && (<section className="notification-menu-section">@@ -858,18 +844,40 @@ export const AppHeader = React.memo(function AppHeader({<section className="notification-menu-section"><div className="notification-menu-section-header"><div className="notification-menu-section-heading">- <strong>Inbox</strong>+ <div className="notification-menu-title-row">+ <strong>Inbox ({inboxNotificationCount})</strong>+ {pendingApprovalsLoading && (+ <span+ className="notification-inline-spinner"+ aria-label="Refreshing inbox"+ />+ )}+ </div><span className="notification-menu-section-meta">Updates from agents, workflows, and plugins.</span></div>+ <div className="notification-menu-header-actions">+ <Button+ className="notification-clear-btn"+ color="neutral"+ onClick={onClearNotifications}+ size="sm"+ variant="soft"+ >+ Clear+ </Button>+ </div></div><div className="notification-menu-list">{notifications.map(notification => (<divkey={notification.id}data-testid="notification-menu-item"- className={`notification-menu-item${notification.read ? '' : ' unread'}`}+ className={`notification-menu-item${+ notification.kind === 'approval_required' ? '' : ' is-clickable'+ }${notification.read ? '' : ' unread'}`}+ onClick={event => handleNotificationCardClick(event, notification)}><div className="notification-menu-item-header"><p className="notification-menu-agent">{notification.agentName}</p>@@ -919,10 +927,7 @@ export const AppHeader = React.memo(function AppHeader({<ButtonclassName="notification-open-btn"color="primary"- onClick={() => {- setNotificationsOpen(false)- void onOpenNotification(notification)- }}+ onClick={() => openNotification(notification)}size="xs"variant="soft">diff --git a/desktop-app/ui/src/pages/SettingsPage.tsx b/desktop-app/ui/src/pages/SettingsPage.tsxindex 3344b67ab..f844f2166 100644--- a/desktop-app/ui/src/pages/SettingsPage.tsx+++ b/desktop-app/ui/src/pages/SettingsPage.tsx@@ -570,23 +570,6 @@ export function SettingsPage({<p className="muted">Manage your Evenfire account details in Profile UI.</p></div></div>- <div className="settings-actions">- <Button- type="button"- color="neutral"- onClick={() =>- void handleOpenProfileSettings({ section: 'profile', action: 'password' })- }- >- Update password- </Button>- <Button- type="button"- onClick={() => void handleOpenProfileSettings({ section: 'profile' })}- >- Edit- </Button>- </div></div><div className="settings-form settings-account-summary"><div className="settings-readonly-row">@@ -598,6 +581,23 @@ export function SettingsPage({<span>{me?.email || email || 'No email'}</span></div></div>+ <div className="settings-actions settings-account-actions">+ <Button+ type="button"+ color="neutral"+ onClick={() =>+ void handleOpenProfileSettings({ section: 'profile', action: 'password' })+ }+ >+ Update password+ </Button>+ <Button+ type="button"+ onClick={() => void handleOpenProfileSettings({ section: 'profile' })}+ >+ Edit+ </Button>+ </div></section></section>) : null}diff --git a/desktop-app/ui/src/styles.css b/desktop-app/ui/src/styles.cssindex fc45c01d7..d6ea910c6 100644--- a/desktop-app/ui/src/styles.css+++ b/desktop-app/ui/src/styles.css@@ -421,7 +421,7 @@ h3 {max-height: min(70vh, 560px);overflow: hidden;display: grid;- grid-template-rows: auto minmax(0, 1fr);+ grid-template-rows: minmax(0, 1fr);gap: 0;border: 1px solid rgba(var(--edge-rgb), 0.38);border-radius: var(--radius-lg);@@ -438,15 +438,6 @@ h3 {max-height: none;}-.notification-menu-header {- display: flex;- align-items: center;- justify-content: space-between;- gap: var(--space-1-5);- padding: var(--space-2) var(--space-2-5);- border-bottom: 1px solid rgba(var(--edge-rgb), 0.22);-}-.notification-menu-title-row {display: inline-flex;align-items: center;@@ -581,6 +572,18 @@ h3 {cursor: default;}+.notification-menu-item.is-clickable {+ cursor: pointer;+ transition:+ border-color 120ms ease,+ background-color 120ms ease;+}++.notification-menu-item.is-clickable:hover {+ border-color: rgba(var(--accent-rgb), 0.48);+ background: var(--surface-hover);+}+.notification-menu-item.unread {border-color: rgba(var(--accent-rgb), 0.42);background: var(--bg-elev-2);@@ -2500,6 +2503,11 @@ h3 {max-width: 520px;}+.settings-actions.settings-account-actions {+ max-width: 520px;+ justify-content: flex-start;+}+.settings-readonly-row {display: grid;grid-template-columns: minmax(140px, max-content) minmax(0, 1fr);