Skip to content

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

TypeScript

style(desktop-app): widen chat drawer and tighten panel padding

Diego Zacarias2119fed42126
diff --git a/desktop-app/ui/src/components/ChatDrawer/ChatDrawer.test.tsx b/desktop-app/ui/src/components/ChatDrawer/ChatDrawer.test.tsx
index 7218b2d09..1f6e44376 100644
--- a/desktop-app/ui/src/components/ChatDrawer/ChatDrawer.test.tsx
+++ b/desktop-app/ui/src/components/ChatDrawer/ChatDrawer.test.tsx
@@ -41,7 +41,7 @@ function renderDrawer(props: Partial<React.ComponentProps<typeof ChatDrawer>> =
ready={props.ready ?? true}
onResizeHandleMouseDown={onResizeHandleMouseDown}
onResizeHandleKeyDown={onResizeHandleKeyDown}
- width={props.width ?? 420}
+ width={props.width ?? 525}
resizing={props.resizing ?? false}
>
<div data-testid="drawer-chat-page">chat page</div>
@@ -126,7 +126,7 @@ describe('ChatDrawer', () => {
// Focusable, with the value semantics the separator role requires.
expect(handle.getAttribute('tabindex')).toBe('0')
expect(handle.getAttribute('aria-valuemin')).toBe('340')
- expect(handle.getAttribute('aria-valuemax')).toBe('820')
+ expect(handle.getAttribute('aria-valuemax')).toBe('1000')
expect(handle.getAttribute('aria-valuenow')).toBe('512')
fireEvent.keyDown(handle, { key: 'ArrowLeft' })
expect(onResizeHandleKeyDown).toHaveBeenCalledTimes(1)
diff --git a/desktop-app/ui/src/hooks/__tests__/useChatDrawerResize.keyboard.test.tsx b/desktop-app/ui/src/hooks/__tests__/useChatDrawerResize.keyboard.test.tsx
index 95c2ce9d9..447b9c366 100644
--- a/desktop-app/ui/src/hooks/__tests__/useChatDrawerResize.keyboard.test.tsx
+++ b/desktop-app/ui/src/hooks/__tests__/useChatDrawerResize.keyboard.test.tsx
@@ -28,25 +28,25 @@ function press(result: ReturnType<typeof setup>['result'], key: string) {
describe('useChatDrawerResize keyboard resize', () => {
it('widens by one step on ArrowLeft (drawer grows leftward)', () => {
const { result } = setup()
- expect(result.current.width).toBe(CHAT_DRAWER_DEFAULT_WIDTH) // 420
+ expect(result.current.width).toBe(CHAT_DRAWER_DEFAULT_WIDTH) // 525
press(result, 'ArrowLeft')
- expect(result.current.width).toBe(CHAT_DRAWER_DEFAULT_WIDTH + 24) // 444
+ expect(result.current.width).toBe(CHAT_DRAWER_DEFAULT_WIDTH + 24) // 549
})
it('narrows by one step on ArrowRight', () => {
const { result } = setup()
press(result, 'ArrowRight')
- expect(result.current.width).toBe(CHAT_DRAWER_DEFAULT_WIDTH - 24) // 396
+ expect(result.current.width).toBe(CHAT_DRAWER_DEFAULT_WIDTH - 24) // 501
})
it('jumps to the min on Home and the max on End (matching aria-valuemin/valuemax)', () => {
- // The handle announces aria-valuenow = width, valuemin = 340, valuemax = 820,
+ // The handle announces aria-valuenow = width, valuemin = 340, valuemax = 1000,
// so the separator/slider convention requires Home → valuemin, End → valuemax.
const { result } = setup()
press(result, 'Home')
expect(result.current.width).toBe(CHAT_DRAWER_MIN_WIDTH) // 340
press(result, 'End')
- expect(result.current.width).toBe(CHAT_DRAWER_MAX_ABSOLUTE) // 820
+ expect(result.current.width).toBe(CHAT_DRAWER_MAX_ABSOLUTE) // 1000
})
it('ignores unrelated keys and does not preventDefault them', () => {
diff --git a/desktop-app/ui/src/hooks/__tests__/useChatDrawerResize.narrowWidth.test.tsx b/desktop-app/ui/src/hooks/__tests__/useChatDrawerResize.narrowWidth.test.tsx
index c647c2886..116faffc5 100644
--- a/desktop-app/ui/src/hooks/__tests__/useChatDrawerResize.narrowWidth.test.tsx
+++ b/desktop-app/ui/src/hooks/__tests__/useChatDrawerResize.narrowWidth.test.tsx
@@ -84,7 +84,7 @@ describe('useChatDrawerResize width restore on re-widen (L2)', () => {
it('restores the requested width after a transient narrowing', () => {
const { ref, resizeTo } = makeHarness(2000)
const { result } = renderHook(() => useChatDrawerResize(ref, true))
- expect(result.current.width).toBe(CHAT_DRAWER_DEFAULT_WIDTH) // 420
+ expect(result.current.width).toBe(CHAT_DRAWER_DEFAULT_WIDTH) // 525
// Drag the drawer to a requested 600px on the wide panel. The right edge
// falls back to window.innerWidth - 18 (jsdom innerWidth = 1024 → 1006), so a
diff --git a/desktop-app/ui/src/hooks/__tests__/useChatDrawerResize.reentry.test.tsx b/desktop-app/ui/src/hooks/__tests__/useChatDrawerResize.reentry.test.tsx
index d9a3f3828..f10d71c8a 100644
--- a/desktop-app/ui/src/hooks/__tests__/useChatDrawerResize.reentry.test.tsx
+++ b/desktop-app/ui/src/hooks/__tests__/useChatDrawerResize.reentry.test.tsx
@@ -41,7 +41,7 @@ describe('useChatDrawerResize re-entrant drag leak', () => {
it('does not resize on a bare mousemove after a re-entrant mousedown + mouseup', () => {
const ref = createRef<HTMLElement>()
const { result } = renderHook(() => useChatDrawerResize(ref, true))
- expect(result.current.width).toBe(CHAT_DRAWER_DEFAULT_WIDTH) // 420
+ expect(result.current.width).toBe(CHAT_DRAWER_DEFAULT_WIDTH) // 525
// Drag #1 starts.
mousedown(result, 500)
diff --git a/desktop-app/ui/src/hooks/__tests__/useChatDrawerResize.test.ts b/desktop-app/ui/src/hooks/__tests__/useChatDrawerResize.test.ts
index 15db44cd2..f4a85c65a 100644
--- a/desktop-app/ui/src/hooks/__tests__/useChatDrawerResize.test.ts
+++ b/desktop-app/ui/src/hooks/__tests__/useChatDrawerResize.test.ts
@@ -14,10 +14,10 @@ describe('clampWidth', () => {
expect(clampWidth(100, 2000)).toBe(CHAT_DRAWER_MIN_WIDTH) // 340
})
- it('pins the minimum floor at the literal 340 (drift guard, mirrors the 820 ceiling)', () => {
+ it('pins the minimum floor at the literal 340 (drift guard, mirrors the 1000 ceiling)', () => {
// Asserting the LITERAL, not the symbol: the other cases compare against
// CHAT_DRAWER_MIN_WIDTH, so a 340 → 341 edit would leave them all green. This
- // closes the asymmetry with the literal-pinned 820 ceiling above.
+ // closes the asymmetry with the literal-pinned 1000 ceiling above.
expect(CHAT_DRAWER_MIN_WIDTH).toBe(340)
expect(clampWidth(0, 2000)).toBe(340)
})
@@ -27,12 +27,12 @@ describe('clampWidth', () => {
expect(clampWidth(400.6, 2000)).toBe(401)
})
- it('caps at the absolute ceiling (820) even on a very wide panel', () => {
- expect(clampWidth(5000, 3000)).toBe(820)
+ it('caps at the absolute ceiling (1000) even on a very wide panel', () => {
+ expect(clampWidth(5000, 3000)).toBe(1000)
})
it('falls back to the absolute ceiling when the panel is unmeasured (<= 0)', () => {
- expect(clampWidth(5000, 0)).toBe(820)
+ expect(clampWidth(5000, 0)).toBe(1000)
})
})
@@ -42,7 +42,7 @@ describe('clampWidth embed floor (docked sizing)', () => {
// the exact function the ResizeObserver `sync` re-clamps the width with, so
// these cases mirror the runtime re-clamp on window narrowing.
it('caps the drawer so exactly EMBED_FLOOR (460) of embed remains as the panel narrows', () => {
- // panel 1200 - 506 = 694 (below the 820 ceiling): drawer maxes at 694,
+ // panel 1200 - 506 = 694 (below the 1000 ceiling): drawer maxes at 694,
// leaving embed = 1200 - 694 - 46(gutter) = 460 = EMBED_FLOOR.
const panelWidth = 1200
const width = clampWidth(5000, panelWidth)
diff --git a/desktop-app/ui/src/hooks/useChatDrawerResize.ts b/desktop-app/ui/src/hooks/useChatDrawerResize.ts
index 4bd656fa5..13e274c6d 100644
--- a/desktop-app/ui/src/hooks/useChatDrawerResize.ts
+++ b/desktop-app/ui/src/hooks/useChatDrawerResize.ts
@@ -29,12 +29,12 @@ import type { RefObject } from 'react'
* starts to overflow. Also the minimum the resize drag can reach. */
export const CHAT_DRAWER_MIN_WIDTH = 340
/** Default session width. Matches the top of the LIVE CSS pre-mount fallback
- * `--chat-drawer-width: clamp(340px, 32vw, 420px)` (styles.css) that sizes the
+ * `--chat-drawer-width: clamp(340px, 32vw, 525px)` (styles.css) that sizes the
* drawer before this hook measures — keep the two in sync. That clamp is still
* in use (the pre-mount / closed-state width), not dead code to delete. */
-export const CHAT_DRAWER_DEFAULT_WIDTH = 420
+export const CHAT_DRAWER_DEFAULT_WIDTH = 525
/** Generous absolute ceiling for the drag. */
-export const CHAT_DRAWER_MAX_ABSOLUTE = 820
+export const CHAT_DRAWER_MAX_ABSOLUTE = 1000
/** Width step for arrow-key resize (WAI-ARIA window-splitter pattern). */
const CHAT_DRAWER_KEY_STEP = 24
/** Legible floor reserved for the app embed's column while docked. The drawer's
diff --git a/desktop-app/ui/src/styles.css b/desktop-app/ui/src/styles.css
index 0f46c38a3..ab96ead48 100644
--- a/desktop-app/ui/src/styles.css
+++ b/desktop-app/ui/src/styles.css
@@ -2646,7 +2646,7 @@ h3 {
React sets `--chat-drawer-width` inline (session-only, drag-resizable); this
clamp is only the pre-mount / closed-state fallback. Floor 340px == the
drawer's min-width (see useChatDrawerResize). */
- --chat-drawer-width: clamp(340px, 32vw, 420px);
+ --chat-drawer-width: clamp(340px, 32vw, 525px);
height: calc(100vh - var(--window-titlebar-height));
min-height: 0;
@@ -2654,7 +2654,7 @@ h3 {
overflow-x: hidden;
position: relative;
z-index: var(--layer-content);
- padding: var(--space-4);
+ padding: var(--space-1) var(--space-2) var(--space-2) var(--space-2);
display: flex;
flex-direction: column;
gap: var(--space-2-5);
@@ -12986,7 +12986,7 @@ pre {
}
.content-panel:has(.sandbox-ui-embed-slot) {
- padding: var(--space-2) 0 0;
+ padding: var(--space-1) var(--space-2) var(--space-2) var(--space-2);
align-content: stretch;
}