Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.
Python agentagent-osaiai-agentsai-partnerchatopsclaudeclaude-codecodexdevtoolsdiscord-botlark-botllmlocal-firstlong-term-memoryopencodeslack-botvibe-codingvibeywechat
feat(ui): resize the workbench sidebar
Max2b2fa2c9f005
diff --git a/docs/plans/2026-09-19-sidebar-resize.md b/docs/plans/2026-09-19-sidebar-resize.mdnew file mode 100644index 000000000..a7f0420d4--- /dev/null+++ b/docs/plans/2026-09-19-sidebar-resize.md@@ -0,0 +1,60 @@+# Main sidebar resizing — issue #2044++## Goal and status++Let desktop users reveal more of project/session titles by dragging the right edge of the global Workbench sidebar. Issue: https://github.com/avibe-bot/avibe/issues/2044.++Owner approved implementation on 2026-09-19 with one explicit correction at 05:59–06:00 Asia/Shanghai: highlight the divider only, no visible handle or grip. The design gate is cleared for that corrected appearance, and the orchestrator resolved the width numbers against `origin/master` at 8f09a61b0: the shipped 248px is the minimum and twice it is the maximum.++## Behavior contract++- Scope: the leftmost global sidebar owned by `ui/src/components/AppShell.tsx`, shared by Workbench and Settings routes.+- Initial and minimum width are 248 CSS px — the shipped width, so the default shell is unchanged. Maximum is 496 CSS px. Both are fixed: bounds never compound across repeated drags.+- One width value feeds the sidebar, every desktop main-content offset, and the Settings overlay's left edge.+- Resting divider uses the existing border token. Hover, keyboard focus, and active drag change only that thin line to the existing cyan accent token. There is no visible handle, grip, button, dot, or center ornament. A roughly 8px invisible hit area makes the edge easy to grab; show a horizontal resize cursor. Reuse existing token classes.+- Horizontal pointer movement continuously clamps width to the bounds. The line highlight persists throughout the active drag; pointer capture keeps movement and release reliable outside the edge. Release, cancellation, lost capture, unmount, or leaving desktop layout ends the gesture and gives back any borrowed cursor/selection styling. Only the pointer that started a drag can end it, and a second pointer cannot take the edge over.+- Keyboard focus exposes the same affordance. Left/Right adjust width in a small fixed step; Home/End reach the bounds. The vertical separator carries a translated accessible name and current/min/max values.+- Width survives route changes within the mounted app shell. Reload persistence is not required, and one mount's drag must not leak into a later mount or a standalone app tab.+- Mobile navigation, standalone/chromeless apps, and window layering retain their existing behavior.++## Implementation++- `--app-sidebar-w: 248px` joins `--app-shell-h` / `--mobile-nav-clearance` in `ui/src/index.css`. The sidebar, both `<main>` offsets and the Settings overlay read `w-[var(--app-sidebar-w)]` / `md:ml-[var(--app-sidebar-w)]` / `md:left-[var(--app-sidebar-w)]`, so the default renders with no JS and one value moves the whole layout.+- `SidebarResizer` is a leaf inside the `<aside>`, mounted behind the shell's existing `isDesktop`. It holds the number for `aria-valuenow` and writes the custom property on `document.documentElement` — the only channel that reaches the portaled Settings overlay — so a drag re-renders the leaf and never the sidebar tree. Unmount removes the property and restores the body styling.+- Gesture: real `setPointerCapture` with React's own pointer handlers on the strip (capture retargets the gesture there), an end path shared by `pointerup`, `pointercancel` and `lostpointercapture` and keyed to the active pointer id, plus the same end at unmount. Width is always `clamp(startWidth + dx)` from the gesture's own start, so repeated drags cannot compound. No jsdom fallback path: the test stubs pointer capture instead.+- `touch-none` on the strip only. Capture does not enter the browser's touch-action negotiation, so wherever a touchscreen reports the desktop breakpoint the default lets the native pan claim the finger and cancel the drag part-way; measured, it stopped at 272px of an intended 368px. Scrolling anywhere outside the strip is untouched.+- `role="separator"` + `aria-orientation` + `tabIndex=0` + the value trio (APG window splitter), arrows stepping 16px and Home/End reaching the bounds through the same clamp. One new `appShell.resizeSidebar` key in `en.json` + `zh.json`.++Use existing React/CSS and native DOM events. No new dependencies, resizable/split-pane framework, backend settings, generalized layout system, or sibling-panel refactor. Consult the existing EditorApp resize interaction and AppWindow pointer capture patterns without changing those components.++Authorized files: `ui/src/components/AppShell.tsx` + its test, the colocated `SidebarResizer.tsx` + test, the two i18n files, narrowly scoped `ui/src/index.css`, this plan, plus the approved extension — `ui/src/components/settings/SettingsOverlayRouteSurface.tsx` (shared offset, its comment, and its dismissal guard) and the existing hermetic `ui/e2e/workbench-general` suite. Do not modify backend code, dependency files, unrelated UI, or design source files. Report any further scope extension before editing it.++Single implementation lane; no other lane owns these task files. Work only in this isolated worktree. Other sessions have unrelated work in the primary checkout; never change it.++## Known by design++- A newly opened app window still cascades from `x: 264`, a number chosen to clear the 248 sidebar. Windows sit above the sidebar (`z-20` over `z-10`), so under a widened sidebar a fresh window opens *over* it: the window is fully visible and usable, and the sidebar is partly covered until the window is moved. Following the width there would give the window manager a layout dependency it does not have today, so it is recorded rather than changed.+- Dragging the edge while the Settings overlay is open keeps the overlay open by design: the overlay is dismissed by interaction outside itself, and its own left edge is what the drag moves, so the resizer is exempted next to the existing Settings-toggle exemption.++## Validation and delivery++- Focused React tests exercise fixed bounds over repeated gestures, one shared layout width, release/cancel/lost-capture/unmount cleanup including restoring non-empty body styling, pointer identity, keyboard interaction, and desktop-only/standalone exclusion.+- Real browser against the hermetic `workbench-general` fixture proves actual geometry (sidebar, content offset, and the portaled Settings overlay after a drag), line-only hover/focus/active feedback with no ornament, release away from the edge, keyboard adjustment, a real touch drag driven through CDP at the desktop breakpoint, and a bounded dark/light look at the maximum width. No production credentials, browser profiles, local service, or the stateful Model Hub E2E suite.+- Run changed-file lint, focused tests, and `npm run build` before push. Record evidence and residual acceptance work here and in the PR.+- Read repo AGENTS.md and `.agents/skills/pr-delivery-loop/SKILL.md`; load `impeccable` and `background-watch-hook` as needed. Open a real non-draft PR against master, drive current-head Codex review + all CI + zero unresolved threads, respect circuit-breaker rules, and never merge without owner instruction.+- The owner acceptance environment is https://avibe-cloud-e2e-app.avibe.bot per parent workspace AGENTS.md. Do not deploy a branch there without coordinating its shared use; do not recreate the retired local Incus/Lima environment. No deployment or local service restart is needed for this lane.++## Acceptance in minutes++Open Workbench at desktop width. Hover the sidebar's right edge: only the line turns cyan and the horizontal resize cursor appears. Drag out past 496px, then back past 248px: the fixed bounds hold and the main area follows. Release away from the edge; navigation and text selection work normally. Repeat with Settings open — it stays open and its left edge follows. Tab-focus the separator and adjust it with arrows, Home and End. Confirm mobile navigation and standalone apps still use their usual layout.++## Progress++- [x] Issue filed; baseline and call sites inspected.+- [x] Task worktree created from fetched origin/master (8f09a61b03b7c2066266a05526ff0e9b61fd7b4f).+- [x] Lane preparation: contract checked against source, UI deps installed, baseline shell tests green.+- [x] Mockup approved with owner correction (line highlight only), and the 248/496 bounds plus the overlay/e2e scope extension resolved by the orchestrator.+- [x] Implementation, focused tests (13 + 4 shell cases), lint, build, and real-browser evidence (8 hermetic Chromium cases, dark/light captures at 496) complete.+- [x] Review round 1: one P2 — native touch negotiation not disabled on the strip. Fixed with `touch-none` and a real CDP touch drag that fails without it.+- [ ] Exact-head bot review, CI, and unresolved-thread gates clear.+- [ ] Owner-authorized integration and acceptance.diff --git a/ui/e2e/workbench-general/sidebar-resize.spec.ts b/ui/e2e/workbench-general/sidebar-resize.spec.tsnew file mode 100644index 000000000..fc5933a15--- /dev/null+++ b/ui/e2e/workbench-general/sidebar-resize.spec.ts@@ -0,0 +1,345 @@+import { expect, test } from '@playwright/test';+import type { Locator, Page } from '@playwright/test';++import { DESKTOP, NARROW, open, serveProduct } from './support';++/**+ * Sidebar resizing (#2044), measured in a real browser: the gesture uses actual+ * pointer capture, and the claim is about boxes — the sidebar, the content+ * offset and the Settings overlay's left edge all following ONE width — which no+ * class name or jsdom pointer event can answer.+ */++const SIDEBAR = 'aside.fixed';+const SHELL_SCROLL = 'main#app-shell-scroll';+const SEPARATOR = 'aside.fixed [role="separator"]';+const SETTINGS_TOGGLE = 'aside [data-settings-toggle="true"]';+const OVERLAY = '[data-settings-overlay="true"]';+const MIN = 248;+const MAX = 496;+const SHOTS = 'e2e/.artifacts/workbench-general/shots';++const boxOf = async (locator: Locator, what: string) => {+ const box = await locator.boundingBox();+ expect(box, `${what} should be laid out`).not.toBeNull();+ return box!;+};++/** The sidebar's width and, independently, where the content beside it starts. */+const layout = async (page: Page) => ({+ sidebar: (await boxOf(page.locator(SIDEBAR), 'sidebar')).width,+ contentLeft: (await boxOf(page.locator(SHELL_SCROLL), 'shell content')).x,+});++/**+ * One real gesture on the edge, ending wherever the travel ends — off the strip+ * and over the page, which is the case pointer capture exists for. Each move+ * also travels vertically, so a width that followed anything but the x axis+ * would show up.+ */+const dragEdge = async (page: Page, ...offsets: number[]) => {+ const strip = await boxOf(page.locator(SEPARATOR), 'separator');+ const startX = strip.x + strip.width / 2;+ const startY = strip.y + strip.height / 2;+ await page.mouse.move(startX, startY);+ await page.mouse.down();+ for (const offset of offsets) {+ await page.mouse.move(startX + offset, startY + 60, { steps: 6 });+ }+ await page.mouse.up();+};++/** What `var(--cyan)` actually computes to in this theme. */+const cyanOf = (page: Page) => page.evaluate(() => {+ const probe = document.createElement('span');+ probe.style.color = 'var(--cyan)';+ document.body.append(probe);+ const value = getComputedStyle(probe).color;+ probe.remove();+ return value;+});++const TRANSPARENT = 'rgba(0, 0, 0, 0)';++/** The line's colour once its own transition has settled on it. */+const expectEdgeLine = (page: Page, color: string) => expect+ .poll(async () => (await edgeStyle(page)).borderRightColor, { timeout: 2_000 })+ .toBe(color);++const edgeStyle = (page: Page) => page.locator(SEPARATOR).evaluate((node) => {+ const style = getComputedStyle(node);+ return {+ borderRightColor: style.borderRightColor,+ borderRightWidth: style.borderRightWidth,+ backgroundColor: style.backgroundColor,+ cursor: style.cursor,+ touchAction: style.touchAction,+ width: style.width,+ // A handle, grip, dot or centered ornament would have to be one of these.+ children: node.childElementCount,+ before: getComputedStyle(node, '::before').content,+ after: getComputedStyle(node, '::after').content,+ };+});++test.describe('sidebar resizing', () => {+ test('moves the sidebar and the content beside it to one width, within fixed bounds', async ({ page }) => {+ const denied = await serveProduct(page);+ await page.setViewportSize(DESKTOP);+ await open(page, '/');+ await expect(page.locator(SIDEBAR)).toBeVisible();++ // The shipped width is the minimum, so nothing moved before the first drag.+ expect(await layout(page)).toEqual({ sidebar: MIN, contentLeft: MIN });++ await dragEdge(page, 100);+ expect(await layout(page)).toEqual({ sidebar: MIN + 100, contentLeft: MIN + 100 });+ expect(await page.locator(SEPARATOR).getAttribute('aria-valuenow')).toBe(String(MIN + 100));++ // Past the maximum and back inside the range in one gesture: the bound+ // clamps, the overshoot is not remembered, and the release lands far from+ // the edge — over the page, where only pointer capture still delivers it.+ await dragEdge(page, 900, 60);+ expect(await layout(page)).toEqual({ sidebar: MIN + 160, contentLeft: MIN + 160 });++ // Repeated gestures stop at the same two numbers rather than walking past them.+ await dragEdge(page, 900);+ expect(await layout(page)).toEqual({ sidebar: MAX, contentLeft: MAX });+ await dragEdge(page, 900);+ expect(await layout(page)).toEqual({ sidebar: MAX, contentLeft: MAX });+ await dragEdge(page, -900);+ expect(await layout(page)).toEqual({ sidebar: MIN, contentLeft: MIN });+ await dragEdge(page, -900);+ expect(await layout(page)).toEqual({ sidebar: MIN, contentLeft: MIN });++ // Released, the page selects text again — the drag only borrowed that.+ expect(await page.evaluate(() => [+ document.body.style.userSelect,+ document.body.style.cursor,+ getComputedStyle(document.body).userSelect,+ ])).toEqual(['', '', 'auto']);++ expect(denied).toEqual([]);+ });++ test('recolors the divider and nothing else', async ({ page }) => {+ const denied = await serveProduct(page);+ await page.setViewportSize(DESKTOP);+ await open(page, '/');+ await expect(page.locator(SIDEBAR)).toBeVisible();++ const cyan = await cyanOf(page);+ const sidebarBorder = () => page.locator(SIDEBAR).evaluate(+ (node) => getComputedStyle(node).borderRightColor,+ );+ const restingSidebarBorder = await sidebarBorder();++ // At rest the visible line is the sidebar's own border; the strip adds nothing.+ await expectEdgeLine(page, TRANSPARENT);+ expect(await edgeStyle(page)).toMatchObject({+ backgroundColor: TRANSPARENT,+ borderRightWidth: '1px',+ width: '8px',+ children: 0,+ before: 'none',+ after: 'none',+ });++ // The strip ends exactly at the sidebar's edge, so the line it recolors is+ // that divider and not a second one beside it.+ const strip = await boxOf(page.locator(SEPARATOR), 'separator');+ expect(strip.x + strip.width).toBe(MIN);++ await page.locator(SEPARATOR).hover();+ await expectEdgeLine(page, cyan);+ // Still only a line: no box, no ornament, no width change.+ expect(await edgeStyle(page)).toMatchObject({+ cursor: 'col-resize',+ backgroundColor: TRANSPARENT,+ borderRightWidth: '1px',+ width: '8px',+ children: 0,+ before: 'none',+ after: 'none',+ });+ // The sidebar itself is untouched — the highlight is the strip's own border.+ expect(await sidebarBorder()).toBe(restingSidebarBorder);++ // The highlight holds for the whole drag, including with the pointer far+ // away from the strip, and goes back when the gesture ends.+ const startX = strip.x + strip.width / 2;+ const startY = strip.y + strip.height / 2;+ await page.mouse.move(startX, startY);+ await page.mouse.down();+ await page.mouse.move(startX + 500, startY + 300, { steps: 8 });+ await expectEdgeLine(page, cyan);+ await page.mouse.up();+ await page.mouse.move(startX + 500, startY + 300);+ await expectEdgeLine(page, TRANSPARENT);++ // Keyboard focus is the same affordance, and only for keyboard focus.+ const focused = await page.evaluate(() => {+ const focusables = [...document.querySelectorAll<HTMLElement>('aside.fixed button, aside.fixed a[href]')];+ focusables[focusables.length - 1]?.focus();+ return focusables.length;+ });+ expect(focused).toBeGreaterThan(0);+ await page.keyboard.press('Tab');+ expect(await page.locator(SEPARATOR).evaluate((node) => [+ node === document.activeElement, node.matches(':focus-visible'),+ ])).toEqual([true, true]);+ await expectEdgeLine(page, cyan);++ expect(denied).toEqual([]);+ });++ test('adjusts the real layout from the keyboard within the same bounds', async ({ page }) => {+ const denied = await serveProduct(page);+ await page.setViewportSize(DESKTOP);+ await open(page, '/');+ await page.locator(SEPARATOR).focus();++ await page.keyboard.press('ArrowRight');+ const stepped = await layout(page);+ expect(stepped.sidebar).toBeGreaterThan(MIN);+ expect(stepped.contentLeft).toBe(stepped.sidebar);++ await page.keyboard.press('Home');+ expect(await layout(page)).toEqual({ sidebar: MIN, contentLeft: MIN });+ await page.keyboard.press('ArrowLeft');+ expect(await layout(page)).toEqual({ sidebar: MIN, contentLeft: MIN });++ await page.keyboard.press('End');+ expect(await layout(page)).toEqual({ sidebar: MAX, contentLeft: MAX });+ await page.keyboard.press('ArrowRight');+ expect(await layout(page)).toEqual({ sidebar: MAX, contentLeft: MAX });++ expect(denied).toEqual([]);+ });++ test('keeps the Settings overlay open and on the edge it is being dragged to', async ({ page }) => {+ const denied = await serveProduct(page);+ await page.setViewportSize(DESKTOP);+ await open(page, '/');++ await page.locator(SETTINGS_TOGGLE).click();+ const overlay = page.locator(OVERLAY);+ await expect(overlay).toBeVisible();++ // The overlay is portaled outside the shell, so this is the case the shared+ // document-level width exists for. Grabbing the edge must not dismiss it.+ await dragEdge(page, 900);+ await expect(overlay).toBeVisible();++ const surface = await boxOf(overlay, 'settings overlay');+ expect(await layout(page)).toEqual({ sidebar: MAX, contentLeft: MAX });+ expect(surface.x).toBe(MAX);+ expect(surface.width).toBe(DESKTOP.width - MAX);+ await expect(page.locator(SIDEBAR)).toBeVisible();++ // And back: the overlay follows the sidebar in, not just out.+ await dragEdge(page, -900);+ const narrowed = await boxOf(overlay, 'settings overlay');+ expect(narrowed.x).toBe(MIN);+ expect(narrowed.width).toBe(DESKTOP.width - MIN);++ expect(denied).toEqual([]);+ });++ /**+ * A touchscreen can report this breakpoint too — a tablet in landscape, a+ * convertible laptop — and there the browser, not the page, decides whether a+ * finger on this strip is a drag or its own pan. Pointer capture does not+ * enter that negotiation: touch-action does, and losing it means Chromium+ * cancels the pointer part-way through the gesture. So this drives real touch+ * input through CDP rather than asserting the utility class that asks for it.+ */+ test.describe('with a finger', () => {+ test.use({ hasTouch: true });++ test('resizes from a touch drag the browser does not take over', async ({ page }) => {+ const denied = await serveProduct(page);+ await page.setViewportSize(DESKTOP);+ await open(page, '/');+ await expect(page.locator(SIDEBAR)).toBeVisible();++ // What the browser was given for the decision.+ expect(await edgeStyle(page)).toMatchObject({ touchAction: 'none' });++ // What it then did with the gesture: a cancelled pointer is exactly how a+ // pan taking the finger over shows up at the element.+ await page.locator(SEPARATOR).evaluate((node) => {+ const seen: string[] = [];+ (window as unknown as { __edgePointerLog: string[] }).__edgePointerLog = seen;+ for (const type of ['pointerdown', 'pointermove', 'pointercancel', 'pointerup']) {+ node.addEventListener(type, (event) => seen.push(event.type));+ }+ });++ const strip = await boxOf(page.locator(SEPARATOR), 'separator');+ const from = { x: strip.x + strip.width / 2, y: strip.y + strip.height / 2 };+ const cdp = await page.context().newCDPSession(page);+ const point = (x: number, y: number) => (+ [{ x, y, radiusX: 8, radiusY: 8, force: 1, id: 1 }]+ );+ await cdp.send('Input.dispatchTouchEvent', {+ type: 'touchStart',+ touchPoints: point(from.x, from.y),+ });+ // Stepped, and with a vertical component, so the travel crosses Chromium's+ // slop threshold the way a finger does — a single jump would not be+ // recognised as a pan either, and would prove nothing about the default.+ const steps = 10;+ for (let step = 1; step <= steps; step += 1) {+ await cdp.send('Input.dispatchTouchEvent', {+ type: 'touchMove',+ touchPoints: point(from.x + (120 * step) / steps, from.y + (40 * step) / steps),+ });+ }+ await cdp.send('Input.dispatchTouchEvent', { type: 'touchEnd', touchPoints: [] });+ await cdp.detach();++ expect(await layout(page)).toEqual({ sidebar: MIN + 120, contentLeft: MIN + 120 });+ const log = await page.evaluate(+ () => (window as unknown as { __edgePointerLog: string[] }).__edgePointerLog,+ );+ expect(log).toContain('pointermove');+ expect(log).not.toContain('pointercancel');++ // And the finger let go of the page as cleanly as the mouse does.+ expect(await page.evaluate(() => [+ document.body.style.userSelect,+ document.body.style.cursor,+ ])).toEqual(['', '']);++ expect(denied).toEqual([]);+ });+ });++ test('leaves a phone with no edge to drag', async ({ page }) => {+ await serveProduct(page);+ await page.setViewportSize(NARROW);+ await open(page, '/');+ await expect(page.locator(SHELL_SCROLL)).toBeVisible();++ await expect(page.locator(SEPARATOR)).toHaveCount(0);+ });++ // The bounded visual pass: the widened sidebar in both themes, so the rows it+ // holds can be looked at rather than inferred from a width.+ for (const theme of ['dark', 'light'] as const) {+ test(`captures the widened sidebar (${theme})`, async ({ page }) => {+ await serveProduct(page);+ await page.emulateMedia({ reducedMotion: 'reduce' });+ await page.setViewportSize(DESKTOP);+ await open(page, '/', { theme });+ await expect(page.locator(SIDEBAR)).toBeVisible();+ await page.waitForTimeout(400);++ await page.locator(SEPARATOR).focus();+ await page.keyboard.press('End');+ expect((await layout(page)).sidebar).toBe(MAX);+ await page.screenshot({ path: `${SHOTS}/sidebar-resized-${theme}-desktop.png` });+ });+ }+});diff --git a/ui/src/components/AppShell.test.tsx b/ui/src/components/AppShell.test.tsxindex 06be42c62..ebaa05ec5 100644--- a/ui/src/components/AppShell.test.tsx+++ b/ui/src/components/AppShell.test.tsx@@ -6,6 +6,7 @@ import userEvent from '@testing-library/user-event';import { MemoryRouter, Route, Routes, useNavigate } from 'react-router-dom';import type { ReactNode } from 'react';+import { APP_TAB_PARAM } from '../apps/appLaunch';import {APP_SHELL_SCROLL_ID,clearMobileProjectsListSnapshot,@@ -288,6 +289,57 @@ describe('AppShell workbench sidebar', () => {});});+describe('AppShell sidebar width', () => {+ const renderShell = (initialEntry = '/') => render(+ <MemoryRouter initialEntries={[initialEntry]}>+ <Routes>+ <Route element={<AppShell />}>+ <Route path="*" element={<div data-testid="surface" />} />+ </Route>+ </Routes>+ </MemoryRouter>,+ );++ // The sidebar and the content offset must read ONE value, or dragging the+ // divider would move the sidebar out from under the page it frames.+ it('sizes the sidebar and offsets the content from the same width', async () => {+ viewport.isDesktop = true;+ renderShell();+ await screen.findByTestId('surface');++ expect(document.querySelector('aside')?.className).toContain('w-[var(--app-sidebar-w)]');+ expect(document.getElementById(APP_SHELL_SCROLL_ID)?.className)+ .toContain('md:ml-[var(--app-sidebar-w)]');+ });++ it.each([+ [true, 1],+ [false, 0],+ ])('offers the resize separator only in desktop layout (desktop: %s)', async (isDesktop, expected) => {+ viewport.isDesktop = isDesktop;+ renderShell();+ await screen.findByTestId('surface');++ expect(screen.queryAllByRole('separator', { name: 'appShell.resizeSidebar' }))+ .toHaveLength(expected);+ });++ it('leaves a standalone app tab without a sidebar to resize', async () => {+ viewport.isDesktop = true;+ // The shell reads standalone mode from the document URL, once, at mount.+ window.history.replaceState({}, '', `/apps/editor?${APP_TAB_PARAM}=1`);+ try {+ renderShell('/apps/editor');+ await screen.findByTestId('surface');++ expect(document.querySelector('aside')).toBeNull();+ expect(screen.queryByRole('separator', { name: 'appShell.resizeSidebar' })).toBeNull();+ } finally {+ window.history.replaceState({}, '', '/');+ }+ });+});+describe('AppShell persistent Workbench chrome', () => {it('applies the instance language while Settings controls stay unmounted', async () => {viewport.isDesktop = true;diff --git a/ui/src/components/AppShell.tsx b/ui/src/components/AppShell.tsxindex 92a8d4ca1..ad8174f64 100644--- a/ui/src/components/AppShell.tsx+++ b/ui/src/components/AppShell.tsx@@ -12,6 +12,7 @@ import { useWorkbenchInbox } from '../context/WorkbenchInboxContext';import { useInstanceAuthorization } from '../context/InstanceAuthorizationContext';import { VersionBadge } from './VersionBadge';import { WorkbenchSidebar } from './workbench/WorkbenchSidebar';+import { SidebarResizer } from './SidebarResizer';import { AppsLauncher } from './AppsLauncher';import { ErrorBoundary } from './ui/error-boundary';import { WindowManagerProvider } from '../context/WindowManagerProvider';@@ -358,11 +359,13 @@ export const AppShell: React.FC = () => {<ConfigRecoveryNotice config={config} />{/* Windows cover the sidebar (z-10 < z-20). AppsLauncher portals its button and Dockabove the window layer so app switching remains reachable even when maximized. */}- {/* Sidebar Y1TiVV — 248 wide, 20/16 padding, top group and bottom cluster- pushed apart. The brand row, navigation and projects are one unit inside- WorkbenchSidebar; this frame owns only the column and the bottom. */}+ {/* Sidebar Y1TiVV — 248 wide by default, 20/16 padding, top group and bottom+ cluster pushed apart. The brand row, navigation and projects are one unit+ inside WorkbenchSidebar; this frame owns only the column and the bottom.+ The width is SidebarResizer's --app-sidebar-w, which <main> below and the+ Settings overlay read too, so a drag moves the whole layout at once. */}{!chromeless && (- <aside className="fixed inset-y-0 left-0 z-10 hidden w-[248px] flex-col justify-between gap-6 border-r border-border bg-[var(--sidebar-background)] px-4 py-5 md:flex">+ <aside className="fixed inset-y-0 left-0 z-10 hidden w-[var(--app-sidebar-w)] flex-col justify-between gap-6 border-r border-border bg-[var(--sidebar-background)] px-4 py-5 md:flex"><div className="flex min-h-0 flex-1 flex-col">{isDesktop && <WorkbenchSidebar onOpenSearch={() => setSearchOpen(true)} />}</div>@@ -415,6 +418,12 @@ export const AppShell: React.FC = () => {</span></div></div>++ {/* Out of flow, so it neither joins the column nor takes any of its gap.+ Desktop-only like the tree above it: below md the shell has no sidebar+ edge to drag, and unmounting here is what ends a gesture that was live+ when the viewport crossed the breakpoint. */}+ {isDesktop && <SidebarResizer />}</aside>)}@@ -455,8 +464,8 @@ export const AppShell: React.FC = () => {// is the only thing in the viewport and sizes itself to this box (h-full).? 'min-h-0 flex-1 overflow-hidden': isFullScreenMobile- ? 'min-h-0 flex-1 overflow-hidden md:ml-[248px] md:min-h-screen md:flex-none md:overflow-visible md:pb-0'- : 'flex-1 min-h-0 overflow-y-auto md:ml-[248px] md:min-h-screen md:flex-none md:overflow-visible md:pb-0',+ ? 'min-h-0 flex-1 overflow-hidden md:ml-[var(--app-sidebar-w)] md:min-h-screen md:flex-none md:overflow-visible md:pb-0'+ : 'flex-1 min-h-0 overflow-y-auto md:ml-[var(--app-sidebar-w)] md:min-h-screen md:flex-none md:overflow-visible md:pb-0',!chromeless && (showBottomNav ? 'pb-[var(--mobile-nav-clearance)]' : 'pb-0'),// Board 04 draws the Workbench home on flat $--background. The console// aurora stays with the rest of its page family (Agents, Skills,diff --git a/ui/src/components/SidebarResizer.test.tsx b/ui/src/components/SidebarResizer.test.tsxnew file mode 100644index 000000000..6ff714f32--- /dev/null+++ b/ui/src/components/SidebarResizer.test.tsx@@ -0,0 +1,222 @@+/* @vitest-environment jsdom */++import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';+import { cleanup, fireEvent, render, screen } from '@testing-library/react';++import { MAX_SIDEBAR_WIDTH, MIN_SIDEBAR_WIDTH, SIDEBAR_WIDTH_VAR, SidebarResizer } from './SidebarResizer';++vi.mock('react-i18next', () => ({+ useTranslation: () => ({ t: (key: string) => key }),+}));++// jsdom implements pointer events but not pointer capture, which the gesture+// really does use in a browser; stubbing just that primitive keeps the component+// free of a fallback path no shipped browser needs.+const capture = vi.fn();+const release = vi.fn();++beforeEach(() => {+ Element.prototype.setPointerCapture = capture;+ Element.prototype.releasePointerCapture = release;+});++afterEach(() => {+ // After cleanup: unmounting a live gesture is itself one of the restores, so+ // the body is reset once nothing can write to it again.+ cleanup();+ document.body.removeAttribute('style');+ vi.clearAllMocks();+ delete (Element.prototype as Partial<Element>).setPointerCapture;+ delete (Element.prototype as Partial<Element>).releasePointerCapture;+});++const separator = () => screen.getByRole('separator');+const publishedWidth = () => document.documentElement.style.getPropertyValue(SIDEBAR_WIDTH_VAR);+const reportedWidth = () => Number(separator().getAttribute('aria-valuenow'));++/** One gesture: press on the edge, travel through every offset, release. */+const drag = (...offsets: number[]) => {+ const handle = separator();+ const startX = reportedWidth();+ fireEvent.pointerDown(handle, { pointerId: 1, button: 0, clientX: startX });+ offsets.forEach((offset) => fireEvent.pointerMove(handle, { pointerId: 1, clientX: startX + offset }));+ fireEvent.pointerUp(handle, { pointerId: 1 });+};++describe('SidebarResizer width', () => {+ it('starts at the shipped width and leaves the stylesheet in charge', () => {+ render(<SidebarResizer />);++ expect(reportedWidth()).toBe(MIN_SIDEBAR_WIDTH);+ expect(publishedWidth()).toBe('');+ });++ it('publishes one width for the sidebar, the content offset and the overlay', () => {+ render(<SidebarResizer />);++ drag(60);++ expect(reportedWidth()).toBe(MIN_SIDEBAR_WIDTH + 60);+ expect(publishedWidth()).toBe(`${MIN_SIDEBAR_WIDTH + 60}px`);+ });++ it('holds the bounds without compounding them across repeated gestures', () => {+ render(<SidebarResizer />);++ // Travel far past the maximum, then back inside the range within the same+ // gesture: the overshoot is not remembered, so the width follows the pointer+ // again from where the bound clamped it.+ fireEvent.pointerDown(separator(), { pointerId: 1, button: 0, clientX: MIN_SIDEBAR_WIDTH });+ fireEvent.pointerMove(separator(), { pointerId: 1, clientX: MIN_SIDEBAR_WIDTH + 900 });+ expect(reportedWidth()).toBe(MAX_SIDEBAR_WIDTH);+ fireEvent.pointerMove(separator(), { pointerId: 1, clientX: MIN_SIDEBAR_WIDTH + 50 });+ expect(reportedWidth()).toBe(MIN_SIDEBAR_WIDTH + 50);+ fireEvent.pointerUp(separator(), { pointerId: 1 });++ // A second gesture that pushes out and a third that pushes in stop at the+ // same two numbers as the first.+ drag(900);+ expect(reportedWidth()).toBe(MAX_SIDEBAR_WIDTH);+ drag(900);+ expect(reportedWidth()).toBe(MAX_SIDEBAR_WIDTH);+ drag(-900);+ expect(reportedWidth()).toBe(MIN_SIDEBAR_WIDTH);+ drag(-900);+ expect(reportedWidth()).toBe(MIN_SIDEBAR_WIDTH);+ drag(900);+ expect(reportedWidth()).toBe(MAX_SIDEBAR_WIDTH);+ });++ it('takes the pointer capture that keeps a drag alive away from the edge', () => {+ render(<SidebarResizer />);++ fireEvent.pointerDown(separator(), { pointerId: 7, button: 0, clientX: MIN_SIDEBAR_WIDTH });++ expect(capture).toHaveBeenCalledWith(7);+ });++ it('ignores a secondary button and a stray move from another pointer', () => {+ render(<SidebarResizer />);++ fireEvent.pointerDown(separator(), { pointerId: 1, button: 2, clientX: MIN_SIDEBAR_WIDTH });+ fireEvent.pointerMove(separator(), { pointerId: 1, clientX: MIN_SIDEBAR_WIDTH + 80 });+ expect(reportedWidth()).toBe(MIN_SIDEBAR_WIDTH);++ fireEvent.pointerDown(separator(), { pointerId: 1, button: 0, clientX: MIN_SIDEBAR_WIDTH });+ fireEvent.pointerMove(separator(), { pointerId: 2, clientX: MIN_SIDEBAR_WIDTH + 80 });+ expect(reportedWidth()).toBe(MIN_SIDEBAR_WIDTH);+ });+});++describe('SidebarResizer gesture end', () => {+ // Non-empty on purpose: the drag borrows the body's cursor and selection, and+ // clearing them instead of giving them back would erase whatever else had set+ // them. Every ending is held to the same restore.+ const borrowedFrom = { cursor: 'progress', userSelect: 'text' };++ beforeEach(() => {+ document.body.style.cursor = borrowedFrom.cursor;+ document.body.style.userSelect = borrowedFrom.userSelect;+ });++ it.each(['pointerUp', 'pointerCancel', 'lostPointerCapture'] as const)(+ 'gives the borrowed cursor and selection back on %s',+ (ending) => {+ render(<SidebarResizer />);++ fireEvent.pointerDown(separator(), { pointerId: 1, button: 0, clientX: MIN_SIDEBAR_WIDTH });+ expect(document.body.style.cursor).toBe('col-resize');+ expect(document.body.style.userSelect).toBe('none');+ expect(separator().getAttribute('data-dragging')).toBe('true');++ fireEvent[ending](separator(), { pointerId: 1 });++ expect(document.body.style.cursor).toBe(borrowedFrom.cursor);+ expect(document.body.style.userSelect).toBe(borrowedFrom.userSelect);+ expect(separator().getAttribute('data-dragging')).toBeNull();++ // The gesture is over, so a late move from the same pointer moves nothing.+ fireEvent.pointerMove(separator(), { pointerId: 1, clientX: MIN_SIDEBAR_WIDTH + 80 });+ expect(reportedWidth()).toBe(MIN_SIDEBAR_WIDTH);+ },+ );++ it('keeps a live drag when another pointer goes down, up or away', () => {+ render(<SidebarResizer />);++ fireEvent.pointerDown(separator(), { pointerId: 1, button: 0, clientX: MIN_SIDEBAR_WIDTH });+ // A second finger neither takes the edge over nor ends what has it.+ fireEvent.pointerDown(separator(), { pointerId: 2, button: 0, clientX: MIN_SIDEBAR_WIDTH + 200 });+ fireEvent.pointerUp(separator(), { pointerId: 2 });+ fireEvent.pointerCancel(separator(), { pointerId: 2 });++ expect(separator().getAttribute('data-dragging')).toBe('true');+ fireEvent.pointerMove(separator(), { pointerId: 1, clientX: MIN_SIDEBAR_WIDTH + 40 });+ expect(reportedWidth()).toBe(MIN_SIDEBAR_WIDTH + 40);++ fireEvent.pointerUp(separator(), { pointerId: 1 });+ expect(separator().getAttribute('data-dragging')).toBeNull();+ expect(document.body.style.cursor).toBe(borrowedFrom.cursor);+ });++ it('ends a live gesture at unmount and hands the width back to the stylesheet', () => {+ const view = render(<SidebarResizer />);++ fireEvent.pointerDown(separator(), { pointerId: 1, button: 0, clientX: MIN_SIDEBAR_WIDTH });+ fireEvent.pointerMove(separator(), { pointerId: 1, clientX: MIN_SIDEBAR_WIDTH + 120 });+ expect(publishedWidth()).toBe(`${MIN_SIDEBAR_WIDTH + 120}px`);++ // What leaving desktop layout, or a standalone app tab taking over, does.+ view.unmount();++ expect(document.body.style.cursor).toBe(borrowedFrom.cursor);+ expect(document.body.style.userSelect).toBe(borrowedFrom.userSelect);+ expect(publishedWidth()).toBe('');+ });+});++describe('SidebarResizer keyboard', () => {+ it('steps within the same bounds and reaches them with Home and End', () => {+ render(<SidebarResizer />);++ fireEvent.keyDown(separator(), { key: 'ArrowRight' });+ const step = reportedWidth() - MIN_SIDEBAR_WIDTH;+ expect(step).toBeGreaterThan(0);+ expect(publishedWidth()).toBe(`${MIN_SIDEBAR_WIDTH + step}px`);++ fireEvent.keyDown(separator(), { key: 'ArrowLeft' });+ expect(reportedWidth()).toBe(MIN_SIDEBAR_WIDTH);+ fireEvent.keyDown(separator(), { key: 'ArrowLeft' });+ expect(reportedWidth()).toBe(MIN_SIDEBAR_WIDTH);++ fireEvent.keyDown(separator(), { key: 'End' });+ expect(reportedWidth()).toBe(MAX_SIDEBAR_WIDTH);+ fireEvent.keyDown(separator(), { key: 'ArrowRight' });+ expect(reportedWidth()).toBe(MAX_SIDEBAR_WIDTH);++ fireEvent.keyDown(separator(), { key: 'Home' });+ expect(reportedWidth()).toBe(MIN_SIDEBAR_WIDTH);+ });++ it('leaves other keys to the page', () => {+ render(<SidebarResizer />);++ const handled = fireEvent.keyDown(separator(), { key: 'ArrowRight' });+ const ignored = fireEvent.keyDown(separator(), { key: 'PageUp' });++ // fireEvent returns false when a handler called preventDefault.+ expect(handled).toBe(false);+ expect(ignored).toBe(true);+ });++ it('describes the range it is adjusting', () => {+ render(<SidebarResizer />);++ const handle = separator();+ expect(handle.getAttribute('aria-orientation')).toBe('vertical');+ expect(handle.getAttribute('aria-label')).toBe('appShell.resizeSidebar');+ expect(handle.getAttribute('aria-valuemin')).toBe(String(MIN_SIDEBAR_WIDTH));+ expect(handle.getAttribute('aria-valuemax')).toBe(String(MAX_SIDEBAR_WIDTH));+ expect(handle.tabIndex).toBe(0);+ });+});diff --git a/ui/src/components/SidebarResizer.tsx b/ui/src/components/SidebarResizer.tsxnew file mode 100644index 000000000..cd2e482de--- /dev/null+++ b/ui/src/components/SidebarResizer.tsx@@ -0,0 +1,148 @@+import React, { useCallback, useEffect, useRef, useState } from 'react';+import { useTranslation } from 'react-i18next';+import clsx from 'clsx';++/** The one width the sidebar, every desktop content offset and the Settings+ * overlay edge read. Declared in `index.css` at MIN_SIDEBAR_WIDTH so the+ * default shell needs no JS; this component overrides it inline while it is+ * mounted, which is also how the value reaches the overlay's portal. */+export const SIDEBAR_WIDTH_VAR = '--app-sidebar-w';+/** The shipped width is the minimum, so the default shell is unchanged. */+export const MIN_SIDEBAR_WIDTH = 248;+export const MAX_SIDEBAR_WIDTH = 496;+const KEYBOARD_STEP = 16;++const clampWidth = (width: number) => (+ Math.min(MAX_SIDEBAR_WIDTH, Math.max(MIN_SIDEBAR_WIDTH, Math.round(width)))+);++// This component is the only writer, so the inline value is either a width it+// set or nothing at all — no need to resolve the stylesheet's own default.+const readWidth = () => {+ const inline = Number.parseFloat(+ document.documentElement.style.getPropertyValue(SIDEBAR_WIDTH_VAR),+ );+ return Number.isFinite(inline) ? clampWidth(inline) : MIN_SIDEBAR_WIDTH;+};++type Gesture = {+ pointerId: number;+ startX: number;+ startWidth: number;+ /** What the body's own inline cursor/selection were before the drag borrowed+ * them, so ending the gesture gives those back instead of erasing them. */+ bodyCursor: string;+ bodyUserSelect: string;+};++/**+ * The sidebar's right divider, made draggable. It draws no handle of its own:+ * the strip is an invisible grab area whose right border lands on the sidebar's+ * own 1px divider, so hover, keyboard focus and an active drag recolor that one+ * line and nothing else.+ */+export const SidebarResizer = () => {+ const { t } = useTranslation();+ const [width, setWidth] = useState(readWidth);+ const [dragging, setDragging] = useState(false);+ const gesture = useRef<Gesture | null>(null);++ const apply = useCallback((next: number) => {+ const clamped = clampWidth(next);+ setWidth(clamped);+ document.documentElement.style.setProperty(SIDEBAR_WIDTH_VAR, `${clamped}px`);+ }, []);++ // Pointer capture is released implicitly on up and cancel, so the only thing a+ // gesture leaves behind is the body styling it borrowed for the drag. Only the+ // pointer that started the drag can end it: a second finger's up or cancel+ // arrives here too, and ending on it would drop a gesture still under way.+ const endGesture = useCallback((event?: React.PointerEvent<HTMLDivElement>) => {+ const active = gesture.current;+ if (!active || (event && event.pointerId !== active.pointerId)) return;+ gesture.current = null;+ setDragging(false);+ document.body.style.cursor = active.bodyCursor;+ document.body.style.userSelect = active.bodyUserSelect;+ }, []);++ // Unmount is also how a gesture ends when the viewport leaves desktop layout:+ // give the borrowed styling back, and the width back to the stylesheet, so one+ // mount's drag cannot leak into a later mount or a standalone app tab.+ useEffect(() => () => {+ endGesture();+ document.documentElement.style.removeProperty(SIDEBAR_WIDTH_VAR);+ }, [endGesture]);++ const onPointerDown = (event: React.PointerEvent<HTMLDivElement>) => {+ // A drag already under way owns the edge; a second pointer neither takes it+ // over nor gets a gesture of its own.+ if (event.button !== 0 || gesture.current) return;+ event.preventDefault();+ // Capture retargets the rest of the gesture here, so the pointer can travel+ // anywhere — over the content, past the window — and still be handled and+ // released by this element.+ event.currentTarget.setPointerCapture(event.pointerId);+ gesture.current = {+ pointerId: event.pointerId,+ startX: event.clientX,+ startWidth: width,+ bodyCursor: document.body.style.cursor,+ bodyUserSelect: document.body.style.userSelect,+ };+ setDragging(true);+ document.body.style.cursor = 'col-resize';+ document.body.style.userSelect = 'none';+ };++ const onPointerMove = (event: React.PointerEvent<HTMLDivElement>) => {+ const active = gesture.current;+ if (!active || active.pointerId !== event.pointerId) return;+ // Measured from this gesture's own start, never from the previous frame, so+ // travel beyond a bound is not remembered and repeated drags cannot compound.+ apply(active.startWidth + event.clientX - active.startX);+ };++ const onKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {+ const next = event.key === 'ArrowLeft' ? width - KEYBOARD_STEP+ : event.key === 'ArrowRight' ? width + KEYBOARD_STEP+ : event.key === 'Home' ? MIN_SIDEBAR_WIDTH+ : event.key === 'End' ? MAX_SIDEBAR_WIDTH+ : null;+ if (next === null) return;+ event.preventDefault();+ apply(next);+ };++ return (+ <div+ role="separator"+ aria-orientation="vertical"+ aria-label={t('appShell.resizeSidebar')}+ aria-valuenow={width}+ aria-valuemin={MIN_SIDEBAR_WIDTH}+ aria-valuemax={MAX_SIDEBAR_WIDTH}+ tabIndex={0}+ // Read by the Settings overlay, which is dismissed by an interaction+ // outside itself and would otherwise close the moment this edge — which+ // its own left edge follows — was grabbed.+ data-sidebar-resizer="true"+ data-dragging={dragging || undefined}+ onPointerDown={onPointerDown}+ onPointerMove={onPointerMove}+ onPointerUp={endGesture}+ onPointerCancel={endGesture}+ onLostPointerCapture={endGesture}+ onKeyDown={onKeyDown}+ // `touch-none` is load-bearing wherever a touchscreen reports the desktop+ // breakpoint — a tablet in landscape, a convertible laptop. Pointer capture+ // does not win the browser's touch-action negotiation, so with the default+ // the native pan claims the finger and cancels the drag part-way.+ className={clsx(+ 'absolute inset-y-0 -right-px z-10 w-2 cursor-col-resize touch-none border-r border-transparent outline-none transition-colors',+ 'hover:border-cyan focus-visible:border-cyan',+ dragging && 'border-cyan',+ )}+ />+ );+};diff --git a/ui/src/components/settings/SettingsOverlayRouteSurface.tsx b/ui/src/components/settings/SettingsOverlayRouteSurface.tsxindex 3d8692d94..c75538872 100644--- a/ui/src/components/settings/SettingsOverlayRouteSurface.tsx+++ b/ui/src/components/settings/SettingsOverlayRouteSurface.tsx@@ -85,22 +85,26 @@ export const SettingsOverlayRouteSurface = ({data-settings-overlay="true"// The overlay covers the work area and stops at the shell sidebar,// which is what keeps the origin project/session visible behind it.- // This overrides the primitive's historical 240 default with- // AppShell's actual `w-[248px]`; it is asserted against the- // sidebar's measured edge rather than restated as a shared token,- // so the two cannot drift apart unnoticed.+ // This overrides the primitive's historical 240 default with the+ // sidebar's own live width: the dialog is portaled outside the+ // shell's subtree, so that document-level custom property is what+ // keeps the two edges together while the sidebar is being dragged.//// Below md the surface is the whole viewport, so the primitive's// left border would draw a hairline down the screen edge and make// Settings-from-home look different from a direct Settings link.// There is no sidebar to divide from until the offset applies.- className="border-l-0 md:left-[248px] md:border-l"+ className="border-l-0 md:left-[var(--app-sidebar-w)] md:border-l"aria-describedby={undefined}onInteractOutside={(event) => {const target = event.target;if (target instanceof Element- && target.closest('[data-settings-toggle="true"]')+ // The toggle closes the overlay itself, and the sidebar's+ // resize edge is not a dismissal at all: it moves this+ // surface's own left edge, so grabbing it must not close what+ // the drag is laying out.+ && target.closest('[data-settings-toggle="true"], [data-sidebar-resizer="true"]')) {event.preventDefault();}diff --git a/ui/src/i18n/en.json b/ui/src/i18n/en.jsonindex 358b695a5..5821d2fbf 100644--- a/ui/src/i18n/en.json+++ b/ui/src/i18n/en.json@@ -2510,7 +2510,8 @@"accountMenuLabel": "Account ({{email}})","signedInAs": "Signed in as","signOut": "Sign out",- "signingOut": "Signing out…"+ "signingOut": "Signing out…",+ "resizeSidebar": "Resize sidebar"},"workbench": {"eyebrow": "Workbench",diff --git a/ui/src/i18n/zh.json b/ui/src/i18n/zh.jsonindex 816a1295b..956e6b014 100644--- a/ui/src/i18n/zh.json+++ b/ui/src/i18n/zh.json@@ -2510,7 +2510,8 @@"accountMenuLabel": "账户({{email}})","signedInAs": "当前登录账户","signOut": "退出登录",- "signingOut": "正在退出…"+ "signingOut": "正在退出…",+ "resizeSidebar": "调整侧栏宽度"},"workbench": {"eyebrow": "工作台",diff --git a/ui/src/index.css b/ui/src/index.cssindex b1d299fce..bab5a9ef8 100644--- a/ui/src/index.css+++ b/ui/src/index.css@@ -35,6 +35,16 @@--mobile-nav-clearance: calc(5.5rem + env(safe-area-inset-bottom));}+/* Width of the desktop shell sidebar. The sidebar itself, every md+ content+ offset and the Settings overlay's left edge read this one value, so dragging+ the divider moves all of them together — including the overlay, which lives in+ a portal outside the shell's subtree. SidebarResizer overrides it on the+ document element while the shell is mounted; this default is its drag minimum+ (MIN_SIDEBAR_WIDTH), so the shell renders unchanged with no JS at all. */+:root {+ --app-sidebar-w: 248px;+}+@theme inline {--color-background: var(--background);--color-foreground: var(--foreground);