From 9d4bee0ce539a9cd0d87f2abb87d3cfb3ed50e1f Mon Sep 17 00:00:00 2001 From: dawn <90008@klbr.net> Date: Tue, 20 Oct 2026 07:49:08 +0300 Subject: [PATCH] web: alternate the sidebar's rows like the phone's, and mark open sessions in the margin Every other row in each sidebar section sits on --rail-stripe, the step the phone's stripes take from their ground (about 1.06:1) taken from the rail's: the phone's own stripe was invisible on the rail in light and lighter than it in dark. Hover lays --selected over a row's own tone, so it is never a stripe's step. An open session was a full-row tint that collided with both; it is now an accent pill down the row's left margin, inset to clear the corners, which moves nothing. Signed-off-by: dawn <90008@klbr.net> --- robot-docs/web.md | 2 +- web/src/app.css | 3 +++ web/src/lib/Rail.svelte | 39 +++++++++++++++++++++++++++++++++++---- 3 files changed, 39 insertions(+), 5 deletions(-) diff --git a/robot-docs/web.md b/robot-docs/web.md index 456d2c508..48744a91d 100644 --- a/robot-docs/web.md +++ b/robot-docs/web.md @@ -13,7 +13,7 @@ In development, `npm run dev` in `web/` proxies `/api` the same way from `$ALBEDO_HOME/daemon.json`, read once at start (only when serving, so a build needs no daemon), dropping `Origin` and `Cookie`. It listens on the local network, open, so other devices at home can try the client; the `Host` it answers is limited to the machine's own name (bare and `.local`) and Tailscale's `*.ts.net`, since the proxy holds the token and a rebound name must not reach it. -Words: a **board** is a named canvas of panels, and the open boards are the tabs along the top (`boards.svelte.ts`). A board holds sessions from any folders. **Workspace** keeps its albedo meaning, a session's folder, and the sidebar shows each session's folder under its name. `[` (shown on the sidebar's toggle, as search shows ⌘K; those key chips sit a 12% step of ink above their button) hides or shows the sidebar; hidden, it pops out floating over the canvas, without animation, as soon as the pointer is within 20 px of the canvas's edge on its side, or further out the faster it is heading there (15 px more per px/ms, up to 50 px), so a flick toward the edge opens it early (`App.svelte`, watched from the canvas so the edge still pans). It stays while the pointer is on it or within 48 px of it, the top bar above it included, or while its filter has focus, and goes 100 ms after the pointer is clearly elsewhere or leaves the page; `/` brings it out the same way with the filter focused (Escape clears it and puts it away), and only focuses the filter when the sidebar is shown. `+` makes a new board; double-click or F2 renames one; closing a tab keeps the board, which the palette reopens (`Open board: `); `Delete board` removes it. The last tab cannot be closed, so there is always a canvas. +Words: a **board** is a named canvas of panels, and the open boards are the tabs along the top (`boards.svelte.ts`). A board holds sessions from any folders. **Workspace** keeps its albedo meaning, a session's folder, and the sidebar shows each session's folder under its name. Its rows alternate as the phone's list does, every other row in a section on `--rail-stripe` (the phone's step from its ground, taken from the rail's, about 1.06:1), hover lays a step over a row's own tone, and a session open on the board has an accent mark in the row's left margin, so neither moves the text nor reads as hover. `[` (shown on the sidebar's toggle, as search shows ⌘K; those key chips sit a 12% step of ink above their button) hides or shows the sidebar; hidden, it pops out floating over the canvas, without animation, as soon as the pointer is within 20 px of the canvas's edge on its side, or further out the faster it is heading there (15 px more per px/ms, up to 50 px), so a flick toward the edge opens it early (`App.svelte`, watched from the canvas so the edge still pans). It stays while the pointer is on it or within 48 px of it, the top bar above it included, or while its filter has focus, and goes 100 ms after the pointer is clearly elsewhere or leaves the page; `/` brings it out the same way with the filter focused (Escape clears it and puts it away), and only focuses the filter when the sidebar is shown. `+` makes a new board; double-click or F2 renames one; closing a tab keeps the board, which the palette reopens (`Open board: `); `Delete board` removes it. The last tab cannot be closed, so there is always a canvas. A board is an open canvas. **Windows** sit anywhere on it; the view pans freely and zooms out to an overview. Svelte Flow draws, drags and resizes the windows; `board.svelte.ts` places new ones (right of the selected window, top-aligned, stepping past overlaps) and owns the viewport. The wheel is handled in `Canvas.svelte` rather than by Svelte Flow, because windows and canvas share the trackpad: a pinch (ctrl-wheel) zooms around the pointer anywhere, a mouse wheel's notch with ctrl or ⌘ by one 10% step (a notch is a jump of 50 px or more, or any line-mode delta, where a pinch moves a few pixels at a time), an up-down scroll over a window that can scroll scrolls it while the zoom is readable (60% and up), so does a sideways scroll over anything under the pointer that scrolls sideways (a diff's code inside Pierre's shadow root, a wide table; found through `composedPath()`), and every other scroll pans. Dragging empty canvas pans; holding Space (unless a text field has focus) or the middle button drags the canvas from anywhere, over windows too, taking the pointer before Svelte Flow or the window sees it, and Space with a double-click anywhere glides the view there, centred at 90% (`Board.centreOn`, 300 ms from the middle of the pane up to 500 ms from a corner), where a plain double-click on empty canvas leaves a note. + and − zoom in and out by 5 points (the buttons too), ⇧1 fits all windows, ⇧0 returns to 100%, M shows an overview map, ⌥←/⌥→ moves between windows. The view controls (zoom, fit, map) in the bottom-right corner, under the overview map when it shows (as wide as the controls, measured, and showing and fading with them), and a card of key hints in the bottom-left as the terminal's footer lists them (space drag, ⌘ scroll zoom, ⇧1, ⌥←→, space double-click to zoom at a spot, double-click for a note; keys muted, what they do faint, dots between), fade in while the view moves and fade out 4 s after it stops; hovering or focusing them keeps them, and once faded they let clicks through to the windows beneath. What a window shows is a **view**, each framed by `nodes/WindowFrame.svelte`: a session's chat, or a review of one turn's changes; files, terminals and agent-made pages are meant to follow. A view opened from a window names it as its `parent`, opens beside it, and the canvas draws a faint dashed line between them (the board derives Svelte Flow edges from those parents; every window carries invisible handles for them). diff --git a/web/src/app.css b/web/src/app.css index 9f01c3836..d4bbf6cbc 100644 --- a/web/src/app.css +++ b/web/src/app.css @@ -39,6 +39,8 @@ --danger: #ce2700; --scrim: color-mix(in oklab, var(--seed-bg) 60%, transparent); --dots: color-mix(in oklab, var(--seed-fg) calc(36% * var(--k)), transparent); + /* The sidebar's stripes: the step the phone's stripes take from its ground, taken from the rail's. */ + --rail-stripe: color-mix(in oklab, var(--rail), var(--shade) calc(3.2% * var(--k))); --minimap-window: var(--field); --minimap-mask: color-mix(in oklab, var(--seed-bg) 65%, transparent); --shade: color-mix(in oklab, var(--seed-fg) 70%, #000); @@ -74,6 +76,7 @@ --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 12px 32px -8px rgb(0 0 0 / 0.6); --shadow-raised: 0 2px 4px rgb(0 0 0 / 0.45), 0 24px 56px -12px rgb(0 0 0 / 0.75); --shadow-lg: 0 4px 12px rgb(0 0 0 / 0.5), 0 32px 80px -16px rgb(0 0 0 / 0.8); + --rail-stripe: color-mix(in oklab, var(--rail), var(--shade) calc(19% * var(--k))); } * { diff --git a/web/src/lib/Rail.svelte b/web/src/lib/Rail.svelte index 66e155e87..0f820fb5e 100644 --- a/web/src/lib/Rail.svelte +++ b/web/src/lib/Rail.svelte @@ -57,7 +57,9 @@