Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
feat(desktop): polish chat landing and navigation
Miguelon Peluchon256db14fe3f2
diff --git a/desktop-app/ui/src/components/SidebarNav/index.tsx b/desktop-app/ui/src/components/SidebarNav/index.tsxindex 4828dbea5..f24c0b174 100644--- a/desktop-app/ui/src/components/SidebarNav/index.tsx+++ b/desktop-app/ui/src/components/SidebarNav/index.tsx@@ -579,7 +579,7 @@ export function SidebarNav({className="nav-link-main"onClick={() => handleSelect(DESKTOP_ROUTES.files)}aria-label="Files"- leadingIcon={<IconContexts />}+ leadingIcon={<IconAttachFile />}trailingIcon={<span className="nav-tooltip" role="tooltip">Filesdiff --git a/desktop-app/ui/src/components/__tests__/SidebarNav.test.tsx b/desktop-app/ui/src/components/__tests__/SidebarNav.test.tsxindex 4f936b008..8ced16e1b 100644--- a/desktop-app/ui/src/components/__tests__/SidebarNav.test.tsx+++ b/desktop-app/ui/src/components/__tests__/SidebarNav.test.tsx@@ -119,15 +119,16 @@ describe('SidebarNav logo', () => {expect(screen.getByTestId('nav-data-menu').textContent).not.toContain('Global File System')})- it('mounts the GFS solid-folder SVG inside the Files nav item so the icon is visible', () => {+ it('mounts the paperclip SVG used by Control UI Global File System', () => {const { container } = render(<SidebarNav {...baseProps()} />)const filesLink = container.querySelector('[data-testid="nav-files"]')const icon = filesLink?.querySelector('.ui-nav-item__icon svg')expect(icon).toBeTruthy()- expect(icon?.getAttribute('viewBox')).toBe('0 0 512 512')- // Solid Font Awesome fa-folder path data.+ expect(icon?.getAttribute('viewBox')).toBe('0 0 24 24')+ // Keep the Desktop Files item visually aligned with Control UI's+ // Global File System paperclip icon.expect(icon?.querySelector('path')?.getAttribute('d')).toContain(- 'M464 128H272l-64-64H48C21.49 64 0 85.49 0 112v288'+ 'm21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49')})diff --git a/desktop-app/ui/src/components/agents/AgentTitleSelector.tsx b/desktop-app/ui/src/components/agents/AgentTitleSelector.tsxindex 42c8040e3..41f90d335 100644--- a/desktop-app/ui/src/components/agents/AgentTitleSelector.tsx+++ b/desktop-app/ui/src/components/agents/AgentTitleSelector.tsx@@ -16,8 +16,7 @@ type AgentTitleSelectorProps = {selectedLabel: string}-// Agent selector for the greeting title row ("Welcome back … New chat with-// [agent ▾]"). Each row exposes TWO targets:+// Agent selector for the new-chat landing. Each row exposes TWO targets:// 1. the agent name button → selects the agent (starts/switches a chat)// 2. the 3-dots button → opens a sections sub-menu// (Details / Connectors / Contexts / Agent Files / Activity) thatdiff --git a/desktop-app/ui/src/components/agents/AgentWorkspace.tsx b/desktop-app/ui/src/components/agents/AgentWorkspace.tsxindex 97a61355e..325a6cc97 100644--- a/desktop-app/ui/src/components/agents/AgentWorkspace.tsx+++ b/desktop-app/ui/src/components/agents/AgentWorkspace.tsx@@ -186,7 +186,7 @@ export function AgentWorkspace({ mode = 'agents', scrollContainerRef }: AgentWor[])- // Agent selector dropdown for the greeting title row. Each row has two+ // Agent selector dropdown for the new-chat landing. Each row has two// targets: the agent NAME (click → start/switch a chat with that agent) and// the 3-dots (click → open a sections sub-menu: Details / Connectors /// Contexts / Agent Files / Activity, navigating into that agent's workspace@@ -545,13 +545,14 @@ export function AgentWorkspace({ mode = 'agents', scrollContainerRef }: AgentWor)}{isChatMode && !activeChatId && (- <>- <div className="agent-workspace-greeting-row">- <h2 className="agent-workspace-greeting">New chat with</h2>- {agentSwitcherLabel}+ <div className="agent-workspace-new-chat">+ <div className="agent-workspace-new-chat__intro">+ <h2 className="agent-workspace-new-chat__title">Start a conversation</h2>+ <p className="agent-workspace-new-chat__subtitle">Choose an agent to begin</p>+ <div className="agent-workspace-new-chat__selector">{agentSwitcherLabel}</div></div><ComposerPanel inline />- </>+ </div>)}{isChatMode && (<div className="chat-thread-container">diff --git a/desktop-app/ui/src/components/agents/__tests__/AgentWorkspace.displayName.test.tsx b/desktop-app/ui/src/components/agents/__tests__/AgentWorkspace.displayName.test.tsxindex 22c74094d..473235e98 100644--- a/desktop-app/ui/src/components/agents/__tests__/AgentWorkspace.displayName.test.tsx+++ b/desktop-app/ui/src/components/agents/__tests__/AgentWorkspace.displayName.test.tsx@@ -168,7 +168,7 @@ describe('AgentWorkspace hero + breadcrumb — visible agent name (R1-M3)', () =})})-// R1-M3 (class extension): the chat-mode title-row agent selector must also show+// R1-M3 (class extension): the chat-mode new-chat agent selector must also show// the DISPLAY name — both in the collapsed trigger (selectedLabel) and in each// dropdown option row (option.label). The identifier still drives selection// (selectedId / option.id), so switching remains keyed on the id.@@ -182,12 +182,23 @@ describe('AgentWorkspace title selector — visible agent name (R1-M3)', () => {vi.clearAllMocks()})+ it('renders the centered new-chat landing copy around the agent selector', () => {+ navMock.selectedAgent = 'alpha'+ agentsMock.agentNames = ['alpha']++ render(<AgentWorkspace mode="chat" scrollContainerRef={{ current: null }} />)++ expect(document.querySelector('.agent-workspace-new-chat')).toBeTruthy()+ expect(screen.getByRole('heading', { name: 'Start a conversation' })).toBeTruthy()+ expect(screen.getByText('Choose an agent to begin')).toBeTruthy()+ })+it('shows the display in the collapsed trigger and in the dropdown option row', () => {navMock.selectedAgent = 'alpha'agentsMock.agentNames = ['alpha']mcpMock.agentDisplayByName = { alpha: 'Alpha Host' }- // Chat mode with no active chat renders the greeting title-row selector.+ // Chat mode with no active chat renders the new-chat landing selector.render(<AgentWorkspace mode="chat" scrollContainerRef={{ current: null }} />)// Collapsed trigger label = the display.diff --git a/desktop-app/ui/src/constants/agents.ts b/desktop-app/ui/src/constants/agents.tsindex 306205058..61eeda483 100644--- a/desktop-app/ui/src/constants/agents.ts+++ b/desktop-app/ui/src/constants/agents.ts@@ -1,5 +1,5 @@export const MAX_VISIBLE_SESSIONS = 6-export const SESSION_PREVIEW_LIMIT = 9+export const SESSION_PREVIEW_LIMIT = 5/*** Distance (px) from the bottom within which a reader still follows the chat.* Beyond it, appended content must not pull them away from older history.diff --git a/desktop-app/ui/src/styles.css b/desktop-app/ui/src/styles.cssindex bd9f0975d..bd1ea45da 100644--- a/desktop-app/ui/src/styles.css+++ b/desktop-app/ui/src/styles.css@@ -1915,10 +1915,10 @@ h3 {background: var(--list-item-hover-bg);}-.nav-link--with-toggle .nav-link-main.ui-nav-item,+.nav-link .nav-link-main.ui-nav-item,.nav-link--with-toggle .nav-link-session-toggle.ui-icon-button,.nav-link--with-toggle .nav-link-new-chat.ui-icon-button,-.nav-link--with-toggle .nav-link-main.ui-nav-item:hover:enabled,+.nav-link .nav-link-main.ui-nav-item:hover:enabled,.nav-link--with-toggle .nav-link-session-toggle.ui-icon-button:hover:enabled,.nav-link--with-toggle .nav-link-new-chat.ui-icon-button:hover:enabled {background: transparent;@@ -4036,6 +4036,10 @@ h3 {align-content: start;}+.agent-workspace-shell .chat-thread-dedicated {+ padding-inline: 0;+}+.agent-workspace-shell .chat-empty-state {min-height: 0;padding: 32px 0 20px;@@ -4082,7 +4086,7 @@ h3 {.agent-workspace-shell .agent-dedicated-session-row {min-height: 36px;- padding: var(--space-1) var(--space-2);+ padding: var(--space-1-5) var(--space-2);border-radius: var(--radius-sm);border-color: rgba(var(--edge-rgb), 0.2);background: rgba(var(--panel-rgb), 0.5);@@ -4171,89 +4175,84 @@ h3 {color: var(--text);}-.agent-workspace-greeting {+/* ── New-chat landing ────────────────────────────────────────────────────── */++.agent-workspace-new-chat {+ display: flex;+ flex: 0 0 auto;+ flex-direction: column;+ align-items: center;+ width: 100%;+ min-width: 0;+ padding: calc(var(--space-4) * 4) 0 0;+}++.agent-workspace-new-chat__intro {+ display: grid;+ justify-items: center;+ gap: var(--space-1);+ min-width: 0;+ text-align: center;+}++.agent-workspace-new-chat__title {margin: 0;color: var(--text);font-size: var(--font-size-2xl);- font-weight: 700;- line-height: 1.1;+ font-weight: var(--font-weight-bold);+ line-height: var(--line-height-tight);}-.agent-workspace-greeting-inline {- width: min(100%, 1120px);- max-width: min(100%, 1120px);- margin: 0 auto;- padding: 50px 0 var(--space-1);+.agent-workspace-new-chat__subtitle {+ margin: 0;+ color: var(--text-muted);+ font-size: var(--font-size-lg);+ line-height: var(--line-height-normal);}-/* Greeting-as-title-row: "Welcome back {name}! New chat with [agent ▾]".- * The agent selector (ResourceBreadcrumbSwitcher) rides inline on the SAME- * baseline as the title text — it must never wrap to its own line.- * `nowrap` + `inline-flex` keep title and selector on one row; the title- * shrinks (ellipsis) if space is tight rather than pushing the selector down. */-.agent-workspace-greeting-row {- width: min(100%, 1120px);- max-width: min(100%, 1120px);- margin: 0 auto;- padding: 50px 0 var(--space-1);- display: flex;- flex-wrap: nowrap;- align-items: baseline;- gap: var(--space-1-5);- min-width: 0;+.agent-workspace-new-chat__selector {+ margin-top: var(--space-1-5);}-.agent-workspace-greeting-row .agent-workspace-greeting {- /* Title text shares the row with the selector; let it shrink if needed. */- padding: 0;- margin: 0;- flex: 0 1 auto;- min-width: 0;- overflow: hidden;- text-overflow: ellipsis;- white-space: nowrap;+.agent-workspace-new-chat .agent-title-selector-trigger.ui-button--text.ui-button--transparent {+ width: min(196px, calc(100vw - (var(--space-4) * 2)));+ min-height: 36px;+ justify-content: space-between;+ padding: 0 var(--space-2-5);+ border: 1px solid var(--control-border);+ border-radius: var(--radius-sm);+ background: var(--control-bg);+ color: var(--text);+ font-size: var(--font-size-lg);+ font-weight: var(--font-weight-medium);+ line-height: var(--line-height-tight);}-.agent-workspace-greeting-row .agent-title-selector {- /* Selector pinned to the title baseline; never wraps, never shrinks. */- flex: 0 0 auto;- align-self: center;+.agent-workspace-new-chat+ .agent-title-selector-trigger.ui-button--text.ui-button--transparent:hover:enabled,+.agent-workspace-new-chat+ .agent-title-selector-trigger.ui-button--text.ui-button--transparent[aria-expanded='true'] {+ border-color: var(--control-border-hover);+ background: var(--surface-hover);+ color: var(--text);}-/* The trigger must inherit the title's typography (2xl / 700). The base- * .ui-button--sm rule (font-size-sm) has equal specificity but loads later in- * the file, so we scope to the greeting row AND chain the size class to win.- * Keep the pill padding (from .agent-title-selector-trigger) intact. */-.agent-workspace-greeting-row .agent-title-selector-trigger.ui-button,-.agent-workspace-greeting-row .agent-title-selector-trigger.ui-button--sm {- font-size: var(--font-size-2xl);- font-weight: 700;- line-height: 1.1;- min-height: 0;+.agent-workspace-new-chat .agent-title-selector-trigger:focus-visible {+ outline: none;+ box-shadow: 0 0 0 2px rgba(var(--focus-rgb), 0.26);}-.agent-workspace-greeting-row .agent-title-selector-trigger svg {- width: 18px;- height: 18px;+.agent-workspace-new-chat .agent-title-selector-trigger svg {+ width: 14px;+ height: 14px;+ flex: 0 0 14px;}-/* Leading agent icon in the trigger label (the title text only — NOT in the- * dropdown rows). Fixed at 16px so it matches the SidebarNav "Agents" item- * exactly. Inherits the trigger's color so it shares the same blue as the- * agent name + chevron (IconAgents is fill=currentColor). */-.agent-title-selector-trigger-icon {- display: inline-flex;- align-items: center;- flex: 0 0 auto;+.agent-workspace-new-chat .agent-title-selector-trigger-label {+ max-width: 32ch;color: inherit;}-.agent-title-selector-trigger-icon svg,-.agent-workspace-greeting-row .agent-title-selector-trigger-icon svg {- width: 16px;- height: 16px;-}-/* ── Agent title selector dropdown ──* Two targets per row: [3-dots] [agent name]. The 3-dots opens a sections* sub-menu (Details / Connectors / …); the name selects the agent. */@@ -4264,37 +4263,6 @@ h3 {align-items: center;}-/* All three pieces — icon, agent name, chevron — share the same darker blue- * at rest (currentColor), so they read as one linked element distinct from the- * bold black "Welcome back" title text.- *- * Specificity note: the Button renders as .ui-button--text.ui-button--transparent- * which forces `color: inherit` at (0,3,0). To beat that we need (0,4,0):- * greeting-row + trigger + two chained button-variant classes. */-.agent-workspace-greeting-row .agent-title-selector-trigger.ui-button--text.ui-button--transparent {- color: var(--brand-deep-blue);- background: transparent;- border: 0;- cursor: pointer;- display: inline-flex;- align-items: center;- gap: var(--space-1);- transition: color 120ms ease;-}--/* Hover/focus/open lightens toward the brand blue across all three (icon +- * name + chevron) since they all inherit currentColor. */-.agent-workspace-greeting-row- .agent-title-selector-trigger.ui-button--text.ui-button--transparent:hover,-.agent-workspace-greeting-row- .agent-title-selector-trigger.ui-button--text.ui-button--transparent:focus-visible,-.agent-workspace-greeting-row- .agent-title-selector-trigger.ui-button--text.ui-button--transparent[aria-expanded='true'] {- color: var(--accent);- outline: none;- text-decoration: none;-}-.agent-title-selector-trigger:focus-visible {box-shadow: 0 0 0 2px rgba(var(--focus-rgb), 0.26);}@@ -4305,12 +4273,11 @@ h3 {overflow: hidden;text-overflow: ellipsis;white-space: nowrap;- /* Inherits the trigger's blue at rest and the deeper blue on hover. */+ /* Keep the label aligned with the trigger's current color state. */}-/* The chevron svg uses stroke; point it at currentColor so it picks up the- * trigger's blue at rest (and the deeper blue on hover) just like the filled- * IconAgents glyph, which already inherits via fill=currentColor. */+/* The chevron svg uses stroke; point it at currentColor so it follows the+ * trigger's current color state. */.agent-title-selector-trigger svg {fill: none;stroke: currentColor;@@ -5525,6 +5492,16 @@ h3 {margin-right: auto;}+.agent-workspace-body-slot > .agent-workspace-new-chat > .composer-inline,+.agent-workspace-shell .agent-dedicated-sessions-card-inline {+ width: min(100%, 920px);+ max-width: min(100%, 920px);+}++.agent-workspace-body-slot > .agent-workspace-new-chat > .composer-inline {+ padding-top: var(--space-3);+}+.agent-dedicated-sessions-header {display: flex;align-items: center;@@ -5669,8 +5646,8 @@ h3 {.agent-dedicated-session-time {font-size: var(--font-size-xs);- font-weight: 600;- color: var(--text);+ font-weight: var(--font-weight-regular);+ color: var(--text-dim);white-space: nowrap;}@@ -6969,6 +6946,7 @@ h3 {border: 1px solid rgba(var(--edge-rgb), 0.22);border-radius: var(--radius-md);background: var(--surface-soft);+ box-shadow: 0 1px 6px rgba(var(--overlay-rgb), 0.08);}.composer-textarea-viewport {@@ -7026,7 +7004,7 @@ h3 {gap: var(--space-1);min-width: 0;padding: var(--space-1-5);- border-top: 1px solid rgba(var(--edge-rgb), 0.16);+ border-top: 1px solid transparent;}.composer textarea::placeholder {