From 124aa98341809d9818e773ddeaa3cbdedaf128f8 Mon Sep 17 00:00:00 2001 From: dawn <90008@klbr.net> Date: Tue, 20 Oct 2026 07:57:35 +0300 Subject: [PATCH] web: open sessions glow from the sidebar row's left edge instead of a pill A session open on the board gets a wash of the accent from the row's edge, gone by 40% of its width: a hue over the stripes' tones, under hover's step, moving nothing. --open-wash is 22% in light and 34% in dark, where the rail is near black. Open rows that meet square the corners on the wash's side, so a run of them reads as one; with the sessions on the right, all of it is mirrored. Signed-off-by: dawn <90008@klbr.net> --- robot-docs/web.md | 2 +- web/src/app.css | 3 +++ web/src/lib/Rail.svelte | 40 +++++++++++++++++++++++++++++----------- 3 files changed, 33 insertions(+), 12 deletions(-) diff --git a/robot-docs/web.md b/robot-docs/web.md index cd7f075c..60bffcff 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. Its sections are headed as the terminal heads them, the label in the text colour, its count faint, then a thin rule to the edge (the one place lines separate, as `sectionRule` does in the TUI); 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. +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 sections are headed as the terminal heads them, the label in the text colour, its count faint, then a thin rule to the edge (the one place lines separate, as `sectionRule` does in the TUI); 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 a wash of the accent from the row's left edge (`--open-wash`, 22% in light and 34% in dark, where the rail is near black), gone by 40% of its width (a hue over the stripes' tones, under hover's step); open rows that meet square the corners on that side, so a run of them reads as one; with the sessions on the right, the wash and the squared corners are mirrored. `[` (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 d4bbf6cb..aa5f2b6d 100644 --- a/web/src/app.css +++ b/web/src/app.css @@ -41,6 +41,8 @@ --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))); + /* Where a sidebar row's wash starts, for a session open on the board. */ + --open-wash: color-mix(in oklab, var(--accent) 22%, transparent); --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); @@ -77,6 +79,7 @@ --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))); + --open-wash: color-mix(in oklab, var(--accent) 34%, transparent); } * { diff --git a/web/src/lib/Rail.svelte b/web/src/lib/Rail.svelte index 449b9ad1..2bbee0fb 100644 --- a/web/src/lib/Rail.svelte +++ b/web/src/lib/Rail.svelte @@ -203,17 +203,35 @@ .row:hover { background-image: linear-gradient(var(--selected), var(--selected)); } - /* Open on the board: a pill down the row's own margin, so nothing moves, - inset enough to clear its rounded corners. */ - .row.open::before { - position: absolute; - top: 4px; - bottom: 4px; - left: 1px; - width: 3px; - background: var(--accent); - border-radius: 2px; - content: ''; + /* Open on the board: a wash of the accent from the left edge, fading out + by the middle, so it reads as a hue over the stripes' tones; hovered, + the hover's step lies over it. */ + .row.open { + --open: linear-gradient(90deg, var(--open-wash), transparent 40%); + background-image: var(--open); + } + .row.open:hover { + background-image: linear-gradient(var(--selected), var(--selected)), var(--open); + } + /* Open rows that meet share the edge their wash is on, so a run of them + reads as one; the other side keeps the stripes' corners. */ + .row.open:has(+ .row.open) { + border-bottom-left-radius: 0; + } + .row.open + .row.open { + border-top-left-radius: 0; + } + /* With the sidebar on the right, all of it mirrored. */ + :global([data-sidebar='right']) .row.open { + --open: linear-gradient(270deg, var(--open-wash), transparent 40%); + } + :global([data-sidebar='right']) .row.open:has(+ .row.open) { + border-bottom-right-radius: 0; + border-bottom-left-radius: 7px; + } + :global([data-sidebar='right']) .row.open + .row.open { + border-top-right-radius: 0; + border-top-left-radius: 7px; } .name { grid-area: name; -- knotmirror 0.0.1