Open-source AI browser agent for Chrome and Firefox (monorepo) π§
JavaScript ai-agentai-agentsai-toolsbrowser-aibrowser-automationbrowser-extensionchrome-aichrome-devtoolschrome-extensionchrome-extensionsfirefox-addonfirefox-addonsfirefox-extensionfirefox-extensionsgemmagemma4minimaxoffline-aioffline-llmqwen
feat(sidepanel): neural brain activity indicator
Claude850caef289c0
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 47ff03b47..e05cdb7f0 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -6,6 +6,9 @@ This changelog was generated from the repository Git history and release tags. V## [Unreleased]+### Changed+- The spinning ring next to "Thinkingβ¦" in the side panel is now a small WebBrain brain drawn as a neural circuit: a signal keeps tracing the W, and the brain's outline lights up as it passes. It moves only while WebBrain is working and the panel is visible, follows the light and dark themes, and holds still when your system asks to reduce motion.+## [42.3.1] - 2026-10-20### Changeddiff --git a/assets/loader-candidates/README.md b/assets/loader-candidates/README.mdnew file mode 100644index 000000000..242542b73--- /dev/null+++ b/assets/loader-candidates/README.md@@ -0,0 +1,77 @@+# Activity indicator candidates++Directions explored for the side panel's working indicator, the animation next to+"Thinkingβ¦". One of them shipped; the others are kept here so they can be reused+elsewhere, such as empty states, onboarding, the website or the companion app.++Open `index.html` in a browser to see all of them animating, large and at their real+size in the activity bar, in the dark and light themes. It has an accent switch+(UI violet, logo pink, mono) and a speed slider. The colors are the side panel's+theme tokens, and the mark is traced from `assets/logo-mark.png`.++## B Β· Nucleus++++The mono mark as a nucleus. Sparks whizz on 3D orbits that slowly precess, passing+behind the brain and back out in front of it; short-lived sparks arrive from random+angles, and at large sizes embers flick off their heads. The mark keeps it+recognizable at 22px. It is the most energetic of the set, which suits short moments+(a model downloading, a cloud run starting) better than a bar that can stay up for+minutes.++## A Β· Neural circuit++++The mark redrawn as neurons: the traced outline, the central fissure, the stem and+the W. Neurons fire and pass signals along the axons in cascades, and a signal keeps+re-tracing the W. Meant for 48px and up, for example an empty chat or onboarding+while models load; below that the circuit turns into noise.++## A Β· W only++++The circuit reduced to its spine for small sizes: the signal runs the W end to end+and its neurons flash. Shown here at 10Γ.++## Shipped: brain outline++The W inside the brain's traced outline, which brightens as the signal passes. The+production code is `src/chrome/src/ui/activity-brain.js` (mirrored in+`src/firefox/`): a trimmed version of `WBLoaders.synapse(β¦, { variant: 'brain' })`+that reads its colors from the theme, runs only while the bar is visible and holds a+still frame under `prefers-reduced-motion`.++## Files++- `index.html`: the demo page.+- `loaders.js`: the canvas engine for every candidate (`WBLoaders.synapse`,+ `WBLoaders.nucleus`), no dependencies. Its header comment lists the options.+- `marks.js`: the mono mark as SVG path data (`WB_MARKS.detail`, `WB_MARKS.small`).+- `webbrain-mark-mono.svg`, `webbrain-mark-mono-small.svg`: the same marks as+ standalone SVGs filled with `currentColor`. The small one opens up the grooves so+ the W still reads at 32px and below.+- `preview-*.gif`: the previews above.++## Using one++```html+<canvas id="loader" style="width: 160px; height: 160px"></canvas>+<script src="marks.js"></script>+<script src="loaders.js"></script>+<script>+ const canvas = document.getElementById('loader');+ // The bitmap sets the pixel density: the engine draws in a 160px layout.+ canvas.width = canvas.height = 160 * Math.max(2, devicePixelRatio);+ const loader = WBLoaders.nucleus(canvas, {+ size: 160, theme: 'dark', mark: WB_MARKS.detail, markSmall: WB_MARKS.small,+ });+ (function loop(now) { loader.frame(now); requestAnimationFrame(loop); })(performance.now());+</script>+```++Before shipping one in the extension, do what `activity-brain.js` does: animate only+while it is visible, hold a still frame under reduced motion, and take its colors+from the theme tokens.diff --git a/assets/loader-candidates/index.html b/assets/loader-candidates/index.htmlnew file mode 100644index 000000000..6156c073f--- /dev/null+++ b/assets/loader-candidates/index.html@@ -0,0 +1,145 @@+<!doctype html>+<html lang="en">+<head>+<meta charset="utf-8">+<meta name="viewport" content="width=device-width, initial-scale=1">+<title>WebBrain activity indicator candidates</title>+<style>+ :root {+ --page: #0f0f1c;+ --ink: #e8e8e8;+ --muted: #a0a0b8;+ --rule: rgba(255, 255, 255, 0.08);+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;+ }+ * { box-sizing: border-box; }+ body { margin: 0; background: var(--page); color: var(--ink); }+ header, section { max-width: 1100px; margin: 0 auto; padding: 32px 24px; }+ header { padding-top: 48px; }+ h1 { margin: 0 0 8px; font-size: 26px; font-weight: 650; }+ h2 { margin: 0 0 4px; font-size: 18px; font-weight: 650; }+ p { margin: 0; color: var(--muted); line-height: 1.5; max-width: 72ch; }+ section { border-top: 1px solid var(--rule); }+ .controls { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 20px; color: var(--muted); font-size: 13px; }+ .controls label { display: flex; align-items: center; gap: 8px; }+ select, input { font: inherit; }+ .stages { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 16px; margin-top: 20px; }+ .stage { display: flex; align-items: center; justify-content: center; min-height: 340px; border-radius: 10px; }+ .stage.small { min-height: 220px; }+ .dark { background: #1a1a2e; }+ .light { background: #f7f1e6; }+ .bars { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(372px, 100%), 1fr)); gap: 16px; margin-top: 16px; }+ .slice { display: flex; align-items: center; justify-content: center; padding: 28px 0; border-radius: 10px; }++ /* The side panel's activity bar, copied from src/chrome/styles/sidepanel.css. */+ .bar { width: 372px; max-width: 100%; display: flex; align-items: center; gap: 8px; padding: 8px 14px; overflow: hidden; }+ .bar.dark { background: #16213e; border-top: 1px solid rgba(255, 255, 255, 0.08); color: #a0a0b8; }+ .bar.light { background: #fffdf8; border-top: 1px solid rgba(89, 55, 25, 0.15); color: #6b5b47; }+ .bar .toggle { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }+ .bar canvas { display: block; flex-shrink: 0; width: 22px; height: 22px; margin: -4px; }+ .bar .label { font-size: 11px; font-weight: 600; line-height: 1.3; white-space: nowrap; }+ .bar .stop { margin-left: auto; display: flex; align-items: center; gap: 4px; background: rgba(244, 67, 54, 0.12); border: 1px solid rgba(244, 67, 54, 0.3); font: inherit; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 6px; }+ .bar.dark .stop { color: #f44336; }+ .bar.light .stop { color: #c5363c; }+</style>+</head>+<body>+<header>+ <h1>Activity indicator candidates</h1>+ <p>Directions explored for the side panel's working indicator, kept for reuse elsewhere (empty states, onboarding, the website, the companion app). The brain-outline version at the bottom is the one that shipped; its production code is <code>src/<browser>/src/ui/activity-brain.js</code>.</p>+ <div class="controls">+ <label>Accent+ <select id="accent">+ <option value="violet">UI violet</option>+ <option value="pink">Logo pink</option>+ <option value="mono">Mono</option>+ </select>+ </label>+ <label>Speed <input id="speed" type="range" min="0.5" max="2" step="0.1" value="1"></label>+ </div>+</header>++<section>+ <h2>B Β· Nucleus</h2>+ <p>The mono mark as a nucleus. Sparks whizz on precessing 3D orbits, passing behind the brain and back out in front of it; short-lived sparks arrive from random angles, and at large sizes embers flick off the heads.</p>+ <div class="stages">+ <div class="stage dark"><canvas data-kind="nucleus" data-theme="dark" data-size="320"></canvas></div>+ <div class="stage light"><canvas data-kind="nucleus" data-theme="light" data-size="320"></canvas></div>+ </div>+ <div class="bars">+ <div class="slice dark"><div class="bar dark"><span class="toggle"><canvas data-kind="nucleus" data-theme="dark" data-size="22"></canvas><span class="label">Thinking...</span></span><span class="stop">Stop</span></div></div>+ <div class="slice light"><div class="bar light"><span class="toggle"><canvas data-kind="nucleus" data-theme="light" data-size="22"></canvas><span class="label">Thinking...</span></span><span class="stop">Stop</span></div></div>+ </div>+</section>++<section>+ <h2>A Β· Neural circuit</h2>+ <p>The mark redrawn as neurons: the traced outline, the central fissure, the stem and the W. Neurons fire and pass signals along the axons in cascades, and a signal keeps re-tracing the W. Large sizes only; below 48px it falls back to the variants underneath.</p>+ <div class="stages">+ <div class="stage dark"><canvas data-kind="synapse" data-theme="dark" data-size="320"></canvas></div>+ <div class="stage light"><canvas data-kind="synapse" data-theme="light" data-size="320"></canvas></div>+ </div>+</section>++<section>+ <h2>A Β· W only (1Γ)</h2>+ <p>The circuit reduced to its spine. Shown 8Γ and in the bar at its real size.</p>+ <div class="stages">+ <div class="stage small dark"><canvas data-kind="synapse" data-variant="w" data-theme="dark" data-size="22" data-zoom="8"></canvas></div>+ <div class="stage small light"><canvas data-kind="synapse" data-variant="w" data-theme="light" data-size="22" data-zoom="8"></canvas></div>+ </div>+ <div class="bars">+ <div class="slice dark"><div class="bar dark"><span class="toggle"><canvas data-kind="synapse" data-variant="w" data-theme="dark" data-size="22"></canvas><span class="label">Thinking...</span></span><span class="stop">Stop</span></div></div>+ <div class="slice light"><div class="bar light"><span class="toggle"><canvas data-kind="synapse" data-variant="w" data-theme="light" data-size="22"></canvas><span class="label">Thinking...</span></span><span class="stop">Stop</span></div></div>+ </div>+</section>++<section>+ <h2>Shipped Β· brain outline (1Γ)</h2>+ <p>The W inside the brain's traced outline; the outline brightens as the signal passes. For reference next to the candidates.</p>+ <div class="stages">+ <div class="stage small dark"><canvas data-kind="synapse" data-variant="brain" data-theme="dark" data-size="22" data-zoom="8"></canvas></div>+ <div class="stage small light"><canvas data-kind="synapse" data-variant="brain" data-theme="light" data-size="22" data-zoom="8"></canvas></div>+ </div>+</section>++<script src="marks.js"></script>+<script src="loaders.js"></script>+<script>+(function () {+ const canvases = Array.from(document.querySelectorAll('canvas[data-kind]'));+ const accent = document.getElementById('accent');+ const speed = document.getElementById('speed');+ let engines = [];++ function build() {+ const density = Math.max(2, window.devicePixelRatio || 1);+ engines = canvases.map((canvas, i) => {+ const size = Number(canvas.dataset.size);+ const zoom = Number(canvas.dataset.zoom || 1);+ canvas.style.width = canvas.style.height = `${size * zoom}px`;+ canvas.width = canvas.height = Math.round(size * zoom * density);+ return window.WBLoaders[canvas.dataset.kind](canvas, {+ size,+ theme: canvas.dataset.theme,+ variant: canvas.dataset.variant,+ color: accent.value,+ speed: Number(speed.value),+ seed: 3 + i,+ mark: window.WB_MARKS.detail,+ markSmall: window.WB_MARKS.small,+ });+ });+ }++ accent.addEventListener('change', build);+ speed.addEventListener('change', build);+ build();+ (function loop(now) {+ engines.forEach((engine) => engine.frame(now));+ requestAnimationFrame(loop);+ })(performance.now());+})();+</script>+</body>+</html>diff --git a/assets/loader-candidates/loaders.js b/assets/loader-candidates/loaders.jsnew file mode 100644index 000000000..28b8b3cf8--- /dev/null+++ b/assets/loader-candidates/loaders.js@@ -0,0 +1,565 @@+/* WebBrain activity-indicator candidates (canvas 2D, no dependencies).+ *+ * WBLoaders.synapse(canvas, opts) neurons firing; a signal keeps re-tracing the W.+ * size β₯ 48 the mark redrawn as a neural circuit (outline, fissure, stem, W)+ * size < 48 opts.variant 'w' (default): the W alone+ * opts.variant 'brain': the W inside the traced brain outline+ * (this one shipped: src/<browser>/src/ui/activity-brain.js)+ * WBLoaders.nucleus(canvas, opts) the mono mark as a nucleus, sparks whizzing on+ * precessing 3D orbits that pass behind and in front of it, plus short-lived+ * sparks from random angles and embers at large sizes ("nuclear").+ *+ * opts: { size (CSS px the drawing is laid out for), theme: 'dark' | 'light',+ * color: 'violet' | 'pink' | 'mono', speed (1 = normal), seed,+ * nucleus only: orbits (default 3), mark, markSmall (SVG path data,+ * viewBox 0 0 100 100; see marks.js) }+ * The canvas's bitmap width / size sets the pixel density, so give it+ * width = height = size Γ devicePixelRatio (or more).+ * Each call returns { frame(now) }: call it from requestAnimationFrame.+ */+(function (global) {+ const TAU = Math.PI * 2;+ const clamp = (v, a, b) => Math.max(a, Math.min(b, v));+ const rgba = (c, a) => 'rgba(' + c[0] + ',' + c[1] + ',' + c[2] + ',' + clamp(a, 0, 1).toFixed(3) + ')';+ const mix = (a, b, t) => [a[0] + (b[0] - a[0]) * t, a[1] + (b[1] - a[1]) * t, a[2] + (b[2] - a[2]) * t].map(Math.round);+ function rng(seed) {+ let a = seed | 0;+ return function () {+ a = (a + 0x6d2b79f5) | 0;+ let t = Math.imul(a ^ (a >>> 15), 1 | a);+ t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t;+ return ((t ^ (t >>> 14)) >>> 0) / 4294967296;+ };+ }++ // Colors from sidepanel.css tokens (dark = :root, light = [data-theme=light]).+ const THEMES = {+ dark: { ink: [232, 232, 232], line: [160, 160, 184], dark: true },+ light: { ink: [44, 24, 16], line: [107, 91, 71], dark: false },+ };+ const PALETTES = {+ violet: { dark: { a: [124, 116, 255], hot: [240, 238, 255] }, light: { a: [91, 82, 232], hot: [52, 42, 190] } },+ pink: { dark: { a: [255, 92, 157], hot: [255, 238, 245] }, light: { a: [214, 51, 120], hot: [150, 20, 80] } },+ mono: { dark: { a: [196, 196, 220], hot: [255, 255, 255] }, light: { a: [107, 91, 71], hot: [44, 24, 16] } },+ };++ // Tapered ribbon through pts[s..e] (head first), filled with a headβtail gradient.+ // Smooth where stroked segments would show joints.+ function ribbon(ctx, pts, s, e, wFn, aFn, colFn) {+ if (e - s < 1) return;+ const Lx = [], Ly = [], Rx = [], Ry = [];+ for (let i = s; i <= e; i++) {+ const p0 = pts[Math.max(0, i - 1)], p1 = pts[Math.min(pts.length - 1, i + 1)];+ let tx = p1[0] - p0[0], ty = p1[1] - p0[1];+ const tl = Math.hypot(tx, ty) || 1;+ tx /= tl; ty /= tl;+ const hw = wFn(i) / 2;+ Lx.push(pts[i][0] - ty * hw); Ly.push(pts[i][1] + tx * hw);+ Rx.push(pts[i][0] + ty * hw); Ry.push(pts[i][1] - tx * hw);+ }+ ctx.beginPath();+ ctx.moveTo(Lx[0], Ly[0]);+ for (let i = 1; i < Lx.length; i++) ctx.lineTo(Lx[i], Ly[i]);+ for (let i = Rx.length - 1; i >= 0; i--) ctx.lineTo(Rx[i], Ry[i]);+ ctx.closePath();+ const m = Math.round((s + e) / 2);+ const g = ctx.createLinearGradient(pts[s][0], pts[s][1], pts[e][0], pts[e][1]);+ g.addColorStop(0, rgba(colFn(s), aFn(s)));+ if (m > s && m < e) g.addColorStop(0.5, rgba(colFn(m), aFn(m)));+ g.addColorStop(1, rgba(colFn(e), aFn(e)));+ ctx.fillStyle = g;+ ctx.fill();+ }++ function glowDot(ctx, x, y, r, core, halo, a) {+ const g = ctx.createRadialGradient(x, y, 0, x, y, r);+ g.addColorStop(0, rgba(core, a));+ g.addColorStop(0.25, rgba(halo, a * 0.7));+ g.addColorStop(1, rgba(halo, 0));+ ctx.fillStyle = g;+ ctx.beginPath();+ ctx.arc(x, y, r, 0, TAU);+ ctx.fill();+ }++ /* βββββββββββββββββββββββββ A Β· SΔ°NAPS βββββββββββββββββββββββββ */+ function synapse(canvas, o) {+ const size = o.size;+ const themeName = o.theme || 'dark';+ const T = THEMES[themeName];+ const C = PALETTES[o.color || 'violet'][themeName];+ const ctx = canvas.getContext('2d');+ const dpr = canvas.width / size;+ const rnd = rng(o.seed || 11);+ const small = size < 48;+ const speed = o.speed || 1;++ // The WebBrain mark redrawn as a neural circuit, in the mark's own unit space+ // (x right, y down, brain spans x β1β¦1): 0-4 the W the signal keeps tracing,+ // 5-22 neurons sampled along the traced brain outline, 23 the central fissure,+ // 24-27 interior neurons, 28-29 the brainstem.+ const HERO_NODES = [+ [-0.66, -0.38], [-0.34, 0.3], [0, -0.1], [0.34, 0.3], [0.66, -0.38],+ [0, -0.77], [-0.29, -0.79], [-0.55, -0.65], [-0.76, -0.44], [-0.89, -0.17], [-0.92, 0.12], [-0.76, 0.37], [-0.52, 0.53], [-0.22, 0.57],+ [0, 0.44], [0.22, 0.57], [0.52, 0.54], [0.75, 0.38], [0.91, 0.13], [0.89, -0.17], [0.76, -0.44], [0.55, -0.65], [0.29, -0.79],+ [0, -0.44], [-0.36, -0.5], [0.36, -0.5], [-0.62, 0.12], [0.62, 0.12], [0, 0.64], [0, 0.82],+ ];+ const HERO_EDGES = [+ [23, 5], [23, 2], [24, 7], [24, 23], [24, 0], [25, 21], [25, 23], [25, 4],+ [26, 10], [26, 11], [26, 1], [26, 9], [27, 18], [27, 17], [27, 3], [27, 19],+ [0, 8], [4, 20], [1, 13], [3, 15], [14, 28], [28, 29],+ ];+ const W_SMALL = [[-0.84, -0.52], [-0.42, 0.5], [0, -0.1], [0.42, 0.5], [0.84, -0.52]];+ // 1Γ brain variant: the brain's own lobed outline (traced from the mark, 72 points),+ // the central fissure and the stem drawn as anatomy; the W and six surface neurons fire.+ const BRAIN_OUTLINE = [0.00, -0.82, -0.07, -0.87, -0.15, -0.89, -0.24, -0.88, -0.31, -0.84, -0.38, -0.79, -0.47, -0.79, -0.54, -0.75, -0.60, -0.69, -0.65, -0.63, -0.73, -0.59, -0.79, -0.53, -0.83, -0.46, -0.84, -0.37, -0.91, -0.32, -0.95, -0.25, -0.97, -0.16, -0.95, -0.08, -0.97, -0.01, -1.00, 0.07, -0.99, 0.16, -0.96, 0.23, -0.90, 0.28, -0.86, 0.35, -0.82, 0.43, -0.75, 0.47, -0.66, 0.48, -0.61, 0.53, -0.56, 0.60, -0.49, 0.64, -0.40, 0.65, -0.31, 0.65, -0.23, 0.63, -0.22, 0.55, -0.15, 0.51, -0.06, 0.51, 0.00, 0.47, 0.07, 0.51, 0.16, 0.51, 0.22, 0.55, 0.23, 0.63, 0.32, 0.65, 0.41, 0.65, 0.49, 0.63, 0.56, 0.59, 0.61, 0.52, 0.66, 0.47, 0.74, 0.47, 0.82, 0.43, 0.86, 0.35, 0.89, 0.28, 0.96, 0.23, 0.99, 0.16, 1.00, 0.07, 0.97, -0.01, 0.95, -0.08, 0.97, -0.16, 0.95, -0.25, 0.90, -0.32, 0.84, -0.37, 0.83, -0.46, 0.79, -0.53, 0.73, -0.59, 0.65, -0.63, 0.60, -0.69, 0.54, -0.75, 0.47, -0.79, 0.38, -0.79, 0.31, -0.85, 0.24, -0.88, 0.15, -0.89, 0.07, -0.87];+ const brainSmall = small && o.variant === 'brain';+ const SURFACE = [6, 18, 30, 42, 54, 66];+ const layout = small+ ? (brainSmall ? HERO_NODES.slice(0, 5).concat(SURFACE.map(function (k) { return [BRAIN_OUTLINE[2 * k], BRAIN_OUTLINE[2 * k + 1]]; })) : W_SMALL)+ : HERO_NODES;+ const half = small ? size * (brainSmall ? 0.42 : 0.4) : size * 0.42;+ const cx = size / 2, cy = size / 2 + (small ? 0 : size * 0.01);+ const nodes = layout.map(function (p, i) {+ return {+ x0: cx + p[0] * half, y0: cy + p[1] * half,+ x: 0, y: 0, edges: [], last: -9, flash: 0, ringAge: 9, dend: [],+ k: small ? (brainSmall && i >= 5 ? 0.6 : 1) : i < 5 ? 1.15 : 0.75 + rnd() * 0.45, ph: rnd() * TAU, spine: i < 5,+ };+ });+ nodes.forEach(function (n) { n.x = n.x0; n.y = n.y0; });+ const ocx = cx, ocy = cy - 0.12 * half; // outline centre, for outward lobes++ const edges = [];+ function addEdge(i, j, kind) {+ const a = nodes[i], b = nodes[j];+ const len = Math.hypot(b.x0 - a.x0, b.y0 - a.y0);+ let bx, by;+ if (kind === 'outline') {+ const mx = (a.x0 + b.x0) / 2 - ocx, my = (a.y0 + b.y0) / 2 - ocy;+ const ml = Math.hypot(mx, my) || 1;+ bx = (mx / ml) * len * 0.2; by = (my / ml) * len * 0.2;+ } else {+ const nx = -(b.y0 - a.y0) / len, ny = (b.x0 - a.x0) / len;+ const bend = kind === 'straight' ? 0 : (rnd() - 0.5) * (kind === 'spine' ? 0.14 : 0.42) * len;+ bx = nx * bend; by = ny * bend;+ }+ edges.push({ a: i, b: j, bx: bx, by: by, glow: 0, len: len * 1.04, spine: kind === 'spine', outline: kind === 'outline' });+ nodes[i].edges.push(edges.length - 1);+ nodes[j].edges.push(edges.length - 1);+ return edges.length - 1;+ }+ const spineEdge = [];+ for (let i = 0; i < 4; i++) spineEdge.push(addEdge(i, i + 1, 'spine'));+ const outlinePx = [];+ if (brainSmall) for (let i = 0; i < BRAIN_OUTLINE.length; i += 2) outlinePx.push([cx + BRAIN_OUTLINE[i] * half, cy + BRAIN_OUTLINE[i + 1] * half]);+ let brainGlow = 0;+ if (!small) {+ for (let i = 0; i < 18; i++) addEdge(5 + i, 5 + ((i + 1) % 18), 'outline');+ HERO_EDGES.forEach(function (e) { addEdge(e[0], e[1], 'inner'); });+ nodes.forEach(function (n) {+ const cnt = 2 + Math.floor(rnd() * 2);+ for (let q = 0; q < cnt; q++) {+ const ang = rnd() * TAU;+ const L = size * (0.022 + rnd() * 0.028);+ const bend = (rnd() - 0.5) * 0.9;+ n.dend.push({ dx: Math.cos(ang) * L, dy: Math.sin(ang) * L, cx: Math.cos(ang + bend) * L * 0.55, cy: Math.sin(ang + bend) * L * 0.55 });+ }+ });+ }++ function qpt(e, s) {+ const a = nodes[e.a], b = nodes[e.b], u = 1 - s;+ const ccx = (a.x + b.x) / 2 + e.bx, ccy = (a.y + b.y) / 2 + e.by;+ return [u * u * a.x + 2 * u * s * ccx + s * s * b.x, u * u * a.y + 2 * u * s * ccy + s * s * b.y];+ }++ const pulses = [];+ const REFRACT = small ? 0.35 : 0.5;+ const MAXP = small ? 4 : 12;+ const unit = half; // px per unit+ let nextSpont = 0.25;+ let nextSweep = small ? 0.1 : 0.6;+ let sweepDir = 1;++ function spawn(ei, from, v, route) {+ pulses.push({ e: ei, from: from, s: route ? 0 : -rnd() * 0.08, v: v / edges[ei].len, route: route || null });+ }+ function fire(ni, fromEdge, t, branch) {+ const n = nodes[ni];+ const fresh = t - n.last >= REFRACT;+ if (!fresh && !branch) return;+ n.last = t;+ n.flash = 1;+ if (fromEdge === -1) n.ringAge = 0; // ripple only where a spike originates+ if (!fresh || small) return;+ const p = pulses.length >= MAXP ? 0.1 : pulses.length < 3 ? 0.8 : 0.5;+ n.edges.forEach(function (ei) {+ if (ei === fromEdge || edges[ei].spine) return;+ if (rnd() < p) spawn(ei, ni, unit * 2.1 * (0.8 + rnd() * 0.45));+ });+ }++ let t = 0;+ let lastNow = null;+ function frame(now) {+ const dt = lastNow == null ? 0.016 : clamp((now - lastNow) / 1000, 0, 0.05) * speed;+ lastNow = now;+ t += dt;++ if (!small) nodes.forEach(function (n) { n.x = n.x0 + Math.sin(t * 0.7 + n.ph) * size * 0.004; n.y = n.y0 + Math.cos(t * 0.55 + n.ph * 1.3) * size * 0.004; });++ // the W sweep: a signal runs the spine end to end, alternating direction+ if (t >= nextSweep) {+ const route = sweepDir > 0 ? [0, 1, 2, 3, 4] : [4, 3, 2, 1, 0];+ sweepDir = -sweepDir;+ fire(route[0], -1, t, true);+ brainGlow = 1;+ const ei = spineEdge[sweepDir < 0 ? 0 : 3];+ spawn(ei, route[0], unit * (small ? 4.6 : 3.4), { path: route, i: 1 });+ nextSweep = t + (small ? 1.55 : 2.3);+ }+ if (t >= nextSpont) {+ const pool = nodes.length;+ fire(Math.floor(rnd() * pool), -1, t, false);+ nextSpont = t + (small ? 0.35 + rnd() * 0.5 : (pulses.length > 4 ? 0.5 : 0.14) + rnd() * 0.36);+ }+ for (let i = pulses.length - 1; i >= 0; i--) {+ const p = pulses[i];+ p.s += p.v * dt;+ const e = edges[p.e];+ if (p.s > 0) e.glow = Math.max(e.glow, p.route ? 1 : 0.85);+ if (p.s >= 1) {+ pulses.splice(i, 1);+ const to = e.a === p.from ? e.b : e.a;+ if (p.route) {+ fire(to, p.e, t, true);+ const r = p.route;+ if (r.i < r.path.length - 1) {+ const nxt = r.path[r.i + 1];+ const ei = spineEdge[Math.min(to, nxt)];+ pulses.push({ e: ei, from: to, s: p.s - 1, v: (p.v * e.len) / edges[ei].len, route: { path: r.path, i: r.i + 1 } });+ }+ } else fire(to, p.e, t, false);+ }+ }+ const fd = Math.exp(-dt / 0.2), gd = Math.exp(-dt / (small ? 0.38 : 0.45));+ nodes.forEach(function (n) { n.flash *= fd; n.ringAge += dt; });+ edges.forEach(function (e) { e.glow *= gd; });+ brainGlow *= Math.exp(-dt / 0.7);++ // ββ draw+ ctx.setTransform(dpr, 0, 0, dpr, 0, 0);+ ctx.clearRect(0, 0, size, size);+ ctx.lineCap = 'round';+ const lw = small ? 0.9 : clamp(size * 0.004, 0.6, 1.5);+ const baseA = T.dark ? (small ? 0.3 : 0.15) : small ? 0.36 : 0.2;+ const spineA = T.dark ? (small ? 0.46 : 0.3) : small ? 0.52 : 0.36;+ const outlineA = T.dark ? 0.21 : 0.27;++ if (brainSmall) {+ const top = outlinePx[0], bot = outlinePx[36];+ ctx.beginPath();+ ctx.moveTo(outlinePx[0][0], outlinePx[0][1]);+ for (let i = 1; i < outlinePx.length; i++) ctx.lineTo(outlinePx[i][0], outlinePx[i][1]);+ ctx.closePath();+ ctx.moveTo(top[0], top[1] + half * 0.05);+ ctx.lineTo(nodes[2].x, nodes[2].y);+ ctx.lineJoin = 'round';+ ctx.strokeStyle = rgba(T.line, T.dark ? 0.4 : 0.46);+ ctx.lineWidth = 0.8;+ ctx.stroke();+ if (brainGlow > 0.02) {+ ctx.strokeStyle = rgba(C.a, brainGlow * (T.dark ? 0.45 : 0.4));+ ctx.stroke();+ }+ ctx.beginPath();+ ctx.moveTo(bot[0], bot[1] + half * 0.04);+ ctx.lineTo(cx, cy + half * 0.84);+ ctx.strokeStyle = rgba(T.line, T.dark ? 0.4 : 0.46);+ ctx.lineWidth = 1.7;+ ctx.stroke();+ }+ edges.forEach(function (e) {+ const a = nodes[e.a], b = nodes[e.b];+ ctx.beginPath();+ ctx.moveTo(a.x, a.y);+ ctx.quadraticCurveTo((a.x + b.x) / 2 + e.bx, (a.y + b.y) / 2 + e.by, b.x, b.y);+ ctx.strokeStyle = rgba(T.line, e.spine ? spineA : e.outline ? outlineA : baseA);+ ctx.lineWidth = e.spine ? lw * 1.15 : lw;+ ctx.stroke();+ if (e.glow > 0.02) {+ ctx.strokeStyle = rgba(C.a, e.glow * (T.dark ? 0.6 : 0.55));+ ctx.lineWidth = lw * (e.spine ? 1.5 : 1.25);+ ctx.stroke();+ }+ });+ nodes.forEach(function (n) {+ n.dend.forEach(function (d) {+ ctx.beginPath();+ ctx.moveTo(n.x, n.y);+ ctx.quadraticCurveTo(n.x + d.cx, n.y + d.cy, n.x + d.dx, n.y + d.dy);+ ctx.strokeStyle = n.flash > 0.05 ? rgba(mix(T.line, C.a, n.flash), baseA + n.flash * 0.6) : rgba(T.line, baseA);+ ctx.lineWidth = lw * 0.8;+ ctx.stroke();+ });+ });++ const add = T.dark ? 'lighter' : 'source-over';+ ctx.globalCompositeOperation = add;+ const tailPx = small ? size * 0.3 : size * 0.12;+ const headR = small ? 2.1 : clamp(size * 0.022, 1.5, 6);+ pulses.forEach(function (p) {+ if (p.s <= 0) return;+ const e = edges[p.e];+ const fwd = e.a === p.from;+ const sH = fwd ? p.s : 1 - p.s;+ const span = tailPx / e.len;+ const N = small ? 5 : 8;+ const pts = [qpt(e, sH)];+ for (let k2 = 1; k2 <= N; k2++) {+ const sk = fwd ? sH - (span * k2) / N : sH + (span * k2) / N;+ if (sk < 0 || sk > 1) break;+ pts.push(qpt(e, sk));+ }+ if (pts.length > 1) {+ ribbon(ctx, pts, 0, pts.length - 1,+ function (i) { return lw * (2.4 - 1.8 * (i / N)); },+ function (i) { return (1 - i / N) * 0.9; },+ function (i) { return mix(C.hot, C.a, i / N); });+ }+ glowDot(ctx, pts[0][0], pts[0][1], headR * (T.dark ? 1.7 : 1.3), C.hot, C.a, T.dark ? 1 : 0.9);+ });++ const rb = small ? 1.05 : clamp(size * 0.012, 0.85, 3.4);+ nodes.forEach(function (n) {+ const f = n.flash;+ const r = rb * n.k;+ ctx.globalCompositeOperation = add;+ if (f > 0.03) {+ glowDot(ctx, n.x, n.y, r * (small ? 2.6 + 3.2 * f : 3.2 + 6.5 * f), C.hot, C.a, (T.dark ? 0.9 : 0.42) * f);+ if (!small && n.ringAge < 0.55) {+ const ra = n.ringAge / 0.55;+ ctx.beginPath();+ ctx.arc(n.x, n.y, r * 2 + ra * size * (T.dark ? 0.085 : 0.06), 0, TAU);+ ctx.strokeStyle = rgba(C.a, (1 - ra) * (1 - ra) * (T.dark ? 0.55 : 0.35));+ ctx.lineWidth = Math.max(0.6, size * 0.003);+ ctx.stroke();+ }+ }+ ctx.globalCompositeOperation = 'source-over';+ ctx.beginPath();+ ctx.arc(n.x, n.y, r * (1 + 0.5 * f), 0, TAU);+ ctx.fillStyle = f > 0.05+ ? rgba(mix(T.line, C.hot, Math.min(1, f * 1.4)), 0.6 + 0.4 * f)+ : rgba(T.line, T.dark ? (n.spine ? 0.72 : brainSmall ? 0.32 : 0.5) : n.spine ? 0.75 : brainSmall ? 0.38 : 0.55);+ ctx.fill();+ });+ ctx.globalCompositeOperation = 'source-over';+ }+ return { frame: frame };+ }++ /* βββββββββββββββββββββββββ B Β· ΓEKΔ°RDEK βββββββββββββββββββββββββ */+ function nucleus(canvas, o) {+ const size = o.size;+ const themeName = o.theme || 'dark';+ const T = THEMES[themeName];+ const C = PALETTES[o.color || 'violet'][themeName];+ const ctx = canvas.getContext('2d');+ const dpr = canvas.width / size;+ const rnd = rng(o.seed || 5);+ const small = size < 48;+ const speed = o.speed || 1;+ const mark = new Path2D(small ? o.markSmall || o.mark : o.mark);+ const markPx = size * (small ? 0.62 : 0.46);+ const R = size * (small ? 0.44 : 0.4);+ const cx = size / 2, cy = size / 2;+ const count = o.orbits || 3;++ // persistent orbits (atom-like, 180Β°/n apart, precessing together)+ const orbits = [];+ for (let i = 0; i < count; i++) {+ orbits.push({+ inc: 1.2 + (rnd() - 0.5) * 0.12,+ phi0: (i * Math.PI) / count + 0.35,+ w: TAU * (1.15 + rnd() * 0.55) * (i % 2 ? -1 : 1),+ th0: rnd() * TAU,+ prec: 0.32,+ wob: rnd() * TAU,+ });+ }+ const transients = []; // short-lived sparks on random planes β "from every angle"+ let nextT = 0.4;+ const embers = [];++ function pos(ob, tt) {+ const th = ob.th0 + ob.w * tt;+ const inc = ob.inc + 0.14 * Math.sin(tt * 0.9 + ob.wob);+ const phi = ob.phi0 + ob.prec * tt;+ const x = R * Math.cos(th), y = R * Math.sin(th);+ const y2 = y * Math.cos(inc), z = y * Math.sin(inc);+ return [cx + x * Math.cos(phi) - y2 * Math.sin(phi), cy + x * Math.sin(phi) + y2 * Math.cos(phi), z / R];+ }++ let t = 0;+ let lastNow = null;+ const J = small ? 10 : 18;+ const DT = small ? 0.014 : 0.011;+ const w0 = small ? 1.5 : clamp(size * 0.032, 1.2, 4.6);+ const headR = small ? 2.1 : clamp(size * 0.03, 1.7, 7.5);+ const add = T.dark ? 'lighter' : 'source-over';++ function depthA(z) { return z < 0 ? 0.3 + 0.42 * (1 + z) : 0.86 + 0.14 * z; }+ function depthW(z) { return z < 0 ? 0.76 + 0.16 * (1 + z) : 1 + 0.22 * z; }++ // one spark = head + J trail samples; segments are split into back/front runs by depth+ function drawSpark(sp, front, overMark) {+ const P = sp.pts;+ let s = -1;+ for (let j = 0; j < J; j++) {+ const zf = (P[j][2] + P[j + 1][2]) / 2 >= 0;+ if (zf === front) { if (s < 0) s = j; }+ if ((zf !== front || j === J - 1) && s >= 0) {+ const e = zf === front ? j + 1 : j;+ run(P, s, e, sp.env, overMark);+ s = -1;+ }+ }+ }+ function run(P, s, e, env, overMark) {+ const u = function (i) { return i / J; };+ const aF = function (i) { return Math.pow(1 - u(i), 1.5) * depthA(P[i][2]) * env; };+ const wF = function (i) { return (w0 * Math.pow(1 - u(i), 0.8) + 0.3) * depthW(P[i][2]); };+ if (overMark) {+ ribbon(ctx, P, s, e, function (i) { return wF(i) * 1.15; }, function (i) { return aF(i) * 0.95; }, function () { return C.a; });+ return;+ }+ if (T.dark) ribbon(ctx, P, s, e, function (i) { return wF(i) * 3.4; }, function (i) { return aF(i) * 0.2; }, function () { return C.a; });+ ribbon(ctx, P, s, e, wF, function (i) { return aF(i) * (T.dark ? 0.95 : 0.9); }, function (i) { return mix(C.hot, C.a, Math.min(1, u(i) * 1.7)); });+ }+ function drawHead(sp, k) {+ const p = sp.pts[0];+ glowDot(ctx, p[0], p[1], headR * depthW(p[2]) * (T.dark ? 1.3 : 1.05) * k, C.hot, C.a, depthA(p[2]) * sp.env);+ }+ function drawEmber(e) {+ const k = 1 - e.age / e.life;+ ctx.beginPath();+ ctx.arc(e.x, e.y, e.r * (0.4 + 0.6 * k), 0, TAU);+ ctx.fillStyle = rgba(T.dark ? mix(C.hot, C.a, 1 - k) : C.a, k * k * (e.z < 0 ? 0.4 : 0.85) * (T.dark ? 1 : 0.6));+ ctx.fill();+ }+ function markTransform() {+ ctx.translate(cx - markPx / 2, cy - markPx / 2);+ ctx.scale(markPx / 100, markPx / 100);+ }++ function frame(now) {+ const dt = lastNow == null ? 0.016 : clamp((now - lastNow) / 1000, 0, 0.05) * speed;+ lastNow = now;+ t += dt;++ if (t >= nextT) {+ transients.push({+ inc: 0.3 + rnd() * 1.15,+ phi0: rnd() * TAU,+ w: TAU * (1.35 + rnd() * 0.7) * (rnd() < 0.5 ? -1 : 1),+ th0: rnd() * TAU,+ prec: (rnd() - 0.5) * 0.6,+ wob: rnd() * TAU,+ born: t,+ life: 0.75 + rnd() * 0.6,+ });+ nextT = t + (small ? 0.95 : 0.5) + rnd() * (small ? 0.8 : 0.6);+ }+ for (let i = transients.length - 1; i >= 0; i--) if (t - transients[i].born > transients[i].life) transients.splice(i, 1);++ const sparks = [];+ function sample(ob, tt, env) {+ const pts = [];+ for (let j = 0; j <= J; j++) pts.push(pos(ob, tt - j * DT));+ sparks.push({ pts: pts, env: env, k: small ? 1 : 0.82 + Math.random() * 0.36 });+ }+ orbits.forEach(function (ob) { sample(ob, t, 1); });+ transients.forEach(function (ob) {+ const age = t - ob.born;+ sample(ob, age, Math.pow(Math.sin((Math.PI * age) / ob.life), 0.7));+ });++ // embers flick off the heads (hero size only)+ if (!small) {+ sparks.forEach(function (sp) {+ if (Math.random() < 0.35) {+ const p = sp.pts[0], q = sp.pts[1];+ const tx = p[0] - q[0], ty = p[1] - q[1], tl = Math.hypot(tx, ty) || 1;+ const side = Math.random() < 0.5 ? -1 : 1;+ const sp2 = size * (0.18 + Math.random() * 0.3);+ embers.push({+ x: p[0], y: p[1],+ vx: ((-ty / tl) * side * 0.8 + (tx / tl) * 0.35) * sp2,+ vy: ((tx / tl) * side * 0.8 + (ty / tl) * 0.35) * sp2 + size * 0.03,+ z: p[2], age: 0, life: 0.14 + Math.random() * 0.22, r: clamp(size * 0.005, 0.6, 1.6) * sp.env,+ });+ }+ });+ }+ for (let i = embers.length - 1; i >= 0; i--) {+ const e = embers[i];+ e.age += dt;+ if (e.age >= e.life) { embers.splice(i, 1); continue; }+ e.x += e.vx * dt; e.y += e.vy * dt;+ e.vx *= 0.9; e.vy *= 0.9;+ }++ // ββ draw+ ctx.setTransform(dpr, 0, 0, dpr, 0, 0);+ ctx.clearRect(0, 0, size, size);++ if (T.dark) {+ const g = ctx.createRadialGradient(cx, cy, 0, cx, cy, markPx * 0.9);+ g.addColorStop(0, rgba(C.a, 0.17 + 0.05 * Math.sin(t * 3.1)));+ g.addColorStop(1, rgba(C.a, 0));+ ctx.fillStyle = g;+ ctx.fillRect(0, 0, size, size);+ }++ // behind the nucleus+ ctx.globalCompositeOperation = add;+ sparks.forEach(function (sp) { drawSpark(sp, false, false); });+ embers.forEach(function (e) { if (e.z < 0) drawEmber(e); });+ sparks.forEach(function (sp) { if (sp.pts[0][2] < 0) drawHead(sp, sp.k); });++ // the mark+ ctx.globalCompositeOperation = 'source-over';+ ctx.save();+ markTransform();+ ctx.fillStyle = rgba(T.ink, 1);+ ctx.fill(mark, 'evenodd');+ ctx.restore();++ // in front: luminous over the backgroundβ¦+ ctx.globalCompositeOperation = add;+ sparks.forEach(function (sp) { drawSpark(sp, true, false); });+ embers.forEach(function (e) { if (e.z >= 0) drawEmber(e); });+ sparks.forEach(function (sp) { if (sp.pts[0][2] >= 0) drawHead(sp, sp.k); });+ // β¦and still visible where it crosses the light mark (additive light vanishes on white)+ if (T.dark) {+ ctx.globalCompositeOperation = 'source-over';+ ctx.save();+ markTransform();+ ctx.clip(mark, 'evenodd');+ ctx.setTransform(dpr, 0, 0, dpr, 0, 0);+ sparks.forEach(function (sp) { drawSpark(sp, true, true); });+ sparks.forEach(function (sp) {+ const p = sp.pts[0];+ if (p[2] >= 0) glowDot(ctx, p[0], p[1], headR * 1.1, C.a, C.a, 0.9 * sp.env);+ });+ ctx.restore();+ }+ ctx.globalCompositeOperation = 'source-over';+ }+ return { frame: frame };+ }++ global.WBLoaders = { synapse: synapse, nucleus: nucleus };+})(window);diff --git a/assets/loader-candidates/marks.js b/assets/loader-candidates/marks.jsnew file mode 100644index 000000000..6e896b0f8--- /dev/null+++ b/assets/loader-candidates/marks.js@@ -0,0 +1,7 @@+/* The WebBrain mark as a single-color shape, traced from assets/logo-mark.png+ * (viewBox 0 0 100 100, fill-rule evenodd). `small` is an optical size for+ * 32px and below: the grooves are opened up so the W survives the downscale. */+window.WB_MARKS = {+ detail: 'M47 94C45.6 93.3 45.1 92.3 44.4 89.1C44.3 88.4 43.8 86.8 43.3 85.6C42.3 83 42.3 82.8 45 81.2C46.3 80.5 47.9 79.2 48.7 78.4L50.1 76.9L51.7 78.5C52.5 79.4 54 80.6 54.9 81.1C57.9 82.8 57.9 82.8 56.8 85.4C56.4 86.3 55.9 88.2 55.5 89.6C54.9 92.4 54.3 93.5 52.9 94.1C51.6 94.6 48.1 94.5 47 94ZM27 82.3C23.1 81.3 19.2 77.9 19.2 75.7C19.2 75.3 20.2 74.6 20.5 74.8C21 75.1 24 74.2 25.2 73.3C26.7 72.2 26.7 72.2 24.9 72.7C20.5 74 16.3 72.4 14.3 68.5L13.6 67.1L13.7 68.4C13.9 70 14.4 71.1 15.9 72.7C17.7 74.6 15 74.8 11.5 73C3 68.7 5.3 56.2 14.4 56.7L16.5 56.9L15.3 56.3C10.9 54.4 6 57.1 4.8 62.2L4.3 64.2L3.1 63C-0.8 59 -1 51.9 2.7 47.8L4 46.3L4.5 47.5C5.1 49 5.2 48.9 5.1 47C4.9 45.1 5.3 43.8 6.3 42.3L7 41.3L6.3 41.7C6 41.9 5.4 42.6 5.1 43.1C3.8 45 3.6 45.3 2.9 45.5C1 45.9 1 41.2 2.8 37.3C3.7 35.4 6.4 32.4 7.5 32.1C8.2 31.9 8.2 31.8 8.2 29.9C8.3 21.2 21.2 14.5 27.9 19.6C29.5 20.8 29.8 21.8 29.3 24.2C28.6 27.1 28.7 27.1 26.7 27.3C24.6 27.5 23.7 28.1 25.4 28.1C26.9 28.1 29.2 29.2 30.1 30.4C31.3 32 31.5 32.6 31.7 35.8C31.9 39.7 32.2 40.4 34.6 42.7C37.5 45.5 38.6 49.1 37.3 52.1C36.8 53.1 36.7 53.5 37 53.9C37.4 54.7 37.9 54.6 38.3 53.7C39.7 50.6 45 41.1 45.9 40.2C47.8 38.3 50.5 37.9 52.9 39.3C54.6 40.3 54.7 40.5 58.6 47.7C60.6 51.3 62.3 54.3 62.5 54.4C63.2 54.6 63.3 53.4 62.7 52.1C61.4 49 62.5 45.6 65.7 42.3C68 40.1 68.3 39.3 68.3 36C68.3 31.3 70.9 28.1 74.7 28L76 28L75.1 27.6C74.7 27.4 73.7 27.2 73 27.2C71.6 27.2 71.1 26.9 71.1 25.8C71.1 25.4 70.9 24.5 70.7 23.7C70 21.3 71.9 18.7 74.9 18.2C76.4 17.9 75.6 17.5 74 17.8C72.5 18 70.6 18.9 70 19.6C69.5 20.2 69.1 20.1 67.8 18.7C66.6 17.5 63.4 15.4 63.2 15.6C63.1 15.7 63.6 16.2 64.3 16.7C68.6 20.2 70.8 26.2 68.7 29.2C67.7 30.7 67.6 30.7 66.6 29.8L65.8 29L66.4 30.3C66.9 31.6 67 35 66.5 38.3C66.3 39.9 63.3 42.5 61.8 42.5C61.3 42.5 61.3 42.5 61.8 42.9C62.3 43.2 62.2 43.3 61.4 45C60.4 47 60.5 47.1 58.4 43.2C56.4 39.7 55.1 38.1 53.2 37.3C51.3 36.3 50.5 34.6 51 32.1C51.2 30.8 53.2 28.7 54.4 28.4C54.9 28.3 55.3 28.2 55.3 28C55.3 27.7 55.2 27.7 53.2 28.2C50.9 28.7 50.8 28.6 50.9 24.4C51 20.5 51.8 19.3 55 18.3C55.6 18.1 55.5 18.1 54.6 18.1C54 18.1 53 18.2 52.4 18.5C50.9 19 50.8 18.6 50.8 13.5L50.8 9.2L51.7 8.2C55.1 4.4 63.1 4.9 67.2 9.3L68.5 10.7L71.1 10.7C76.1 10.7 79 12.8 81.4 18C81.5 18.2 82 18.6 82.7 18.7C87.6 20.2 91.5 24.9 91.9 29.8C92 31.8 92 31.9 93 32.4C94.2 33 96.5 35.5 97.2 37C99.7 42.2 98.4 48.4 95.7 44.1C94.8 42.8 93.6 41.4 93.3 41.4C93.1 41.4 93.3 41.8 93.7 42.3C94.7 43.6 95.1 45.1 94.9 47C94.8 48.7 95 48.9 95.6 47.5C96 46.4 96.2 46.5 97.3 47.6C101.1 51.7 100.7 60.3 96.4 63.6L95.7 64.2L95.4 62.5C94.3 57.3 89.2 54.3 84.7 56.3C83.3 56.9 82.8 57.4 84 56.9C86.6 56 90.4 57.1 92.1 59.4C96.2 64.8 92.3 73.4 85.4 74.1C83.1 74.3 82.8 74.1 84 73C85.2 71.8 86.4 69.4 86.4 67.9L86.4 66.8L86 67.9C84.5 72.2 80.2 74 75 72.7L73.5 72.3L74.2 72.8C75.4 73.8 77.6 74.7 79.2 74.8C81 74.9 81.2 75.4 80.3 77.1C77.9 82 70.7 84 63 82.1C55.2 80.1 50.9 76.3 50.4 70.8C50.2 68.6 49.9 68.8 49.6 71.2C49.2 75.1 46.9 77.9 42.5 80.1C37.6 82.5 31.1 83.4 27 82.3ZM33.9 78.5C35.6 77.9 37.8 76.1 36.7 76.1C36.4 76.1 35.6 76.5 34.9 77C34.2 77.4 32.9 78.1 31.9 78.3C30.2 78.8 30.2 78.8 31.3 78.9C31.9 78.9 33.1 78.7 33.9 78.5ZM68.2 78.4C67.2 78.1 65.9 77.5 65.2 77C63.4 75.8 62.3 75.8 63.5 77C64.5 78 66.9 78.9 68.6 78.9L69.9 78.8L68.2 78.4ZM41.9 68.6C43 68.2 43.7 68.1 44.4 68.2C45.3 68.4 45.3 68.3 45 67.8C44.8 67.3 44.8 67 45.5 66C45.9 65.4 47 63.4 47.9 61.7C48.8 59.9 49.7 58.3 49.8 58.1C50 57.8 50.6 58.7 52.1 61.6C53.2 63.7 54.3 65.8 54.7 66.3C55.1 66.8 55.3 67.3 55.1 67.7C55 68.4 55 68.4 55.8 68.2C56.4 68.1 57.2 68.3 58.3 68.7C60.6 69.6 64.3 69.6 66.2 68.7C67.4 68.1 69 66.5 70.6 64.4C71.6 63 74.1 61.8 75.9 61.8C77.4 61.8 77.2 61.6 75.1 61L74 60.6L74.1 59.1C74.2 54.1 77.2 50.8 82.6 49.6C84.7 49.1 86.9 48 87.7 47.1C88.2 46.6 88.2 46.6 87.4 47C86.4 47.7 83.8 48.3 82.3 48.3C81.7 48.3 80.6 48.5 79.8 48.7C78 49.3 77.9 49.1 78.9 46.5C80.6 41.7 81.5 40.2 83 39.1C85.3 37.5 86.4 35.6 86.4 33.3C86.4 32.1 85.1 29 84.3 28.3C83.8 27.9 83.8 28 84.3 28.9C85.9 31.8 84.6 35.7 81.5 37.5C79.9 38.5 79.9 38.5 78.5 41.7C69.8 62.4 69.4 63.1 67.2 65.3C65.4 67.1 63.9 67.7 61.4 67.4C57.8 67.1 56.6 65.8 52.9 58.7C51.4 55.7 50.1 53.3 50 53.3C49.9 53.3 48.6 55.8 47.1 58.8C43.3 66.4 41.6 67.8 37.2 67.4C32.4 67 31.4 65.3 22.8 44.6C20.4 38.9 20.2 38.5 17.9 37.1C15.6 35.7 14.5 32.7 15.4 29.9C15.9 28.2 15.8 28 15 29.3C12.7 33.1 13.3 36.5 17 39.1C18.5 40.2 19.4 41.8 21.1 46.4C22 48.9 22 49.2 20.7 48.9C20.3 48.7 18.8 48.5 17.4 48.3C15.9 48.2 14.4 47.8 13.6 47.4C11.8 46.6 11.7 46.5 12.6 47.3C13.9 48.5 15.3 49.1 17.5 49.6C21.9 50.6 23.8 52.2 25.2 55.8C25.8 57.2 26.1 58.5 26.1 59.4L26.1 60.7L24.7 61.1C24 61.3 23.3 61.6 23.2 61.7C23.1 61.9 23.2 61.9 23.6 61.8C25.5 61.2 28.4 63 31.1 66.3C33.4 69.3 37.8 70.2 41.9 68.6ZM38.6 45C38 43.7 37.8 43.2 38 42.9C38.3 42.7 38 42.5 37.1 42.1C35.8 41.6 34.1 39.9 33.6 38.8C33 37.2 33.2 31.3 33.8 30L34.5 28.8L33.6 29.7C32.4 30.8 32.4 30.8 31.4 29.4C29.3 26.5 31 21 35.3 17.1L37.1 15.5L35.6 16.3C34.7 16.7 33.4 17.7 32.5 18.5C30.8 20.2 30.6 20.2 29.9 19.5C28.7 18.1 26.2 17.4 22.6 17.3C20.7 17.2 19.2 17.1 19.2 17C19.2 16.5 20.5 14.6 21.6 13.6C23.8 11.4 26.4 10.5 29.6 10.6L31.5 10.7L33.1 9.1C37.3 4.8 45 4.4 48.3 8.2L49.2 9.2L49.2 13.7C49.2 18.9 49.1 19 47.6 18.5C47 18.3 46.1 18.1 45.6 18.1L44.6 18.1L45.6 18.5C48.6 19.6 49.2 20.6 49.2 24.7C49.2 28.1 48.9 28.8 47.8 28.4C46.7 28 44.7 27.7 44.7 28C44.7 28.2 45.1 28.3 45.5 28.4C49.7 29.3 50.5 35.4 46.7 37.3C44.8 38.3 43.7 39.6 41.6 43.3C40.5 45.2 39.7 46.7 39.6 46.7C39.6 46.7 39.1 45.9 38.6 45Z',+ small: 'M46.6 93.2C46 92.7 45.5 91.5 45 89.6C44.6 87.9 44 86 43.7 85.2C42.8 83.1 42.9 82.9 44.7 81.9C45.6 81.4 47.2 80.2 48.2 79.3L50 77.6L51.5 78.9C52.2 79.7 53.7 80.8 54.7 81.5C57.1 83.1 57.1 83.3 56.2 85.6C55.8 86.7 55.2 88.6 55 89.9C54.3 93.2 53.5 93.8 50 93.8C48.1 93.8 47.2 93.7 46.6 93.2ZM26.6 81.8C24.1 80.9 21.6 79.3 20.6 77.8C19.2 75.8 19.3 75.5 21.5 75.2C23.4 75 26.9 73.1 26.9 72.3C26.9 72 26.5 71.9 25.7 72.1C19.4 73.3 16 72 14.6 67.9C14.4 67.1 14 66.5 13.8 66.5C12.5 66.5 13.1 69.9 14.8 72.1C16.3 74 16.1 74.1 13.2 73.3C3.5 70.4 5.5 55.2 15.3 57.3C17.9 57.8 18 57.1 15.7 55.9C11.7 53.8 5.8 56.7 4.5 61.4C4 63.3 3.8 63.4 3 62.4C-0.1 59 -0 50.7 3.1 47.9C3.7 47.3 3.8 47.4 4.4 48.3C5.3 49.7 5.9 49.5 5.6 47.7C5.3 46 5.9 43.5 6.9 42.2C7.8 41 7.9 40.8 7.2 40.8C6.7 40.8 5.1 42.3 3.4 44.5C1.6 46.9 1.6 40.5 3.4 37C4.5 35 5.3 34.1 7.1 32.9C8.4 32 8.5 31.8 8.6 29.9C8.7 27.1 10.4 23.9 12.6 21.9C17.9 17.2 29 17.5 28.9 22.2C28.9 25.5 28.5 26.4 26.8 26.7C24 27.2 22.9 28.5 25.3 28.5C28.7 28.5 31.2 31.5 31.2 35.6C31.2 39 31.7 40.2 34.2 42.9C37.2 46.1 38.1 49 36.7 52.2C36.2 53.5 36.2 53.6 36.8 54.3C37.8 55.4 37.8 55.4 41.5 48.4C46.3 39.5 47.7 38.2 51.5 39.2C53.7 39.8 54.6 40.9 58.3 48C62 55 62.2 55.3 63.2 54.3C63.8 53.7 63.8 53.5 63.3 52.2C61.9 49 62.7 46.3 66 42.7C67.3 41.2 68.5 40 68.5 39.9C68.5 39.9 68.7 38.1 68.8 36.1C69.2 31 70.7 29 74.4 28.6C75.4 28.4 76.2 28.2 76.2 27.9C76.2 27.4 73.7 26.5 72.4 26.5C71.8 26.5 71.5 26.3 71.5 25.6C71.5 25.1 71.4 24.2 71.1 23.6C70.4 21.4 73 18.5 75.7 18.5C76.9 18.5 77.1 17.7 76.1 17.4C74.8 16.9 72 17.6 70.6 18.6L69.3 19.6L67.6 17.9C65.8 16.3 62.9 14.7 62.4 15.1C62.3 15.2 63.2 16.3 64.4 17.4C68.3 20.9 70.1 26.3 68.3 29L67.6 30.1L66.7 29.2C65.4 28 65 28.6 65.8 30.3C66.4 31.5 66.5 32.2 66.2 35.2C65.9 39.4 65.3 40.5 62.8 41.6C61.6 42.1 61.2 42.5 61.3 42.9C61.4 43.3 61.3 44 60.9 44.7L60.3 45.9L58.8 43C57 39.7 55.4 37.9 53.4 36.9C51.8 36.1 51.5 35.6 51.5 33.1C51.6 30.9 52.3 29.9 54.7 28.9C57 27.9 56.8 27.1 54.5 27.4C53.6 27.5 52.6 27.7 52.2 27.9C51.7 28.1 51.6 27.8 51.3 26C50.8 21.8 51.6 20 54.5 19C57.1 18.1 56.3 17.1 53.5 17.7C51.3 18.2 51.4 18.3 51.4 13.9C51.4 8.8 51.6 8.3 53.6 7.2C57.4 5.2 64.6 6.5 67.2 9.8C68.2 11.1 68.3 11.2 71 11.2C75.5 11.2 78.7 13.2 80.4 17C81 18.5 81.4 18.9 82.5 19.2C87 20.4 90.5 24.4 91.4 29C91.6 30.1 91.5 30.5 91 30.9C90.4 31.4 90.5 31.5 92.4 32.6C94.5 33.8 96.2 35.7 97.2 38.2C97.9 39.7 98.2 43.9 97.8 44.5C97.4 45.2 96.3 44.8 96 43.9C95.7 42.9 93.1 40.6 92.8 40.9C92.7 41.1 92.7 41.5 93 41.8C94 43.2 94.4 44.5 94.5 46.7C94.5 48 94.6 49.1 94.6 49.2C94.6 49.3 95.1 48.9 95.6 48.3C96.5 47.2 96.5 47.1 97.1 47.9C99.5 50.9 100.1 56.1 98.5 59.9C97.4 62.4 96.3 63.5 95.9 62.5C94.9 59.1 93.4 57.3 91 56.1C89 55 85.9 55 84.2 56C82.8 56.8 82.6 57.6 83.8 57.4C89.5 56.3 93.1 59 93.1 64.5C93.1 68.9 90.9 72.1 86.9 73.3C83.9 74.1 83.6 74 84.8 72.6C86.1 71.1 86.9 69.2 86.9 67.9C86.9 66.4 86.2 66.4 85.6 67.8C83.8 72.1 80.4 73.4 74.3 72.1C73.6 71.9 73.1 72 73.1 72.2C73.1 73 76.7 75 78.5 75.2C80.6 75.5 80.8 75.9 79.5 77.7C74.1 85.7 54.2 82.4 51.4 73C51 71.9 50.8 70.5 50.8 70C50.8 67.3 49.4 68.3 49.1 71.2C48.4 77.4 41.7 81.7 32.1 82.1C29.5 82.3 27.8 82.1 26.6 81.8ZM34.5 78.6C36 78 37.7 76.7 37.7 76.1C37.7 75.5 36.2 75.8 34 76.9C32.8 77.6 31.4 78.1 30.8 78.1C29.7 78.1 29 78.5 29.5 79C30 79.4 33.1 79.2 34.5 78.6ZM70.5 78.7C70.5 78.4 69.7 78.1 68.9 78C68 77.9 66.5 77.3 65.4 76.7C63.2 75.4 61.7 75.6 62.9 77C64.5 78.8 70.8 80.1 70.5 78.7ZM40.9 69.4C42.2 69.1 43.8 68.8 44.4 68.8C45.3 68.7 45.6 68.5 45.5 67.9C45.4 67.4 45.9 66.1 46.6 64.9C47.3 63.8 48.3 61.9 48.8 60.8C50.1 58.3 50 58.3 51.6 61.6C52.3 63.1 53.3 65 53.9 65.8C54.6 66.7 54.8 67.4 54.6 67.7C54.1 68.5 54.5 68.8 56.2 68.8C57 68.8 58.1 69 58.4 69.2C59.7 69.9 63.2 70.1 65 69.6C66.4 69.3 67.3 68.6 69.6 66.1C72.6 63 73.8 62.3 76.4 62.3C78.2 62.3 78 61.6 75.9 60.7C74.2 60 74.2 59.9 74.5 58.5C75.4 53.5 77.8 51.1 82.7 50C85 49.6 87.9 47.9 88.3 47C88.6 46.1 88.2 46 86.9 46.8C85.7 47.4 79.2 48.6 78.9 48.2C78.2 47.5 81.7 40.9 84 38.7C87.6 35.3 87.9 31.3 84.8 28.5C83.7 27.4 83.2 27.6 83.9 28.9C85.3 31.6 84.1 35.5 81.2 37.2C79.4 38.4 79.3 38.5 76.7 44.7C68.2 65.1 67.1 66.9 62.1 66.9C58.2 66.9 56.9 65.6 53 58C51.6 55.1 50.2 52.7 50 52.7C49.8 52.7 48.3 55.5 46.5 58.8C42.9 65.9 42.2 66.6 38.3 66.8C33.4 67.1 32.2 65.5 25.5 50L20.6 38.4L18.6 37.1C15.9 35.3 15.1 32.4 16.3 28.6C16.8 27.2 15.9 27.5 14.6 29.3C12.2 32.6 12.9 36.2 16.4 39.1C18.2 40.6 21.8 47.6 21.1 48.2C20.8 48.5 14.3 47.4 13.2 46.8C10.7 45.5 11.6 47.3 14.2 49C14.8 49.3 16.2 49.8 17.3 50C21.5 50.9 23.3 52.3 24.8 56.1C26.1 59.2 26.1 60.2 24.7 60.6C21.7 61.3 21.9 62.1 25.2 62.5C27 62.7 27.3 63 29.8 65.6C34 69.9 36 70.6 40.9 69.4ZM39.1 44.8C38.8 44.1 38.6 43.3 38.6 43C38.6 42.6 38 42 36.9 41.5C34.5 40.2 33.9 39 33.8 34.8C33.7 32.2 33.8 31 34.3 30.1C35.1 28.6 34.7 28.2 33.3 29.2L32.3 30L31.7 29C29.9 26.3 31.8 20.8 35.6 17.4C37 16.2 37.6 15.4 37.3 15.2C36.8 14.9 32.9 17.2 31.7 18.6L30.8 19.7L29.5 18.7C27.8 17.5 26.1 16.9 22.8 16.7C19.7 16.4 19.6 16.3 21 14.6C22.9 12.4 25.1 11.4 28.7 11.2C31.8 11.1 31.9 11 32.9 9.8C36.1 5.5 46.9 5 48.5 9.1C48.9 10.3 49 17.6 48.5 17.8C48.4 17.9 47.6 17.9 46.7 17.7C45.8 17.5 45 17.5 44.5 17.7C43.6 18.2 43.9 18.7 45.3 19C48.2 19.5 49.5 22.6 48.7 26.7C48.5 28 48.3 28.1 47.6 27.8C46.3 27.4 44.1 27.4 44 27.9C43.9 28.1 44.7 28.7 45.8 29.1C49.1 30.5 50 35 47.2 36.5C44.9 37.7 43.1 39.7 41.4 42.8L39.7 45.9L39.1 44.8Z',+};diff --git a/assets/loader-candidates/preview-neural-circuit.gif b/assets/loader-candidates/preview-neural-circuit.gifnew file mode 100644index 000000000..08afe6d94Binary files /dev/null and b/assets/loader-candidates/preview-neural-circuit.gif differdiff --git a/assets/loader-candidates/preview-nucleus.gif b/assets/loader-candidates/preview-nucleus.gifnew file mode 100644index 000000000..9c9fa4d72Binary files /dev/null and b/assets/loader-candidates/preview-nucleus.gif differdiff --git a/assets/loader-candidates/preview-w-only.gif b/assets/loader-candidates/preview-w-only.gifnew file mode 100644index 000000000..d8ba585c8Binary files /dev/null and b/assets/loader-candidates/preview-w-only.gif differdiff --git a/assets/loader-candidates/webbrain-mark-mono-small.svg b/assets/loader-candidates/webbrain-mark-mono-small.svgnew file mode 100644index 000000000..68c73ee33--- /dev/null+++ b/assets/loader-candidates/webbrain-mark-mono-small.svg@@ -0,0 +1,3 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" role="img" aria-label="WebBrain">+ <path fill="currentColor" fill-rule="evenodd" d="M46.6 93.2C46 92.7 45.5 91.5 45 89.6C44.6 87.9 44 86 43.7 85.2C42.8 83.1 42.9 82.9 44.7 81.9C45.6 81.4 47.2 80.2 48.2 79.3L50 77.6L51.5 78.9C52.2 79.7 53.7 80.8 54.7 81.5C57.1 83.1 57.1 83.3 56.2 85.6C55.8 86.7 55.2 88.6 55 89.9C54.3 93.2 53.5 93.8 50 93.8C48.1 93.8 47.2 93.7 46.6 93.2ZM26.6 81.8C24.1 80.9 21.6 79.3 20.6 77.8C19.2 75.8 19.3 75.5 21.5 75.2C23.4 75 26.9 73.1 26.9 72.3C26.9 72 26.5 71.9 25.7 72.1C19.4 73.3 16 72 14.6 67.9C14.4 67.1 14 66.5 13.8 66.5C12.5 66.5 13.1 69.9 14.8 72.1C16.3 74 16.1 74.1 13.2 73.3C3.5 70.4 5.5 55.2 15.3 57.3C17.9 57.8 18 57.1 15.7 55.9C11.7 53.8 5.8 56.7 4.5 61.4C4 63.3 3.8 63.4 3 62.4C-0.1 59 -0 50.7 3.1 47.9C3.7 47.3 3.8 47.4 4.4 48.3C5.3 49.7 5.9 49.5 5.6 47.7C5.3 46 5.9 43.5 6.9 42.2C7.8 41 7.9 40.8 7.2 40.8C6.7 40.8 5.1 42.3 3.4 44.5C1.6 46.9 1.6 40.5 3.4 37C4.5 35 5.3 34.1 7.1 32.9C8.4 32 8.5 31.8 8.6 29.9C8.7 27.1 10.4 23.9 12.6 21.9C17.9 17.2 29 17.5 28.9 22.2C28.9 25.5 28.5 26.4 26.8 26.7C24 27.2 22.9 28.5 25.3 28.5C28.7 28.5 31.2 31.5 31.2 35.6C31.2 39 31.7 40.2 34.2 42.9C37.2 46.1 38.1 49 36.7 52.2C36.2 53.5 36.2 53.6 36.8 54.3C37.8 55.4 37.8 55.4 41.5 48.4C46.3 39.5 47.7 38.2 51.5 39.2C53.7 39.8 54.6 40.9 58.3 48C62 55 62.2 55.3 63.2 54.3C63.8 53.7 63.8 53.5 63.3 52.2C61.9 49 62.7 46.3 66 42.7C67.3 41.2 68.5 40 68.5 39.9C68.5 39.9 68.7 38.1 68.8 36.1C69.2 31 70.7 29 74.4 28.6C75.4 28.4 76.2 28.2 76.2 27.9C76.2 27.4 73.7 26.5 72.4 26.5C71.8 26.5 71.5 26.3 71.5 25.6C71.5 25.1 71.4 24.2 71.1 23.6C70.4 21.4 73 18.5 75.7 18.5C76.9 18.5 77.1 17.7 76.1 17.4C74.8 16.9 72 17.6 70.6 18.6L69.3 19.6L67.6 17.9C65.8 16.3 62.9 14.7 62.4 15.1C62.3 15.2 63.2 16.3 64.4 17.4C68.3 20.9 70.1 26.3 68.3 29L67.6 30.1L66.7 29.2C65.4 28 65 28.6 65.8 30.3C66.4 31.5 66.5 32.2 66.2 35.2C65.9 39.4 65.3 40.5 62.8 41.6C61.6 42.1 61.2 42.5 61.3 42.9C61.4 43.3 61.3 44 60.9 44.7L60.3 45.9L58.8 43C57 39.7 55.4 37.9 53.4 36.9C51.8 36.1 51.5 35.6 51.5 33.1C51.6 30.9 52.3 29.9 54.7 28.9C57 27.9 56.8 27.1 54.5 27.4C53.6 27.5 52.6 27.7 52.2 27.9C51.7 28.1 51.6 27.8 51.3 26C50.8 21.8 51.6 20 54.5 19C57.1 18.1 56.3 17.1 53.5 17.7C51.3 18.2 51.4 18.3 51.4 13.9C51.4 8.8 51.6 8.3 53.6 7.2C57.4 5.2 64.6 6.5 67.2 9.8C68.2 11.1 68.3 11.2 71 11.2C75.5 11.2 78.7 13.2 80.4 17C81 18.5 81.4 18.9 82.5 19.2C87 20.4 90.5 24.4 91.4 29C91.6 30.1 91.5 30.5 91 30.9C90.4 31.4 90.5 31.5 92.4 32.6C94.5 33.8 96.2 35.7 97.2 38.2C97.9 39.7 98.2 43.9 97.8 44.5C97.4 45.2 96.3 44.8 96 43.9C95.7 42.9 93.1 40.6 92.8 40.9C92.7 41.1 92.7 41.5 93 41.8C94 43.2 94.4 44.5 94.5 46.7C94.5 48 94.6 49.1 94.6 49.2C94.6 49.3 95.1 48.9 95.6 48.3C96.5 47.2 96.5 47.1 97.1 47.9C99.5 50.9 100.1 56.1 98.5 59.9C97.4 62.4 96.3 63.5 95.9 62.5C94.9 59.1 93.4 57.3 91 56.1C89 55 85.9 55 84.2 56C82.8 56.8 82.6 57.6 83.8 57.4C89.5 56.3 93.1 59 93.1 64.5C93.1 68.9 90.9 72.1 86.9 73.3C83.9 74.1 83.6 74 84.8 72.6C86.1 71.1 86.9 69.2 86.9 67.9C86.9 66.4 86.2 66.4 85.6 67.8C83.8 72.1 80.4 73.4 74.3 72.1C73.6 71.9 73.1 72 73.1 72.2C73.1 73 76.7 75 78.5 75.2C80.6 75.5 80.8 75.9 79.5 77.7C74.1 85.7 54.2 82.4 51.4 73C51 71.9 50.8 70.5 50.8 70C50.8 67.3 49.4 68.3 49.1 71.2C48.4 77.4 41.7 81.7 32.1 82.1C29.5 82.3 27.8 82.1 26.6 81.8ZM34.5 78.6C36 78 37.7 76.7 37.7 76.1C37.7 75.5 36.2 75.8 34 76.9C32.8 77.6 31.4 78.1 30.8 78.1C29.7 78.1 29 78.5 29.5 79C30 79.4 33.1 79.2 34.5 78.6ZM70.5 78.7C70.5 78.4 69.7 78.1 68.9 78C68 77.9 66.5 77.3 65.4 76.7C63.2 75.4 61.7 75.6 62.9 77C64.5 78.8 70.8 80.1 70.5 78.7ZM40.9 69.4C42.2 69.1 43.8 68.8 44.4 68.8C45.3 68.7 45.6 68.5 45.5 67.9C45.4 67.4 45.9 66.1 46.6 64.9C47.3 63.8 48.3 61.9 48.8 60.8C50.1 58.3 50 58.3 51.6 61.6C52.3 63.1 53.3 65 53.9 65.8C54.6 66.7 54.8 67.4 54.6 67.7C54.1 68.5 54.5 68.8 56.2 68.8C57 68.8 58.1 69 58.4 69.2C59.7 69.9 63.2 70.1 65 69.6C66.4 69.3 67.3 68.6 69.6 66.1C72.6 63 73.8 62.3 76.4 62.3C78.2 62.3 78 61.6 75.9 60.7C74.2 60 74.2 59.9 74.5 58.5C75.4 53.5 77.8 51.1 82.7 50C85 49.6 87.9 47.9 88.3 47C88.6 46.1 88.2 46 86.9 46.8C85.7 47.4 79.2 48.6 78.9 48.2C78.2 47.5 81.7 40.9 84 38.7C87.6 35.3 87.9 31.3 84.8 28.5C83.7 27.4 83.2 27.6 83.9 28.9C85.3 31.6 84.1 35.5 81.2 37.2C79.4 38.4 79.3 38.5 76.7 44.7C68.2 65.1 67.1 66.9 62.1 66.9C58.2 66.9 56.9 65.6 53 58C51.6 55.1 50.2 52.7 50 52.7C49.8 52.7 48.3 55.5 46.5 58.8C42.9 65.9 42.2 66.6 38.3 66.8C33.4 67.1 32.2 65.5 25.5 50L20.6 38.4L18.6 37.1C15.9 35.3 15.1 32.4 16.3 28.6C16.8 27.2 15.9 27.5 14.6 29.3C12.2 32.6 12.9 36.2 16.4 39.1C18.2 40.6 21.8 47.6 21.1 48.2C20.8 48.5 14.3 47.4 13.2 46.8C10.7 45.5 11.6 47.3 14.2 49C14.8 49.3 16.2 49.8 17.3 50C21.5 50.9 23.3 52.3 24.8 56.1C26.1 59.2 26.1 60.2 24.7 60.6C21.7 61.3 21.9 62.1 25.2 62.5C27 62.7 27.3 63 29.8 65.6C34 69.9 36 70.6 40.9 69.4ZM39.1 44.8C38.8 44.1 38.6 43.3 38.6 43C38.6 42.6 38 42 36.9 41.5C34.5 40.2 33.9 39 33.8 34.8C33.7 32.2 33.8 31 34.3 30.1C35.1 28.6 34.7 28.2 33.3 29.2L32.3 30L31.7 29C29.9 26.3 31.8 20.8 35.6 17.4C37 16.2 37.6 15.4 37.3 15.2C36.8 14.9 32.9 17.2 31.7 18.6L30.8 19.7L29.5 18.7C27.8 17.5 26.1 16.9 22.8 16.7C19.7 16.4 19.6 16.3 21 14.6C22.9 12.4 25.1 11.4 28.7 11.2C31.8 11.1 31.9 11 32.9 9.8C36.1 5.5 46.9 5 48.5 9.1C48.9 10.3 49 17.6 48.5 17.8C48.4 17.9 47.6 17.9 46.7 17.7C45.8 17.5 45 17.5 44.5 17.7C43.6 18.2 43.9 18.7 45.3 19C48.2 19.5 49.5 22.6 48.7 26.7C48.5 28 48.3 28.1 47.6 27.8C46.3 27.4 44.1 27.4 44 27.9C43.9 28.1 44.7 28.7 45.8 29.1C49.1 30.5 50 35 47.2 36.5C44.9 37.7 43.1 39.7 41.4 42.8L39.7 45.9L39.1 44.8Z"/>+</svg>diff --git a/assets/loader-candidates/webbrain-mark-mono.svg b/assets/loader-candidates/webbrain-mark-mono.svgnew file mode 100644index 000000000..b0c8ce5a5--- /dev/null+++ b/assets/loader-candidates/webbrain-mark-mono.svg@@ -0,0 +1,3 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" role="img" aria-label="WebBrain">+ <path fill="currentColor" fill-rule="evenodd" d="M47 94C45.6 93.3 45.1 92.3 44.4 89.1C44.3 88.4 43.8 86.8 43.3 85.6C42.3 83 42.3 82.8 45 81.2C46.3 80.5 47.9 79.2 48.7 78.4L50.1 76.9L51.7 78.5C52.5 79.4 54 80.6 54.9 81.1C57.9 82.8 57.9 82.8 56.8 85.4C56.4 86.3 55.9 88.2 55.5 89.6C54.9 92.4 54.3 93.5 52.9 94.1C51.6 94.6 48.1 94.5 47 94ZM27 82.3C23.1 81.3 19.2 77.9 19.2 75.7C19.2 75.3 20.2 74.6 20.5 74.8C21 75.1 24 74.2 25.2 73.3C26.7 72.2 26.7 72.2 24.9 72.7C20.5 74 16.3 72.4 14.3 68.5L13.6 67.1L13.7 68.4C13.9 70 14.4 71.1 15.9 72.7C17.7 74.6 15 74.8 11.5 73C3 68.7 5.3 56.2 14.4 56.7L16.5 56.9L15.3 56.3C10.9 54.4 6 57.1 4.8 62.2L4.3 64.2L3.1 63C-0.8 59 -1 51.9 2.7 47.8L4 46.3L4.5 47.5C5.1 49 5.2 48.9 5.1 47C4.9 45.1 5.3 43.8 6.3 42.3L7 41.3L6.3 41.7C6 41.9 5.4 42.6 5.1 43.1C3.8 45 3.6 45.3 2.9 45.5C1 45.9 1 41.2 2.8 37.3C3.7 35.4 6.4 32.4 7.5 32.1C8.2 31.9 8.2 31.8 8.2 29.9C8.3 21.2 21.2 14.5 27.9 19.6C29.5 20.8 29.8 21.8 29.3 24.2C28.6 27.1 28.7 27.1 26.7 27.3C24.6 27.5 23.7 28.1 25.4 28.1C26.9 28.1 29.2 29.2 30.1 30.4C31.3 32 31.5 32.6 31.7 35.8C31.9 39.7 32.2 40.4 34.6 42.7C37.5 45.5 38.6 49.1 37.3 52.1C36.8 53.1 36.7 53.5 37 53.9C37.4 54.7 37.9 54.6 38.3 53.7C39.7 50.6 45 41.1 45.9 40.2C47.8 38.3 50.5 37.9 52.9 39.3C54.6 40.3 54.7 40.5 58.6 47.7C60.6 51.3 62.3 54.3 62.5 54.4C63.2 54.6 63.3 53.4 62.7 52.1C61.4 49 62.5 45.6 65.7 42.3C68 40.1 68.3 39.3 68.3 36C68.3 31.3 70.9 28.1 74.7 28L76 28L75.1 27.6C74.7 27.4 73.7 27.2 73 27.2C71.6 27.2 71.1 26.9 71.1 25.8C71.1 25.4 70.9 24.5 70.7 23.7C70 21.3 71.9 18.7 74.9 18.2C76.4 17.9 75.6 17.5 74 17.8C72.5 18 70.6 18.9 70 19.6C69.5 20.2 69.1 20.1 67.8 18.7C66.6 17.5 63.4 15.4 63.2 15.6C63.1 15.7 63.6 16.2 64.3 16.7C68.6 20.2 70.8 26.2 68.7 29.2C67.7 30.7 67.6 30.7 66.6 29.8L65.8 29L66.4 30.3C66.9 31.6 67 35 66.5 38.3C66.3 39.9 63.3 42.5 61.8 42.5C61.3 42.5 61.3 42.5 61.8 42.9C62.3 43.2 62.2 43.3 61.4 45C60.4 47 60.5 47.1 58.4 43.2C56.4 39.7 55.1 38.1 53.2 37.3C51.3 36.3 50.5 34.6 51 32.1C51.2 30.8 53.2 28.7 54.4 28.4C54.9 28.3 55.3 28.2 55.3 28C55.3 27.7 55.2 27.7 53.2 28.2C50.9 28.7 50.8 28.6 50.9 24.4C51 20.5 51.8 19.3 55 18.3C55.6 18.1 55.5 18.1 54.6 18.1C54 18.1 53 18.2 52.4 18.5C50.9 19 50.8 18.6 50.8 13.5L50.8 9.2L51.7 8.2C55.1 4.4 63.1 4.9 67.2 9.3L68.5 10.7L71.1 10.7C76.1 10.7 79 12.8 81.4 18C81.5 18.2 82 18.6 82.7 18.7C87.6 20.2 91.5 24.9 91.9 29.8C92 31.8 92 31.9 93 32.4C94.2 33 96.5 35.5 97.2 37C99.7 42.2 98.4 48.4 95.7 44.1C94.8 42.8 93.6 41.4 93.3 41.4C93.1 41.4 93.3 41.8 93.7 42.3C94.7 43.6 95.1 45.1 94.9 47C94.8 48.7 95 48.9 95.6 47.5C96 46.4 96.2 46.5 97.3 47.6C101.1 51.7 100.7 60.3 96.4 63.6L95.7 64.2L95.4 62.5C94.3 57.3 89.2 54.3 84.7 56.3C83.3 56.9 82.8 57.4 84 56.9C86.6 56 90.4 57.1 92.1 59.4C96.2 64.8 92.3 73.4 85.4 74.1C83.1 74.3 82.8 74.1 84 73C85.2 71.8 86.4 69.4 86.4 67.9L86.4 66.8L86 67.9C84.5 72.2 80.2 74 75 72.7L73.5 72.3L74.2 72.8C75.4 73.8 77.6 74.7 79.2 74.8C81 74.9 81.2 75.4 80.3 77.1C77.9 82 70.7 84 63 82.1C55.2 80.1 50.9 76.3 50.4 70.8C50.2 68.6 49.9 68.8 49.6 71.2C49.2 75.1 46.9 77.9 42.5 80.1C37.6 82.5 31.1 83.4 27 82.3ZM33.9 78.5C35.6 77.9 37.8 76.1 36.7 76.1C36.4 76.1 35.6 76.5 34.9 77C34.2 77.4 32.9 78.1 31.9 78.3C30.2 78.8 30.2 78.8 31.3 78.9C31.9 78.9 33.1 78.7 33.9 78.5ZM68.2 78.4C67.2 78.1 65.9 77.5 65.2 77C63.4 75.8 62.3 75.8 63.5 77C64.5 78 66.9 78.9 68.6 78.9L69.9 78.8L68.2 78.4ZM41.9 68.6C43 68.2 43.7 68.1 44.4 68.2C45.3 68.4 45.3 68.3 45 67.8C44.8 67.3 44.8 67 45.5 66C45.9 65.4 47 63.4 47.9 61.7C48.8 59.9 49.7 58.3 49.8 58.1C50 57.8 50.6 58.7 52.1 61.6C53.2 63.7 54.3 65.8 54.7 66.3C55.1 66.8 55.3 67.3 55.1 67.7C55 68.4 55 68.4 55.8 68.2C56.4 68.1 57.2 68.3 58.3 68.7C60.6 69.6 64.3 69.6 66.2 68.7C67.4 68.1 69 66.5 70.6 64.4C71.6 63 74.1 61.8 75.9 61.8C77.4 61.8 77.2 61.6 75.1 61L74 60.6L74.1 59.1C74.2 54.1 77.2 50.8 82.6 49.6C84.7 49.1 86.9 48 87.7 47.1C88.2 46.6 88.2 46.6 87.4 47C86.4 47.7 83.8 48.3 82.3 48.3C81.7 48.3 80.6 48.5 79.8 48.7C78 49.3 77.9 49.1 78.9 46.5C80.6 41.7 81.5 40.2 83 39.1C85.3 37.5 86.4 35.6 86.4 33.3C86.4 32.1 85.1 29 84.3 28.3C83.8 27.9 83.8 28 84.3 28.9C85.9 31.8 84.6 35.7 81.5 37.5C79.9 38.5 79.9 38.5 78.5 41.7C69.8 62.4 69.4 63.1 67.2 65.3C65.4 67.1 63.9 67.7 61.4 67.4C57.8 67.1 56.6 65.8 52.9 58.7C51.4 55.7 50.1 53.3 50 53.3C49.9 53.3 48.6 55.8 47.1 58.8C43.3 66.4 41.6 67.8 37.2 67.4C32.4 67 31.4 65.3 22.8 44.6C20.4 38.9 20.2 38.5 17.9 37.1C15.6 35.7 14.5 32.7 15.4 29.9C15.9 28.2 15.8 28 15 29.3C12.7 33.1 13.3 36.5 17 39.1C18.5 40.2 19.4 41.8 21.1 46.4C22 48.9 22 49.2 20.7 48.9C20.3 48.7 18.8 48.5 17.4 48.3C15.9 48.2 14.4 47.8 13.6 47.4C11.8 46.6 11.7 46.5 12.6 47.3C13.9 48.5 15.3 49.1 17.5 49.6C21.9 50.6 23.8 52.2 25.2 55.8C25.8 57.2 26.1 58.5 26.1 59.4L26.1 60.7L24.7 61.1C24 61.3 23.3 61.6 23.2 61.7C23.1 61.9 23.2 61.9 23.6 61.8C25.5 61.2 28.4 63 31.1 66.3C33.4 69.3 37.8 70.2 41.9 68.6ZM38.6 45C38 43.7 37.8 43.2 38 42.9C38.3 42.7 38 42.5 37.1 42.1C35.8 41.6 34.1 39.9 33.6 38.8C33 37.2 33.2 31.3 33.8 30L34.5 28.8L33.6 29.7C32.4 30.8 32.4 30.8 31.4 29.4C29.3 26.5 31 21 35.3 17.1L37.1 15.5L35.6 16.3C34.7 16.7 33.4 17.7 32.5 18.5C30.8 20.2 30.6 20.2 29.9 19.5C28.7 18.1 26.2 17.4 22.6 17.3C20.7 17.2 19.2 17.1 19.2 17C19.2 16.5 20.5 14.6 21.6 13.6C23.8 11.4 26.4 10.5 29.6 10.6L31.5 10.7L33.1 9.1C37.3 4.8 45 4.4 48.3 8.2L49.2 9.2L49.2 13.7C49.2 18.9 49.1 19 47.6 18.5C47 18.3 46.1 18.1 45.6 18.1L44.6 18.1L45.6 18.5C48.6 19.6 49.2 20.6 49.2 24.7C49.2 28.1 48.9 28.8 47.8 28.4C46.7 28 44.7 27.7 44.7 28C44.7 28.2 45.1 28.3 45.5 28.4C49.7 29.3 50.5 35.4 46.7 37.3C44.8 38.3 43.7 39.6 41.6 43.3C40.5 45.2 39.7 46.7 39.6 46.7C39.6 46.7 39.1 45.9 38.6 45Z"/>+</svg>diff --git a/package.json b/package.jsonindex 9645a4249..cdb98bd44 100644--- a/package.json+++ b/package.json@@ -100,7 +100,7 @@"test:upload-owner": "node --test test/page-monitor-upload-owner.mjs test/page-monitor-upload-release.mjs","test:shard:quick": "npm run test:cms && npm run test:markdown && npm run test:generative-media && npm run test:systemone && npm run test:systemone:fast && node --test test/guard-policy.mjs test/browser-dialogs.mjs test/capsolver-cloud-broker.mjs test/captcha-providers.mjs test/captcha-weighted-fallback.mjs test/captcha-hcaptcha-providers.mjs test/captcha-native-providers.mjs test/captcha-runtime-policy.mjs test/captcha-callback-bridge.mjs test/captcha-bridge-registration.mjs test/captcha-aws-recovery.mjs test/captcha-documented-contracts.mjs test/huggingface-signup-recovery.mjs test/trace-full-export.mjs test/feedback-traces.mjs && npm run test:firefox-bidi && npm run test:billing-notice && npm run test:compass-quota && npm run test:provider-limits && npm run test:provider-catalog && npm run test:provider-instances:ui && npm run test:settings-pages:ui && npm run test:openrouter-capabilities && npm run test:anthropic && npm run test:browser-batch && npm run test:accessibility-tree-benchmark && npm run test:toolbar-guard && npm run test:cloud-bridge-approval && npm run test:discord && npm run test:pdf-read && npm run test:pdf-selection && npm run test:social-contract && npm run test:safesocial && npm run test:build-unpacked && npm run test:attachment-drop && npm run test:workflow-editor && node --test test/profile-sync-stats.mjs && node --test test/memcode-recall.mjs","test:shard:runtime-unit": "node --test test/skill-download-wait.mjs && node --test test/agent-lifecycle.mjs test/runtime-startup.mjs test/run-ui-scheduled-lifecycle.mjs test/transport-deadlines.mjs test/cdp-worker-restart.mjs test/bot-memory.mjs test/bot-memory-click-guard.mjs test/bot-memory-registries.mjs test/bot-memory-cloud-controller.mjs test/cdp-clear-receipt.mjs test/cdp-field-submit-recovery.mjs test/conversation-persistence.mjs test/context-live-tool-group.mjs test/integration-races.mjs test/watch-completion-checkpoint.mjs test/runtime-model-identity.mjs test/provider-message-privacy.mjs test/runtime-task-authority.mjs test/planner-repair-authority.mjs test/runtime-progress-continuation.mjs test/chat-resume-chain.mjs test/chat-resume-completion.mjs test/native-chat-execution-ledger.mjs test/chat-send-dispatch-result.mjs test/chat-reply-dedup-race.mjs test/memcode-lifecycle.mjs test/runtime-peer-review.mjs test/read-continuation-schema.mjs test/completion-submit-acknowledgement.mjs test/completion-live-status.mjs test/completion-iframe-submit.mjs test/form-validation-alert-readings.mjs test/control-effect-readings.mjs test/guard-reading-carry-over.mjs test/trusted-retry-readings.mjs test/completion-semantic-commit.mjs test/completion-diagnostics.mjs test/mastodon-publication.mjs test/calculator.mjs test/chat-recovery-protocol.mjs test/chat-pending-reconciliation.mjs test/semantic-page-retry.mjs test/pdf-detection.mjs test/runtime-lifecycle.mjs test/collection-read-progress.mjs test/network-lifecycle.mjs test/text-write-cancellation.mjs test/guard-advisory-writes.mjs test/trusted-field-preparation.mjs test/draftjs-text.mjs test/codemirror-text.mjs test/rich-text-frameworks.mjs test/cdp-managed-text-selection.mjs test/firefox-rich-text-readback.mjs test/contenteditable-beforeinput.mjs test/trusted-field-preparation-ownership.mjs test/typing-preparation-geometry.mjs test/chat-steering.mjs test/resource-mutation-guards.mjs test/completion-steering-receipt-authority.mjs test/steering-revision-recovery.mjs test/pending-clarification-hydration.mjs test/clarify-timeout-policy.mjs test/guard-ask-cards.mjs test/permission-steering-wakeup.mjs test/pure-calculation-reply.mjs test/pure-calculation-tools.mjs test/page-feedback.mjs test/page-feedback-progress.mjs test/page-feedback-unbindable-target.mjs test/guard-advisory-actions.mjs test/rich-text-preflight-page-change.mjs test/keyboard-receiver-frame.mjs test/ask-response-scope.mjs test/auto-mode.mjs test/plan-when-needed.mjs test/model-picker-icon.mjs test/ask-completion-churn.mjs test/page-feedback-policy.mjs test/research-escalation-page-feedback.mjs test/page-feedback-transport-races.mjs test/page-feedback-recovery.mjs test/telegram-read-preparation-agent.mjs test/media-download-agent-handler.mjs test/code-scanning-url-recipient.mjs test/apocalypse-comm-parsing.mjs test/apocalypse-scalar-decoding.mjs test/bitgpu-chat-security.mjs test/social-media-url-upgrades.mjs test/downloaded-file-saved-bytes.mjs test/downloaded-file-local-probe.mjs test/formless-verification-recovery.mjs test/file-upload-accept.mjs test/file-upload-accept-agent.mjs test/workflow-route-generic-completion.mjs test/release-publication-completion.mjs test/workflow-implicit-metadata.mjs test/workflow-field-readings.mjs test/workflow-field-anchors.mjs test/user-turn-kind.mjs test/follow-up-task-context.mjs test/completion-current-execution-evidence.mjs test/video-upload-attachment.mjs test/feedback-automatic-churn.mjs test/feedback-navigation-idle.mjs test/feedback-run-boundaries.mjs test/feedback-ask-viewing.mjs test/lifecycle-terminal-done.mjs test/incomplete-completion-recovery.mjs test/guard-advisory-completion.mjs test/lean-mode.mjs test/prompt-unverified-pages.mjs test/prompt-missing-values.mjs test/lifecycle-planner-digest.mjs test/lifecycle-steering-latency.mjs test/lifecycle-steering-restart.mjs test/lifecycle-vision-fallback.mjs test/delivery-click-locks.mjs test/guards-steering-receipts.mjs test/terminal-user-messages.mjs test/improver-providers.mjs test/improver-providers-agent.mjs test/improver-guards-ledger.mjs test/improver-guards-tools.mjs test/improver-clarify.mjs test/improver-clarify-scheduler.mjs test/improver-misc.mjs test/improver-forms.mjs test/improver-forms-strict-secrets.mjs test/improver-content-press-keys-hint.mjs && npm run test:plan-notifications",- "test:shard:browser-a": "node --test test/captcha-draft-content.mjs test/captcha-challenge-surfaces.mjs && node test/bot-memory-dom.mjs && node test/bot-memory-click-dom.mjs && node test/ui-content-lifecycle.mjs && node --test test/native-telegram-chat.mjs test/native-telegram-recipient.mjs test/telegram-native-baseline.mjs test/telegram-native-latest.mjs test/native-chat-pre-enter-draft.mjs test/chat-draft-dispatch-ownership.mjs test/native-telegram-alias-preparation.mjs test/telegram-read-preparation-content.mjs test/queued-composer-ownership.mjs test/onboarding-provider-ready.mjs test/sidepanel-permission-gate-ui.mjs test/model-picker-status-ui.mjs test/workflow-native-targets.mjs test/native-whatsapp-chat.mjs test/native-chat-context-identity.mjs test/native-whatsapp-contact.mjs test/whatsapp-chat-selection.mjs test/whatsapp-native-bootstrap.mjs test/whatsapp-drawer-identity.mjs test/whatsapp-read-latest.mjs test/whatsapp-read-preparation.mjs test/whatsapp-chat-completion.mjs test/whatsapp-chat-restart.mjs test/chat-goal-lifecycle.mjs test/chat-completion.mjs test/chat-generic-dispatch.mjs test/completion-live-status-browser.mjs test/native-confirmation-visibility.mjs test/native-button-preparation.mjs test/read-continuation-browser.mjs test/iframe-preparation-focus.mjs test/contenteditable-literal.mjs test/native-chat-empty-editor.mjs test/native-chat-trusted-clear.mjs test/chat-steering-ui.mjs test/recipient-confirmation-ui.mjs test/assistant-message-visibility-ui.mjs test/page-monitor-ui.mjs test/x-compose-trusted-typing.mjs test/page-monitor-dialog.mjs test/page-monitor-dialog-native.mjs test/page-monitor-inline-post.mjs test/bluesky-composer-context.mjs test/page-monitor-anchored.mjs test/page-monitor-upload-owner.mjs test/page-monitor-upload-release.mjs test/page-monitor-native-controls.mjs test/page-monitor-native-preparation.mjs test/native-preparation-cold.mjs test/page-monitor-navigation.mjs test/page-monitor-main-owner.mjs test/page-monitor-collateral-controls.mjs test/accessibility-tree-scoped-budget.mjs test/ax-reference-origin.mjs test/page-monitor-decorative-hit.mjs test/social-ui-navigation.mjs test/native-resource-deletion-binding.mjs test/native-mastodon-confirmation.mjs test/dropdown-menu-inventory.mjs test/page-monitor-passive-progress.mjs test/page-monitor-feed-items.mjs test/media-download-binding.mjs test/media-download-capture-integration.mjs test/social-media-downloader-reinjection.mjs test/upload-file-local-state-guidance.mjs test/monitor-intervention-contract.mjs test/monitor-owned-geometry.mjs test/monitor-viewport-remainder.mjs test/monitor-scroll-churn.mjs test/monitor-local-attribution.mjs test/monitor-lifecycle-leaks.mjs test/lifecycle-run-ui.mjs test/lifecycle-menu-prompts-held.mjs test/delivery-cdp-input.mjs test/delivery-click-ax-response-loss.mjs test/delivery-native-button-geometry.mjs test/delivery-hover-transition.mjs test/delivery-native-button-route.mjs test/delivery-dispatch-boundary.mjs test/delivery-stop-compound.mjs test/guards-control-classification.mjs test/guards-unbound-deletion.mjs test/submit-probe-readings.mjs test/declined-submission-identity.mjs test/improver-content-account-chrome.mjs test/improver-content-recipient.mjs test/improver-content-truncated-replacement.mjs test/improver-forms-probe.mjs test/improver-misc-trace-browser.mjs test/page-feedback-held-time.mjs test/page-monitor-held-observation.mjs",+ "test:shard:browser-a": "node --test test/captcha-draft-content.mjs test/captcha-challenge-surfaces.mjs && node test/bot-memory-dom.mjs && node test/bot-memory-click-dom.mjs && node test/ui-content-lifecycle.mjs && node --test test/native-telegram-chat.mjs test/native-telegram-recipient.mjs test/telegram-native-baseline.mjs test/telegram-native-latest.mjs test/native-chat-pre-enter-draft.mjs test/chat-draft-dispatch-ownership.mjs test/native-telegram-alias-preparation.mjs test/telegram-read-preparation-content.mjs test/queued-composer-ownership.mjs test/onboarding-provider-ready.mjs test/sidepanel-permission-gate-ui.mjs test/model-picker-status-ui.mjs test/workflow-native-targets.mjs test/native-whatsapp-chat.mjs test/native-chat-context-identity.mjs test/native-whatsapp-contact.mjs test/whatsapp-chat-selection.mjs test/whatsapp-native-bootstrap.mjs test/whatsapp-drawer-identity.mjs test/whatsapp-read-latest.mjs test/whatsapp-read-preparation.mjs test/whatsapp-chat-completion.mjs test/whatsapp-chat-restart.mjs test/chat-goal-lifecycle.mjs test/chat-completion.mjs test/chat-generic-dispatch.mjs test/completion-live-status-browser.mjs test/native-confirmation-visibility.mjs test/native-button-preparation.mjs test/read-continuation-browser.mjs test/iframe-preparation-focus.mjs test/contenteditable-literal.mjs test/native-chat-empty-editor.mjs test/native-chat-trusted-clear.mjs test/chat-steering-ui.mjs test/activity-brain-ui.mjs test/recipient-confirmation-ui.mjs test/assistant-message-visibility-ui.mjs test/page-monitor-ui.mjs test/x-compose-trusted-typing.mjs test/page-monitor-dialog.mjs test/page-monitor-dialog-native.mjs test/page-monitor-inline-post.mjs test/bluesky-composer-context.mjs test/page-monitor-anchored.mjs test/page-monitor-upload-owner.mjs test/page-monitor-upload-release.mjs test/page-monitor-native-controls.mjs test/page-monitor-native-preparation.mjs test/native-preparation-cold.mjs test/page-monitor-navigation.mjs test/page-monitor-main-owner.mjs test/page-monitor-collateral-controls.mjs test/accessibility-tree-scoped-budget.mjs test/ax-reference-origin.mjs test/page-monitor-decorative-hit.mjs test/social-ui-navigation.mjs test/native-resource-deletion-binding.mjs test/native-mastodon-confirmation.mjs test/dropdown-menu-inventory.mjs test/page-monitor-passive-progress.mjs test/page-monitor-feed-items.mjs test/media-download-binding.mjs test/media-download-capture-integration.mjs test/social-media-downloader-reinjection.mjs test/upload-file-local-state-guidance.mjs test/monitor-intervention-contract.mjs test/monitor-owned-geometry.mjs test/monitor-viewport-remainder.mjs test/monitor-scroll-churn.mjs test/monitor-local-attribution.mjs test/monitor-lifecycle-leaks.mjs test/lifecycle-run-ui.mjs test/lifecycle-menu-prompts-held.mjs test/delivery-cdp-input.mjs test/delivery-click-ax-response-loss.mjs test/delivery-native-button-geometry.mjs test/delivery-hover-transition.mjs test/delivery-native-button-route.mjs test/delivery-dispatch-boundary.mjs test/delivery-stop-compound.mjs test/guards-control-classification.mjs test/guards-unbound-deletion.mjs test/submit-probe-readings.mjs test/declined-submission-identity.mjs test/improver-content-account-chrome.mjs test/improver-content-recipient.mjs test/improver-content-truncated-replacement.mjs test/improver-forms-probe.mjs test/improver-misc-trace-browser.mjs test/page-feedback-held-time.mjs test/page-monitor-held-observation.mjs","test:shard:browser-b1": "node test/message-recipient-upload.mjs && node test/message-recipient-clarify-binding.mjs && node --test test/message-recipient-whatsapp.mjs test/message-control-readings.mjs && node test/quality/integration-mv3.mjs --full-form && node test/quality/integration-mv3.mjs --batch && node test/quality/literal-calculate-midrun-mv3.mjs && node test/quality/ask-completion-churn-mv3.mjs && node test/quality/ask-person-activity-mv3.mjs && node test/quality/telegram-cold-preparation-mv3.mjs && node test/quality/native-chat-mv3.mjs && node test/quality/native-chat-presubmit-mv3.mjs && node test/quality/cloud-bot-memory-mv3.mjs","test:shard:browser-b2": "node test/quality/whatsapp-contact-matrix.mjs && node test/quality/pdf-detection-mv3.mjs && node test/quality/download-upload-mv3.mjs && node test/quality/upload-release-binding-mv3.mjs && node test/quality/upload-release-binding-mv3.mjs --selector-recovery && node test/quality/upload-release-binding-mv3.mjs --sequential-assets && node test/quality/release-review-world-mv3.mjs && node test/quality/downloaded-file-saved-bytes-mv3.mjs && node test/quality/file-upload-accept-mv3.mjs && node test/quality/bulk-resume-mv3.mjs && node test/quality/shared-action-guards-mv3.mjs && node test/quality/video-upload-attachment-mv3.mjs && node --test test/iframe-probe-match-index.mjs","test:shard:browser-c": "node test/quality/literal-frame-mv3.mjs && node test/quality/mastodon-publication-mv3.mjs && node test/quality/mastodon-reply-route-mv3.mjs && node test/quality/mastodon-deletion-mv3.mjs && node test/quality/mastodon-delete-confirmation-mv3.mjs && node test/quality/mastodon-delete-confirmation-mv3.mjs --menu-read && node test/quality/mastodon-delete-confirmation-mv3.mjs --vague && node test/quality/mastodon-delete-after-correction-mv3.mjs && node test/quality/unbound-deletion-mv3.mjs && node test/quality/recipient-clarify-mv3.mjs && node test/quality/open-chat-recipients-mv3.mjs && node test/quality/correction-cross-site-mv3.mjs && node test/quality/anchored-action-mv3.mjs && node test/quality/inline-social-composer-mv3.mjs && node test/quality/x-compose-dialog-mv3.mjs && node test/quality/bluesky-composer-mv3.mjs && node test/quality/dropdown-menu-matrix.mjs && node test/quality/mastodon-deletion-navigation-mv3.mjs && node test/quality/semantic-navigation-matrix.mjs && node test/quality/workflow-replay-mv3.mjs && node test/quality/generative-media-mv3.mjs && node test/quality/cdp-worker-restart-mv3.mjs && node test/quality/steering-worker-restart-mv3.mjs",diff --git a/src/chrome/src/ui/activity-brain.js b/src/chrome/src/ui/activity-brain.jsnew file mode 100644index 000000000..98f88c970--- /dev/null+++ b/src/chrome/src/ui/activity-brain.js@@ -0,0 +1,342 @@+// The activity bar's working indicator: the WebBrain mark as a tiny neural+// circuit. A signal keeps tracing the W, the brain's outline brightens as it+// passes, and a few neurons on the outline fire at random. It animates only+// while the bar is shown and the panel is visible, and holds one still frame+// under prefers-reduced-motion. Purely decorative: #activity-live-status+// announces what the agent is doing.+//+// A canvas rather than SVG/CSS because each signal has a tapered tail drawn+// with additive light on dark themes; at 22px that reads as a spark, where a+// moving stroke dash reads as a line. The directions we explored before this+// one are kept in assets/loader-candidates/.++const TAU = Math.PI * 2;+// CSS box of the indicator; keep in sync with .activity-brain in sidepanel.css.+const SIZE = 22;++// Geometry in the mark's own unit space (x right, y down, the brain spans+// x β1β¦1), traced from assets/logo-mark.png: the W, and 72 points along the+// brain's lobed outline starting at the top centre and going counter-clockwise.+const W_PATH = [[-0.66, -0.38], [-0.34, 0.3], [0, -0.1], [0.34, 0.3], [0.66, -0.38]];+const OUTLINE = [+ 0.00, -0.82, -0.07, -0.87, -0.15, -0.89, -0.24, -0.88, -0.31, -0.84, -0.38, -0.79,+ -0.47, -0.79, -0.54, -0.75, -0.60, -0.69, -0.65, -0.63, -0.73, -0.59, -0.79, -0.53,+ -0.83, -0.46, -0.84, -0.37, -0.91, -0.32, -0.95, -0.25, -0.97, -0.16, -0.95, -0.08,+ -0.97, -0.01, -1.00, 0.07, -0.99, 0.16, -0.96, 0.23, -0.90, 0.28, -0.86, 0.35,+ -0.82, 0.43, -0.75, 0.47, -0.66, 0.48, -0.61, 0.53, -0.56, 0.60, -0.49, 0.64,+ -0.40, 0.65, -0.31, 0.65, -0.23, 0.63, -0.22, 0.55, -0.15, 0.51, -0.06, 0.51,+ 0.00, 0.47, 0.07, 0.51, 0.16, 0.51, 0.22, 0.55, 0.23, 0.63, 0.32, 0.65,+ 0.41, 0.65, 0.49, 0.63, 0.56, 0.59, 0.61, 0.52, 0.66, 0.47, 0.74, 0.47,+ 0.82, 0.43, 0.86, 0.35, 0.89, 0.28, 0.96, 0.23, 0.99, 0.16, 1.00, 0.07,+ 0.97, -0.01, 0.95, -0.08, 0.97, -0.16, 0.95, -0.25, 0.90, -0.32, 0.84, -0.37,+ 0.83, -0.46, 0.79, -0.53, 0.73, -0.59, 0.65, -0.63, 0.60, -0.69, 0.54, -0.75,+ 0.47, -0.79, 0.38, -0.79, 0.31, -0.85, 0.24, -0.88, 0.15, -0.89, 0.07, -0.87,+];+const OUTLINE_NOTCH = 36; // the bottom centre, where the brainstem hangs+const SURFACE = [6, 18, 30, 42, 54, 66]; // outline points that fire on their own++const SWEEP_EVERY_S = 1.55;+const SWEEP_SPEED = 4.6; // mark units per second: one pass over the W takes ~0.65s+const REFRACTORY_S = 0.35;++const clamp = (v, lo, hi) => Math.max(lo, Math.min(hi, v));+const mix = (a, b, t) => [0, 1, 2].map((i) => Math.round(a[i] + (b[i] - a[i]) * t));+const rgba = (c, a) => `rgba(${c[0]},${c[1]},${c[2]},${clamp(a, 0, 1).toFixed(3)})`;++function parseColor(value, fallback) {+ const text = String(value || '').trim();+ let m = /^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(text);+ if (m) {+ const hex = m[1].length === 3 ? m[1].replace(/./g, '$&$&') : m[1];+ return [0, 2, 4].map((i) => parseInt(hex.slice(i, i + 2), 16));+ }+ m = /^rgba?\(\s*([\d.]+)[\s,]+([\d.]+)[\s,]+([\d.]+)/i.exec(text);+ return m ? [m[1], m[2], m[3]].map((n) => Math.round(Number(n))) : fallback;+}++// Colors come from the theme tokens, so a theme switch restyles the indicator.+function readPalette(root) {+ const style = getComputedStyle(root);+ const dark = root.getAttribute('data-theme') !== 'light';+ const accent = parseColor(style.getPropertyValue('--accent'), dark ? [108, 99, 255] : [91, 82, 232]);+ const line = parseColor(style.getPropertyValue('--text-secondary'), dark ? [160, 160, 184] : [107, 91, 71]);+ if (dark) return { dark, line, glow: mix(accent, [255, 255, 255], 0.12), hot: mix(accent, [255, 255, 255], 0.88) };+ // On cream, light can't be brighter than the page, so a signal's core is a deeper accent instead.+ return { dark, line, glow: accent, hot: [accent[0] * 0.57, accent[1] * 0.51, accent[2] * 0.82].map(Math.round) };+}++function glowDot(ctx, x, y, r, core, halo, a) {+ const g = ctx.createRadialGradient(x, y, 0, x, y, r);+ g.addColorStop(0, rgba(core, a));+ g.addColorStop(0.25, rgba(halo, a * 0.7));+ g.addColorStop(1, rgba(halo, 0));+ ctx.fillStyle = g;+ ctx.beginPath();+ ctx.arc(x, y, r, 0, TAU);+ ctx.fill();+}++// A tapered ribbon through pts (head first), filled with a head-to-tail gradient.+function ribbon(ctx, pts, width, alpha, color) {+ const left = [], right = [];+ pts.forEach((p, i) => {+ const p0 = pts[Math.max(0, i - 1)], p1 = pts[Math.min(pts.length - 1, i + 1)];+ const tl = Math.hypot(p1[0] - p0[0], p1[1] - p0[1]) || 1;+ const nx = -(p1[1] - p0[1]) / tl, ny = (p1[0] - p0[0]) / tl;+ const hw = width(i) / 2;+ left.push([p[0] + nx * hw, p[1] + ny * hw]);+ right.push([p[0] - nx * hw, p[1] - ny * hw]);+ });+ ctx.beginPath();+ left.forEach(([x, y], i) => (i ? ctx.lineTo(x, y) : ctx.moveTo(x, y)));+ for (let i = right.length - 1; i >= 0; i--) ctx.lineTo(right[i][0], right[i][1]);+ ctx.closePath();+ const last = pts.length - 1;+ const g = ctx.createLinearGradient(pts[0][0], pts[0][1], pts[last][0], pts[last][1]);+ g.addColorStop(0, rgba(color(0), alpha(0)));+ g.addColorStop(1, rgba(color(last), alpha(last)));+ ctx.fillStyle = g;+ ctx.fill();+}++function createCircuit() {+ const half = SIZE * 0.42;+ const at = (x, y) => [SIZE / 2 + x * half, SIZE / 2 + y * half];+ const nodes = W_PATH.concat(SURFACE.map((k) => [OUTLINE[2 * k], OUTLINE[2 * k + 1]]))+ .map(([x, y], i) => ({ p: at(x, y), r: i < 5 ? 1.05 : 0.63, onW: i < 5, last: -9, flash: 0 }));+ const outline = [];+ for (let i = 0; i < OUTLINE.length; i += 2) outline.push(at(OUTLINE[i], OUTLINE[i + 1]));+ // The W's four strokes, each bent a little so the circuit doesn't look ruled.+ const strokes = [0, 1, 2, 3].map((i) => {+ const a = nodes[i].p, b = nodes[i + 1].p;+ const len = Math.hypot(b[0] - a[0], b[1] - a[1]);+ const bend = (Math.random() - 0.5) * 0.14 * len;+ const ctl = [(a[0] + b[0]) / 2 - ((b[1] - a[1]) / len) * bend, (a[1] + b[1]) / 2 + ((b[0] - a[0]) / len) * bend];+ return { a: i, b: i + 1, ctl, len: len * 1.04, glow: 0 };+ });+ const point = (e, s) => {+ const a = nodes[e.a].p, b = nodes[e.b].p, u = 1 - s;+ return [u * u * a[0] + 2 * u * s * e.ctl[0] + s * s * b[0], u * u * a[1] + 2 * u * s * e.ctl[1] + s * s * b[1]];+ };++ let t = 0;+ let lastNow = null;+ let nextSweep = 0.1;+ let nextSpark = 0.25;+ let forwardNext = true;+ let outlineGlow = 0;+ let pulse = null; // the signal on the W: { stroke, forward, s }++ function fire(i, force) {+ const n = nodes[i];+ if (!force && t - n.last < REFRACTORY_S) return;+ n.last = t;+ n.flash = 1;+ }++ function advance(now) {+ const dt = lastNow == null ? 1 / 60 : clamp((now - lastNow) / 1000, 0, 0.05);+ lastNow = now;+ t += dt;+ if (t >= nextSweep) {+ // Each sweep runs the whole W, alternating direction.+ const forward = forwardNext;+ forwardNext = !forwardNext;+ fire(forward ? 0 : 4, true);+ outlineGlow = 1;+ pulse = { stroke: forward ? 0 : 3, forward, s: 0 };+ nextSweep = t + SWEEP_EVERY_S;+ }+ if (t >= nextSpark) {+ fire(Math.floor(Math.random() * nodes.length), false);+ nextSpark = t + 0.35 + Math.random() * 0.5;+ }+ if (pulse) {+ let e = strokes[pulse.stroke];+ pulse.s += ((SWEEP_SPEED * half) / e.len) * dt;+ e.glow = 1;+ while (pulse && pulse.s >= 1) {+ fire(pulse.forward ? e.b : e.a, true);+ const next = pulse.stroke + (pulse.forward ? 1 : -1);+ if (next < 0 || next > 3) {+ pulse = null;+ break;+ }+ const carried = (pulse.s - 1) * e.len;+ e = strokes[next];+ pulse = { stroke: next, forward: pulse.forward, s: carried / e.len };+ e.glow = 1;+ }+ }+ const flashDecay = Math.exp(-dt / 0.2);+ const glowDecay = Math.exp(-dt / 0.38);+ nodes.forEach((n) => { n.flash *= flashDecay; });+ strokes.forEach((e) => { e.glow *= glowDecay; });+ outlineGlow *= Math.exp(-dt / 0.7);+ }++ function draw(ctx, scale, pal, still) {+ ctx.setTransform(scale, 0, 0, scale, 0, 0);+ ctx.clearRect(0, 0, SIZE, SIZE);+ ctx.lineCap = 'round';+ ctx.lineJoin = 'round';+ const lw = 0.9;+ const anatomy = rgba(pal.line, pal.dark ? 0.4 : 0.46);++ // The outline and the central fissure, from the top of the brain down to the W.+ ctx.beginPath();+ outline.forEach(([x, y], i) => (i ? ctx.lineTo(x, y) : ctx.moveTo(x, y)));+ ctx.closePath();+ ctx.moveTo(outline[0][0], outline[0][1] + half * 0.05);+ ctx.lineTo(nodes[2].p[0], nodes[2].p[1]);+ ctx.strokeStyle = anatomy;+ ctx.lineWidth = 0.8;+ ctx.stroke();+ if (!still && outlineGlow > 0.02) {+ ctx.strokeStyle = rgba(pal.glow, outlineGlow * (pal.dark ? 0.45 : 0.4));+ ctx.stroke();+ }+ const notch = outline[OUTLINE_NOTCH];+ ctx.beginPath();+ ctx.moveTo(notch[0], notch[1] + half * 0.04);+ ctx.lineTo(SIZE / 2, SIZE / 2 + half * 0.84);+ ctx.strokeStyle = anatomy;+ ctx.lineWidth = 1.7;+ ctx.stroke();++ // The W. A still frame keeps it softly lit so it still reads as working.+ strokes.forEach((e) => {+ const a = nodes[e.a].p, b = nodes[e.b].p;+ ctx.beginPath();+ ctx.moveTo(a[0], a[1]);+ ctx.quadraticCurveTo(e.ctl[0], e.ctl[1], b[0], b[1]);+ ctx.strokeStyle = rgba(pal.line, pal.dark ? 0.46 : 0.52);+ ctx.lineWidth = lw * 1.15;+ ctx.stroke();+ const glow = still ? 0.5 : e.glow;+ if (glow > 0.02) {+ ctx.strokeStyle = rgba(pal.glow, glow * (pal.dark ? 0.6 : 0.55));+ ctx.lineWidth = lw * 1.5;+ ctx.stroke();+ }+ });++ const light = pal.dark ? 'lighter' : 'source-over';+ if (!still && pulse) {+ ctx.globalCompositeOperation = light;+ const e = strokes[pulse.stroke];+ const head = pulse.forward ? pulse.s : 1 - pulse.s;+ const span = (SIZE * 0.3) / e.len;+ const pts = [point(e, head)];+ for (let k = 1; k <= 5; k++) {+ const s = head + ((pulse.forward ? -1 : 1) * span * k) / 5;+ if (s < 0 || s > 1) break;+ pts.push(point(e, s));+ }+ if (pts.length > 1) {+ ribbon(ctx, pts, (i) => lw * (2.4 - 1.8 * (i / 5)), (i) => (1 - i / 5) * 0.9, (i) => mix(pal.hot, pal.glow, i / 5));+ }+ glowDot(ctx, pts[0][0], pts[0][1], 2.1 * (pal.dark ? 1.7 : 1.3), pal.hot, pal.glow, pal.dark ? 1 : 0.9);+ }++ nodes.forEach((n) => {+ const f = still ? 0 : n.flash;+ if (f > 0.03) {+ ctx.globalCompositeOperation = light;+ glowDot(ctx, n.p[0], n.p[1], n.r * (2.6 + 3.2 * f), pal.hot, pal.glow, (pal.dark ? 0.9 : 0.42) * f);+ }+ ctx.globalCompositeOperation = 'source-over';+ ctx.beginPath();+ ctx.arc(n.p[0], n.p[1], n.r * (1 + 0.5 * f), 0, TAU);+ ctx.fillStyle = f > 0.05+ ? rgba(mix(pal.line, pal.hot, Math.min(1, f * 1.4)), 0.6 + 0.4 * f)+ : rgba(pal.line, n.onW ? (pal.dark ? 0.72 : 0.75) : pal.dark ? 0.32 : 0.38);+ ctx.fill();+ });+ ctx.globalCompositeOperation = 'source-over';+ }++ return {+ advance,+ draw,+ // After a pause, continue from where the circuit was instead of jumping ahead.+ resume() { lastNow = null; },+ };+}++/** Drive the `canvas.activity-brain` inside the activity bar. Returns `{ destroy }`. */+export function mountActivityBrain(bar) {+ const canvas = bar?.querySelector?.('canvas.activity-brain');+ let ctx = null;+ try { ctx = canvas?.getContext?.('2d') || null; } catch { ctx = null; }+ // Without a canvas the label still says what is happening; nothing else depends on this.+ if (!ctx) return { destroy() {} };++ const root = document.documentElement;+ const reduceMotion = window.matchMedia?.('(prefers-reduced-motion: reduce)') || null;+ const circuit = createCircuit();+ let palette = readPalette(root);+ let scale = 2;+ let frame = 0;++ const shown = () => !bar.classList.contains('hidden') && document.visibilityState !== 'hidden';++ function restyle() {+ palette = readPalette(root);+ // Back the 22px box with enough pixels for the screen and the panel's UI zoom.+ const zoom = Number.parseFloat(getComputedStyle(root).getPropertyValue('--ui-scale-zoom')) || 1;+ scale = clamp((window.devicePixelRatio || 1) * zoom, 1, 4);+ const px = Math.round(SIZE * scale);+ if (canvas.width !== px) {+ canvas.width = px;+ canvas.height = px;+ }+ }++ function tick(now) {+ circuit.advance(now);+ circuit.draw(ctx, scale, palette, false);+ frame = requestAnimationFrame(tick);+ }++ function stop() {+ if (frame) cancelAnimationFrame(frame);+ frame = 0;+ }++ function sync() {+ if (!shown()) {+ stop();+ return;+ }+ restyle();+ if (reduceMotion?.matches) {+ stop();+ circuit.draw(ctx, scale, palette, true);+ return;+ }+ if (!frame) {+ circuit.resume();+ frame = requestAnimationFrame(tick);+ }+ }++ const barWatch = new MutationObserver(sync);+ barWatch.observe(bar, { attributes: true, attributeFilter: ['class'] });+ // Theme switches and the panel's UI zoom both land on <html>.+ const rootWatch = new MutationObserver(sync);+ rootWatch.observe(root, { attributes: true, attributeFilter: ['data-theme', 'style'] });+ document.addEventListener('visibilitychange', sync);+ reduceMotion?.addEventListener?.('change', sync);+ sync();++ return {+ destroy() {+ stop();+ barWatch.disconnect();+ rootWatch.disconnect();+ document.removeEventListener('visibilitychange', sync);+ reduceMotion?.removeEventListener?.('change', sync);+ },+ };+}diff --git a/src/chrome/src/ui/sidepanel.html b/src/chrome/src/ui/sidepanel.htmlindex f0e5c95b3..1a69b0184 100644--- a/src/chrome/src/ui/sidepanel.html+++ b/src/chrome/src/ui/sidepanel.html@@ -334,7 +334,7 @@<!-- Agent Activity Indicator --><div id="agent-activity" class="hidden"><button id="activity-progress-toggle" type="button" aria-controls="messages" aria-expanded="true" aria-label="Toggle activity history" data-i18n-aria-label="sp.activity.toggle_history">- <span class="activity-spinner" aria-hidden="true"></span>+ <canvas class="activity-brain" width="44" height="44" aria-hidden="true"></canvas><span id="activity-text" aria-hidden="true" data-i18n="sp.activity.thinking"></span></button><span id="activity-live-status" role="status" aria-live="polite" aria-atomic="true"></span>diff --git a/src/chrome/src/ui/sidepanel.js b/src/chrome/src/ui/sidepanel.jsindex df31c0014..08275af7b 100644--- a/src/chrome/src/ui/sidepanel.js+++ b/src/chrome/src/ui/sidepanel.js@@ -10,6 +10,7 @@ import { appendGeneratedMedia, restoreGeneratedMedia } from './generated-media-vimport { createQuotaController } from './compass-quota.js';import { createTimeoutRing, updateTimeoutRing } from './timeout-ring.js';+import { mountActivityBrain } from './activity-brain.js';import { createComposerModePins } from './composer-mode-pin.js';import { reportSidePanelPresence } from '../sidepanel-presence.js';import { t, getLocale, setLocale, LANGUAGES, applyDOMTranslations, translationsForKey } from './i18n.js';@@ -826,6 +827,7 @@ const agentActivity = document.getElementById('agent-activity');const activityProgressToggle = document.getElementById('activity-progress-toggle');const activityText = document.getElementById('activity-text');const activityLiveStatus = document.getElementById('activity-live-status');+mountActivityBrain(agentActivity);const modeAskBtn = document.getElementById('btn-mode-ask');const modeActBtn = document.getElementById('btn-mode-act');const modeDevBtn = document.getElementById('btn-mode-dev');diff --git a/src/chrome/styles/sidepanel.css b/src/chrome/styles/sidepanel.cssindex a77e48e8b..f225d83ff 100644--- a/src/chrome/styles/sidepanel.css+++ b/src/chrome/styles/sidepanel.css@@ -2699,13 +2699,15 @@ html[dir="rtl"] .language-picker-menu {}}-.activity-spinner {- width: 14px;- height: 14px;- border: 2px solid var(--border);- border-top-color: var(--accent);- border-radius: 50%;- animation: spin 0.8s linear infinite;+/* The working indicator (activity-brain.js) draws into a 22px canvas. The+ negative margin leaves it the old 14px spinner's footprint, so the bar keeps+ its height and the label stays where it was. */+.activity-brain {+ display: block;+ flex-shrink: 0;+ width: 22px;+ height: 22px;+ margin: -4px;}@keyframes spin {diff --git a/src/firefox/src/ui/activity-brain.js b/src/firefox/src/ui/activity-brain.jsnew file mode 100644index 000000000..98f88c970--- /dev/null+++ b/src/firefox/src/ui/activity-brain.js@@ -0,0 +1,342 @@+// The activity bar's working indicator: the WebBrain mark as a tiny neural+// circuit. A signal keeps tracing the W, the brain's outline brightens as it+// passes, and a few neurons on the outline fire at random. It animates only+// while the bar is shown and the panel is visible, and holds one still frame+// under prefers-reduced-motion. Purely decorative: #activity-live-status+// announces what the agent is doing.+//+// A canvas rather than SVG/CSS because each signal has a tapered tail drawn+// with additive light on dark themes; at 22px that reads as a spark, where a+// moving stroke dash reads as a line. The directions we explored before this+// one are kept in assets/loader-candidates/.++const TAU = Math.PI * 2;+// CSS box of the indicator; keep in sync with .activity-brain in sidepanel.css.+const SIZE = 22;++// Geometry in the mark's own unit space (x right, y down, the brain spans+// x β1β¦1), traced from assets/logo-mark.png: the W, and 72 points along the+// brain's lobed outline starting at the top centre and going counter-clockwise.+const W_PATH = [[-0.66, -0.38], [-0.34, 0.3], [0, -0.1], [0.34, 0.3], [0.66, -0.38]];+const OUTLINE = [+ 0.00, -0.82, -0.07, -0.87, -0.15, -0.89, -0.24, -0.88, -0.31, -0.84, -0.38, -0.79,+ -0.47, -0.79, -0.54, -0.75, -0.60, -0.69, -0.65, -0.63, -0.73, -0.59, -0.79, -0.53,+ -0.83, -0.46, -0.84, -0.37, -0.91, -0.32, -0.95, -0.25, -0.97, -0.16, -0.95, -0.08,+ -0.97, -0.01, -1.00, 0.07, -0.99, 0.16, -0.96, 0.23, -0.90, 0.28, -0.86, 0.35,+ -0.82, 0.43, -0.75, 0.47, -0.66, 0.48, -0.61, 0.53, -0.56, 0.60, -0.49, 0.64,+ -0.40, 0.65, -0.31, 0.65, -0.23, 0.63, -0.22, 0.55, -0.15, 0.51, -0.06, 0.51,+ 0.00, 0.47, 0.07, 0.51, 0.16, 0.51, 0.22, 0.55, 0.23, 0.63, 0.32, 0.65,+ 0.41, 0.65, 0.49, 0.63, 0.56, 0.59, 0.61, 0.52, 0.66, 0.47, 0.74, 0.47,+ 0.82, 0.43, 0.86, 0.35, 0.89, 0.28, 0.96, 0.23, 0.99, 0.16, 1.00, 0.07,+ 0.97, -0.01, 0.95, -0.08, 0.97, -0.16, 0.95, -0.25, 0.90, -0.32, 0.84, -0.37,+ 0.83, -0.46, 0.79, -0.53, 0.73, -0.59, 0.65, -0.63, 0.60, -0.69, 0.54, -0.75,+ 0.47, -0.79, 0.38, -0.79, 0.31, -0.85, 0.24, -0.88, 0.15, -0.89, 0.07, -0.87,+];+const OUTLINE_NOTCH = 36; // the bottom centre, where the brainstem hangs+const SURFACE = [6, 18, 30, 42, 54, 66]; // outline points that fire on their own++const SWEEP_EVERY_S = 1.55;+const SWEEP_SPEED = 4.6; // mark units per second: one pass over the W takes ~0.65s+const REFRACTORY_S = 0.35;++const clamp = (v, lo, hi) => Math.max(lo, Math.min(hi, v));+const mix = (a, b, t) => [0, 1, 2].map((i) => Math.round(a[i] + (b[i] - a[i]) * t));+const rgba = (c, a) => `rgba(${c[0]},${c[1]},${c[2]},${clamp(a, 0, 1).toFixed(3)})`;++function parseColor(value, fallback) {+ const text = String(value || '').trim();+ let m = /^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(text);+ if (m) {+ const hex = m[1].length === 3 ? m[1].replace(/./g, '$&$&') : m[1];+ return [0, 2, 4].map((i) => parseInt(hex.slice(i, i + 2), 16));+ }+ m = /^rgba?\(\s*([\d.]+)[\s,]+([\d.]+)[\s,]+([\d.]+)/i.exec(text);+ return m ? [m[1], m[2], m[3]].map((n) => Math.round(Number(n))) : fallback;+}++// Colors come from the theme tokens, so a theme switch restyles the indicator.+function readPalette(root) {+ const style = getComputedStyle(root);+ const dark = root.getAttribute('data-theme') !== 'light';+ const accent = parseColor(style.getPropertyValue('--accent'), dark ? [108, 99, 255] : [91, 82, 232]);+ const line = parseColor(style.getPropertyValue('--text-secondary'), dark ? [160, 160, 184] : [107, 91, 71]);+ if (dark) return { dark, line, glow: mix(accent, [255, 255, 255], 0.12), hot: mix(accent, [255, 255, 255], 0.88) };+ // On cream, light can't be brighter than the page, so a signal's core is a deeper accent instead.+ return { dark, line, glow: accent, hot: [accent[0] * 0.57, accent[1] * 0.51, accent[2] * 0.82].map(Math.round) };+}++function glowDot(ctx, x, y, r, core, halo, a) {+ const g = ctx.createRadialGradient(x, y, 0, x, y, r);+ g.addColorStop(0, rgba(core, a));+ g.addColorStop(0.25, rgba(halo, a * 0.7));+ g.addColorStop(1, rgba(halo, 0));+ ctx.fillStyle = g;+ ctx.beginPath();+ ctx.arc(x, y, r, 0, TAU);+ ctx.fill();+}++// A tapered ribbon through pts (head first), filled with a head-to-tail gradient.+function ribbon(ctx, pts, width, alpha, color) {+ const left = [], right = [];+ pts.forEach((p, i) => {+ const p0 = pts[Math.max(0, i - 1)], p1 = pts[Math.min(pts.length - 1, i + 1)];+ const tl = Math.hypot(p1[0] - p0[0], p1[1] - p0[1]) || 1;+ const nx = -(p1[1] - p0[1]) / tl, ny = (p1[0] - p0[0]) / tl;+ const hw = width(i) / 2;+ left.push([p[0] + nx * hw, p[1] + ny * hw]);+ right.push([p[0] - nx * hw, p[1] - ny * hw]);+ });+ ctx.beginPath();+ left.forEach(([x, y], i) => (i ? ctx.lineTo(x, y) : ctx.moveTo(x, y)));+ for (let i = right.length - 1; i >= 0; i--) ctx.lineTo(right[i][0], right[i][1]);+ ctx.closePath();+ const last = pts.length - 1;+ const g = ctx.createLinearGradient(pts[0][0], pts[0][1], pts[last][0], pts[last][1]);+ g.addColorStop(0, rgba(color(0), alpha(0)));+ g.addColorStop(1, rgba(color(last), alpha(last)));+ ctx.fillStyle = g;+ ctx.fill();+}++function createCircuit() {+ const half = SIZE * 0.42;+ const at = (x, y) => [SIZE / 2 + x * half, SIZE / 2 + y * half];+ const nodes = W_PATH.concat(SURFACE.map((k) => [OUTLINE[2 * k], OUTLINE[2 * k + 1]]))+ .map(([x, y], i) => ({ p: at(x, y), r: i < 5 ? 1.05 : 0.63, onW: i < 5, last: -9, flash: 0 }));+ const outline = [];+ for (let i = 0; i < OUTLINE.length; i += 2) outline.push(at(OUTLINE[i], OUTLINE[i + 1]));+ // The W's four strokes, each bent a little so the circuit doesn't look ruled.+ const strokes = [0, 1, 2, 3].map((i) => {+ const a = nodes[i].p, b = nodes[i + 1].p;+ const len = Math.hypot(b[0] - a[0], b[1] - a[1]);+ const bend = (Math.random() - 0.5) * 0.14 * len;+ const ctl = [(a[0] + b[0]) / 2 - ((b[1] - a[1]) / len) * bend, (a[1] + b[1]) / 2 + ((b[0] - a[0]) / len) * bend];+ return { a: i, b: i + 1, ctl, len: len * 1.04, glow: 0 };+ });+ const point = (e, s) => {+ const a = nodes[e.a].p, b = nodes[e.b].p, u = 1 - s;+ return [u * u * a[0] + 2 * u * s * e.ctl[0] + s * s * b[0], u * u * a[1] + 2 * u * s * e.ctl[1] + s * s * b[1]];+ };++ let t = 0;+ let lastNow = null;+ let nextSweep = 0.1;+ let nextSpark = 0.25;+ let forwardNext = true;+ let outlineGlow = 0;+ let pulse = null; // the signal on the W: { stroke, forward, s }++ function fire(i, force) {+ const n = nodes[i];+ if (!force && t - n.last < REFRACTORY_S) return;+ n.last = t;+ n.flash = 1;+ }++ function advance(now) {+ const dt = lastNow == null ? 1 / 60 : clamp((now - lastNow) / 1000, 0, 0.05);+ lastNow = now;+ t += dt;+ if (t >= nextSweep) {+ // Each sweep runs the whole W, alternating direction.+ const forward = forwardNext;+ forwardNext = !forwardNext;+ fire(forward ? 0 : 4, true);+ outlineGlow = 1;+ pulse = { stroke: forward ? 0 : 3, forward, s: 0 };+ nextSweep = t + SWEEP_EVERY_S;+ }+ if (t >= nextSpark) {+ fire(Math.floor(Math.random() * nodes.length), false);+ nextSpark = t + 0.35 + Math.random() * 0.5;+ }+ if (pulse) {+ let e = strokes[pulse.stroke];+ pulse.s += ((SWEEP_SPEED * half) / e.len) * dt;+ e.glow = 1;+ while (pulse && pulse.s >= 1) {+ fire(pulse.forward ? e.b : e.a, true);+ const next = pulse.stroke + (pulse.forward ? 1 : -1);+ if (next < 0 || next > 3) {+ pulse = null;+ break;+ }+ const carried = (pulse.s - 1) * e.len;+ e = strokes[next];+ pulse = { stroke: next, forward: pulse.forward, s: carried / e.len };+ e.glow = 1;+ }+ }+ const flashDecay = Math.exp(-dt / 0.2);+ const glowDecay = Math.exp(-dt / 0.38);+ nodes.forEach((n) => { n.flash *= flashDecay; });+ strokes.forEach((e) => { e.glow *= glowDecay; });+ outlineGlow *= Math.exp(-dt / 0.7);+ }++ function draw(ctx, scale, pal, still) {+ ctx.setTransform(scale, 0, 0, scale, 0, 0);+ ctx.clearRect(0, 0, SIZE, SIZE);+ ctx.lineCap = 'round';+ ctx.lineJoin = 'round';+ const lw = 0.9;+ const anatomy = rgba(pal.line, pal.dark ? 0.4 : 0.46);++ // The outline and the central fissure, from the top of the brain down to the W.+ ctx.beginPath();+ outline.forEach(([x, y], i) => (i ? ctx.lineTo(x, y) : ctx.moveTo(x, y)));+ ctx.closePath();+ ctx.moveTo(outline[0][0], outline[0][1] + half * 0.05);+ ctx.lineTo(nodes[2].p[0], nodes[2].p[1]);+ ctx.strokeStyle = anatomy;+ ctx.lineWidth = 0.8;+ ctx.stroke();+ if (!still && outlineGlow > 0.02) {+ ctx.strokeStyle = rgba(pal.glow, outlineGlow * (pal.dark ? 0.45 : 0.4));+ ctx.stroke();+ }+ const notch = outline[OUTLINE_NOTCH];+ ctx.beginPath();+ ctx.moveTo(notch[0], notch[1] + half * 0.04);+ ctx.lineTo(SIZE / 2, SIZE / 2 + half * 0.84);+ ctx.strokeStyle = anatomy;+ ctx.lineWidth = 1.7;+ ctx.stroke();++ // The W. A still frame keeps it softly lit so it still reads as working.+ strokes.forEach((e) => {+ const a = nodes[e.a].p, b = nodes[e.b].p;+ ctx.beginPath();+ ctx.moveTo(a[0], a[1]);+ ctx.quadraticCurveTo(e.ctl[0], e.ctl[1], b[0], b[1]);+ ctx.strokeStyle = rgba(pal.line, pal.dark ? 0.46 : 0.52);+ ctx.lineWidth = lw * 1.15;+ ctx.stroke();+ const glow = still ? 0.5 : e.glow;+ if (glow > 0.02) {+ ctx.strokeStyle = rgba(pal.glow, glow * (pal.dark ? 0.6 : 0.55));+ ctx.lineWidth = lw * 1.5;+ ctx.stroke();+ }+ });++ const light = pal.dark ? 'lighter' : 'source-over';+ if (!still && pulse) {+ ctx.globalCompositeOperation = light;+ const e = strokes[pulse.stroke];+ const head = pulse.forward ? pulse.s : 1 - pulse.s;+ const span = (SIZE * 0.3) / e.len;+ const pts = [point(e, head)];+ for (let k = 1; k <= 5; k++) {+ const s = head + ((pulse.forward ? -1 : 1) * span * k) / 5;+ if (s < 0 || s > 1) break;+ pts.push(point(e, s));+ }+ if (pts.length > 1) {+ ribbon(ctx, pts, (i) => lw * (2.4 - 1.8 * (i / 5)), (i) => (1 - i / 5) * 0.9, (i) => mix(pal.hot, pal.glow, i / 5));+ }+ glowDot(ctx, pts[0][0], pts[0][1], 2.1 * (pal.dark ? 1.7 : 1.3), pal.hot, pal.glow, pal.dark ? 1 : 0.9);+ }++ nodes.forEach((n) => {+ const f = still ? 0 : n.flash;+ if (f > 0.03) {+ ctx.globalCompositeOperation = light;+ glowDot(ctx, n.p[0], n.p[1], n.r * (2.6 + 3.2 * f), pal.hot, pal.glow, (pal.dark ? 0.9 : 0.42) * f);+ }+ ctx.globalCompositeOperation = 'source-over';+ ctx.beginPath();+ ctx.arc(n.p[0], n.p[1], n.r * (1 + 0.5 * f), 0, TAU);+ ctx.fillStyle = f > 0.05+ ? rgba(mix(pal.line, pal.hot, Math.min(1, f * 1.4)), 0.6 + 0.4 * f)+ : rgba(pal.line, n.onW ? (pal.dark ? 0.72 : 0.75) : pal.dark ? 0.32 : 0.38);+ ctx.fill();+ });+ ctx.globalCompositeOperation = 'source-over';+ }++ return {+ advance,+ draw,+ // After a pause, continue from where the circuit was instead of jumping ahead.+ resume() { lastNow = null; },+ };+}++/** Drive the `canvas.activity-brain` inside the activity bar. Returns `{ destroy }`. */+export function mountActivityBrain(bar) {+ const canvas = bar?.querySelector?.('canvas.activity-brain');+ let ctx = null;+ try { ctx = canvas?.getContext?.('2d') || null; } catch { ctx = null; }+ // Without a canvas the label still says what is happening; nothing else depends on this.+ if (!ctx) return { destroy() {} };++ const root = document.documentElement;+ const reduceMotion = window.matchMedia?.('(prefers-reduced-motion: reduce)') || null;+ const circuit = createCircuit();+ let palette = readPalette(root);+ let scale = 2;+ let frame = 0;++ const shown = () => !bar.classList.contains('hidden') && document.visibilityState !== 'hidden';++ function restyle() {+ palette = readPalette(root);+ // Back the 22px box with enough pixels for the screen and the panel's UI zoom.+ const zoom = Number.parseFloat(getComputedStyle(root).getPropertyValue('--ui-scale-zoom')) || 1;+ scale = clamp((window.devicePixelRatio || 1) * zoom, 1, 4);+ const px = Math.round(SIZE * scale);+ if (canvas.width !== px) {+ canvas.width = px;+ canvas.height = px;+ }+ }++ function tick(now) {+ circuit.advance(now);+ circuit.draw(ctx, scale, palette, false);+ frame = requestAnimationFrame(tick);+ }++ function stop() {+ if (frame) cancelAnimationFrame(frame);+ frame = 0;+ }++ function sync() {+ if (!shown()) {+ stop();+ return;+ }+ restyle();+ if (reduceMotion?.matches) {+ stop();+ circuit.draw(ctx, scale, palette, true);+ return;+ }+ if (!frame) {+ circuit.resume();+ frame = requestAnimationFrame(tick);+ }+ }++ const barWatch = new MutationObserver(sync);+ barWatch.observe(bar, { attributes: true, attributeFilter: ['class'] });+ // Theme switches and the panel's UI zoom both land on <html>.+ const rootWatch = new MutationObserver(sync);+ rootWatch.observe(root, { attributes: true, attributeFilter: ['data-theme', 'style'] });+ document.addEventListener('visibilitychange', sync);+ reduceMotion?.addEventListener?.('change', sync);+ sync();++ return {+ destroy() {+ stop();+ barWatch.disconnect();+ rootWatch.disconnect();+ document.removeEventListener('visibilitychange', sync);+ reduceMotion?.removeEventListener?.('change', sync);+ },+ };+}diff --git a/src/firefox/src/ui/sidepanel.html b/src/firefox/src/ui/sidepanel.htmlindex f2b9c10c4..f87199924 100644--- a/src/firefox/src/ui/sidepanel.html+++ b/src/firefox/src/ui/sidepanel.html@@ -295,7 +295,7 @@<!-- Agent Activity Indicator --><div id="agent-activity" class="hidden"><button id="activity-progress-toggle" type="button" aria-controls="messages" aria-expanded="true" aria-label="Toggle activity history" data-i18n-aria-label="sp.activity.toggle_history">- <span class="activity-spinner" aria-hidden="true"></span>+ <canvas class="activity-brain" width="44" height="44" aria-hidden="true"></canvas><span id="activity-text" aria-hidden="true" data-i18n="sp.activity.thinking"></span></button><span id="activity-live-status" role="status" aria-live="polite" aria-atomic="true"></span>diff --git a/src/firefox/src/ui/sidepanel.js b/src/firefox/src/ui/sidepanel.jsindex 394a3ad56..4e79bbdb7 100644--- a/src/firefox/src/ui/sidepanel.js+++ b/src/firefox/src/ui/sidepanel.js@@ -10,6 +10,7 @@ import { saveScreenshot } from './screenshot-download.js';import { createQuotaController } from './compass-quota.js';import { createTimeoutRing, updateTimeoutRing } from './timeout-ring.js';+import { mountActivityBrain } from './activity-brain.js';import { createComposerModePins } from './composer-mode-pin.js';import { t, getLocale, setLocale, LANGUAGES, applyDOMTranslations, translationsForKey } from './i18n.js';import { CAPABILITY_LABEL } from '../agent/permission-gate.js';@@ -701,6 +702,7 @@ const agentActivity = document.getElementById('agent-activity');const activityProgressToggle = document.getElementById('activity-progress-toggle');const activityText = document.getElementById('activity-text');const activityLiveStatus = document.getElementById('activity-live-status');+mountActivityBrain(agentActivity);const modeAskBtn = document.getElementById('btn-mode-ask');const modeActBtn = document.getElementById('btn-mode-act');const modeDevBtn = document.getElementById('btn-mode-dev');diff --git a/src/firefox/styles/sidepanel.css b/src/firefox/styles/sidepanel.cssindex 1a0e5874c..6dfa90a53 100644--- a/src/firefox/styles/sidepanel.css+++ b/src/firefox/styles/sidepanel.css@@ -2531,13 +2531,15 @@ html[dir="rtl"] .language-picker-menu {}}-.activity-spinner {- width: 14px;- height: 14px;- border: 2px solid var(--border);- border-top-color: var(--accent);- border-radius: 50%;- animation: spin 0.8s linear infinite;+/* The working indicator (activity-brain.js) draws into a 22px canvas. The+ negative margin leaves it the old 14px spinner's footprint, so the bar keeps+ its height and the label stays where it was. */+.activity-brain {+ display: block;+ flex-shrink: 0;+ width: 22px;+ height: 22px;+ margin: -4px;}@keyframes spin {diff --git a/test/activity-brain-ui.mjs b/test/activity-brain-ui.mjsnew file mode 100644index 000000000..649770ebe--- /dev/null+++ b/test/activity-brain-ui.mjs@@ -0,0 +1,111 @@+import assert from 'node:assert/strict';+import fs from 'node:fs';+import { test } from 'node:test';+import { chromium, firefox } from 'playwright';++const read = (build, file) => fs.readFileSync(new URL(`../src/${build}/${file}`, import.meta.url), 'utf8').replace(/\r\n/g, '\n');++test('the activity indicator module is identical in both builds', () => {+ assert.equal(read('chrome', 'src/ui/activity-brain.js'), read('firefox', 'src/ui/activity-brain.js'));+});++for (const [build, engine] of [['chrome', chromium], ['firefox', firefox]]) {+ // The real activity bar markup and stylesheet, with the module run as a classic script.+ async function openBar({ theme = 'dark', reducedMotion = 'no-preference', deviceScaleFactor = 1 } = {}) {+ const browser = await engine.launch({ headless: true });+ const context = await browser.newContext({ viewport: { width: 380, height: 200 }, deviceScaleFactor, reducedMotion });+ const page = await context.newPage();+ const errors = [];+ page.on('pageerror', (error) => errors.push(error.message));+ const html = read(build, 'src/ui/sidepanel.html');+ const start = html.indexOf('<div id="agent-activity"');+ const end = html.indexOf('<!-- Act Mode Warning Banner -->', start);+ assert.ok(start >= 0 && end > start, 'activity bar markup missing');+ await page.setContent(`<!doctype html><html data-theme="${theme}"><head><style>${read(build, 'styles/sidepanel.css')}</style></head>`+ + `<body>${html.slice(start, end)}</body></html>`);+ await page.addScriptTag({ content: `+ window.__frames = 0;+ const nativeRaf = window.requestAnimationFrame.bind(window);+ window.requestAnimationFrame = (callback) => nativeRaf((now) => { window.__frames += 1; callback(now); });+ window.__ink = () => {+ const canvas = document.querySelector('#agent-activity canvas.activity-brain');+ const { data } = canvas.getContext('2d').getImageData(0, 0, canvas.width, canvas.height);+ let ink = 0;+ for (let i = 3; i < data.length; i += 4) if (data[i] > 24) ink += 1;+ return ink;+ };+ window.__pixels = () => {+ const canvas = document.querySelector('#agent-activity canvas.activity-brain');+ return Array.from(canvas.getContext('2d').getImageData(0, 0, canvas.width, canvas.height).data).join(',');+ };+ ${read(build, 'src/ui/activity-brain.js').replace(/^export function /m, 'function ')}+ window.__brain = mountActivityBrain(document.getElementById('agent-activity'));+ ` });+ return { browser, page, errors };+ }+ const show = (page) => page.evaluate(() => document.getElementById('agent-activity').classList.remove('hidden'));+ const hide = (page) => page.evaluate(() => document.getElementById('agent-activity').classList.add('hidden'));++ test(`${build}: the indicator animates only while the activity bar is shown`, async () => {+ const { browser, page, errors } = await openBar({ deviceScaleFactor: 2 });+ try {+ await page.waitForTimeout(250);+ assert.equal(await page.evaluate(() => window.__frames), 0, 'no frames while the bar is hidden');+ assert.equal(await page.evaluate(() => window.__ink()), 0, 'nothing drawn while the bar is hidden');++ await show(page);+ await page.waitForTimeout(400);+ assert.ok(await page.evaluate(() => window.__frames) > 5, 'frames run once the bar is shown');+ assert.ok(await page.evaluate(() => window.__ink()) > 200, 'the brain is drawn');+ assert.equal(await page.evaluate(() => document.querySelector('canvas.activity-brain').width), 44, 'backed for a 2x screen');+ const before = await page.evaluate(() => window.__pixels());+ await page.waitForTimeout(350);+ assert.notEqual(await page.evaluate(() => window.__pixels()), before, 'the circuit keeps moving');++ await hide(page);+ await page.waitForTimeout(50);+ const stopped = await page.evaluate(() => window.__frames);+ await page.waitForTimeout(300);+ assert.equal(await page.evaluate(() => window.__frames), stopped, 'frames stop once the bar is hidden');+ assert.deepEqual(errors, []);+ } finally { await browser.close(); }+ });++ test(`${build}: the 22px indicator keeps the bar's height and the label's place`, async () => {+ const { browser, page } = await openBar();+ try {+ await show(page);+ const box = await page.evaluate(() => {+ const bar = document.getElementById('agent-activity');+ const canvas = bar.querySelector('canvas.activity-brain');+ const label = document.getElementById('activity-text');+ const withIndicator = { height: bar.getBoundingClientRect().height, label: label.getBoundingClientRect().left - bar.getBoundingClientRect().left };+ canvas.style.display = 'none';+ const withoutIndicator = bar.getBoundingClientRect().height;+ canvas.style.display = '';+ const rect = canvas.getBoundingClientRect();+ return { ...withIndicator, withoutIndicator, width: rect.width, canvasHeight: rect.height };+ });+ assert.equal(box.width, 22);+ assert.equal(box.canvasHeight, 22);+ assert.equal(box.height, box.withoutIndicator, 'the indicator does not make the bar taller');+ // 14px padding + the old 14px spinner + the 8px gap.+ assert.equal(Math.round(box.label), 36, 'the label starts where it did next to the old spinner');+ } finally { await browser.close(); }+ });++ test(`${build}: reduced motion holds a still frame, light theme included`, async () => {+ const { browser, page, errors } = await openBar({ theme: 'light', reducedMotion: 'reduce', deviceScaleFactor: 2 });+ try {+ await show(page);+ await page.waitForTimeout(300);+ assert.equal(await page.evaluate(() => window.__frames), 0, 'no animation loop under reduced motion');+ const still = await page.evaluate(() => window.__ink());+ assert.ok(still > 200, `a still brain is drawn (${still} inked pixels)`);+ await page.evaluate(() => document.documentElement.setAttribute('data-theme', 'dark'));+ await page.waitForTimeout(100);+ assert.ok(await page.evaluate(() => window.__ink()) > 200, 'a theme switch redraws the still frame');+ assert.deepEqual(errors, []);+ } finally { await browser.close(); }+ });+}