Hexagonal crystals wallpaper
Purpose
The wallpaper of the shell is drawn by a web page with WebGL (crystals, aurora, nebula, matrix, black hole, skyline, neoedo) that follows the profile palette and the canvas camera through a read-only channel from the core. This spec indexes its binding rules.
Requirements
Requirement: Wallpaper effect is a protected setting
The system SHALL let only the protected settings choose the protected setting wallpaperEffect (crystals, aurora, nebula, matrix, black-hole, skyline or neoedo) through /api/wallpaper-effect, which writes the entry of the active window theme; the default is the wallpaper of that theme (openspec/specs/ui-themes/spec.md). Full text: section Binding contract (from AGENTS.md).
Scenario: Wallpaper effect is a protected setting
- WHEN the user picks an effect in the protected settings
- THEN the choice reaches the core through
/api/wallpaper-effectand is saved inwallpaperByThemefor the active theme
Requirement: Read-only wallpaper stream with the launch cookie
The system SHALL give the wallpaper page the effect and the palette revision only through the read-only stream GET /desktop-wallpaper/events, which takes the launch cookie and no x-shell-token. Its CSP connect-src MUST name that exact URL, and /desktop-wallpaper and /desktop-wallpaper.png MUST also need the cookie. Full text: section Binding contract (from AGENTS.md).
Scenario: Read-only wallpaper stream with the launch cookie
- WHEN a request for the stream carries no launch cookie
- THEN the core answers 403
Requirement: Own wallpaper partition with an exact allowlist
The wallpaper window SHALL have its own partition agent-native-wallpaper with an exact request allowlist, and the allowlist SHALL have no /api/ prefix, so the page gets no /api/ route at all. Full text: section Binding contract (from AGENTS.md).
Scenario: Own wallpaper partition with an exact allowlist
- WHEN the wallpaper page requests a URL outside the allowlist
- THEN the request is cancelled
Requirement: No agent or plugin access to the wallpaper setting and stream
The system MUST NOT let any agent tool, MCP entry, scheduled turn, generated HTML or plugin panel reach the wallpaper effect setting, its route or its stream. Full text: section Binding contract (from AGENTS.md).
Scenario: No agent or plugin access to the wallpaper setting and stream
- WHEN an agent tool or generated HTML tries to change the wallpaper effect
- THEN it has no route, setting or stream to reach
Requirement: Text regions come only from the protected host
Only the protected chat host (and the recovery page, which sends an empty list) SHALL report the text it draws on the wallpaper, through POST /api/wallpaper-text-regions with the shell token, at most 4096 bytes, exact keys, at most six rectangles of safe integers and an output that must exist. Full text: section Binding contract (from AGENTS.md).
Scenario: Text regions come only from the protected host
- WHEN a report has an
outputthat does not exist or more than six rectangles - THEN the report is not accepted under the stated contract
Requirement: Text regions stay in the core memory
The core SHALL keep one text-region report for each output in memory, map it with its own window and output state, and send only rounded legibility regions on the wallpaper stream. Nothing SHALL go to the compositor or to disk. Full text: section Binding contract (from AGENTS.md).
Scenario: Text regions stay in the core memory
- WHEN the core receives a text-region report
- THEN it keeps it in memory and sends only rounded
legibilityregions on the stream
Requirement: Camera event content and gate
The stream's camera event SHALL carry exactly active, workspace, x, y and zoom of the Canvas workspace of the primary output, active only outside the overview, unlocked and with the crystals, the nebula, the skyline or the neoedo, and dropped above 16 KB not yet sent. The page only reads it for the parallax of the crystals, the nebula, the skyline and the neoedo. Full text: section Binding contract (from AGENTS.md).
Scenario: Camera event content and gate
- WHEN the session is locked or the overview shows
- THEN the camera event is inactive
Requirement: Black-hole pointer projection
The core SHALL project the compositor pointer into the read-only wallpaper stream as normalized fractions only while unlocked, connected and outside overview. No buttons, window identities or raw state SHALL go out. The effect eases its center and disk tilt with a small excursion (10% of the original amplitude), and Matrix has no pointer input. Full text: section Binding contract (from AGENTS.md).
Scenario: Black-hole pointer projection
- WHEN the session is locked
- THEN no pointer position goes to the wallpaper
Requirement: Window-close sink report is narrow
Closing ordinary application windows with the black-hole wallpaper SHALL use a bounded GPU snapshot and a 400 ms suction effect while the renderer reports its center through the launch-cookie-only /desktop-wallpaper/sink endpoint. The core SHALL forward only a typed expiring wallpaper_sink command, and reduced motion MUST disable it. Full text: section Binding contract (from AGENTS.md).
Scenario: Window-close sink report is narrow
- WHEN an agent tool or generated HTML tries to reach the sink
- THEN it cannot, because no agent tool or generated HTML reaches it
Requirement: Events have exact keys
Each stream event SHALL have exactly the keys of its definition, and the page MUST check the keys and the types and ignore any other event. Full text: section The events.
Scenario: Events have exact keys
- WHEN the page receives an event with other keys or types
- THEN the page ignores it
Requirement: Bounded wallpaper streams
The core SHALL keep at most two open wallpaper streams (a third destroys the oldest), drop a camera event when more than 16 KB is waiting, destroy the stream above 64 KB for any event, and never drop a legibility event (above 16 KB not yet sent it destroys the stream instead). Full text: section The route.
Scenario: Bounded wallpaper streams
- WHEN a third wallpaper stream opens
- THEN the oldest stream is destroyed
Requirement: Luminance cap only behind chat text
The luminance cap of 0.09 SHALL apply only behind the text that the chat draws straight on the wallpaper (the legibility regions); elsewhere the crystals can be bright. Full text: section Decisions of 2026-11-02.
Scenario: Luminance cap only behind chat text
- WHEN the legibility regions are unknown after a stream error
- THEN the whole wallpaper is capped
Requirement: Reduced motion draws no effect
Under reduced motion the wallpaper SHALL draw no effect at all, with no static frame and no parallax, except the skyline and the neoedo, which draw one still frame (no clock, no camera, no loop) and draws it again only when the palette, the legibility regions or the size change. Full text: section Decisions of 2026-11-02 and section The skyline effect.
Scenario: Reduced motion draws no effect
- WHEN the user prefers reduced motion
- THEN no effect draws, but for the still frame of the skyline
Requirement: Palette change moves colors live
A new profile color SHALL change the crystal colors at once with a 600 ms transition in linear light and no page reload. Full text: section Decisions of 2026-11-02.
Scenario: Palette change moves colors live
- WHEN a new palette revision arrives on the stream
- THEN the colors transition over 600 ms without a reload
Status
Doc status: current contract. Phases 1 to 3 and the later wallpaper effects landed. Uncertain: phase 2 step 0 on the real machine was pending in the doc. Checked 2026-11-10.
Introduction
Status: phase 1 is implemented on 2026-11-02 (the crystals, the setting
wallpaperEffect and the live color; see Phase 1 implementation at the end).
Phase 1.5 (the aesthetic pass, decision 7) is implemented on 2026-11-02; see
Phase 1.5 implementation at the end. Phase 2 (the depth parallax with the
canvas camera, channel design) is implemented on 2026-11-02, with step 0
pending on the real machine; see Phase 2 implementation at the end. Phase 3
is implemented on 2026-11-02; see Phase 3 implementation at the end.
The
user asked, in Portuguese: "em vez de uma aurora mexendo em 2d como está agora,
se seria possível ter um efeito de objetos cristais hexagonais flutuando pelo
lugar". This document answers the feasibility question and gives the spec. The
user answered the six open questions on 2026-11-02 (see Decisions of
2026-11-02). The section "What exists today" describes the state before
phase 1.
Verdict
Feasible, with a small risk. The current aurora is one WebGL fragment shader
on the web wallpaper page (vendor/interface/host/wallpaper.js). The same page
can draw about 28 hexagonal crystals as real 3D meshes with plain WebGL 1, with
no new library. The hypothesis is that the cost stays close to the aurora; the
performance acceptance table tests it. The new buffers are less than 64 KB, and
the drawing buffer is the same as the aurora.
One gap exists today and the crystals do not make it worse: the wallpaper keeps
drawing at 30 frames per second when application windows cover it or when the
session is locked. The wallpaper window turns off background throttling
(web-shell/core/desktop-window-options.cjs:13), and
observeWallpaperVisibility turns it on again only for hide and minimize.
Phase 3 closes this gap in the compositor.
Decisions of 2026-11-02
The user answered the open questions in Portuguese: "Cristais: wallpaper se move com canva, configuração deixa escolher, uma nova cor de perfil transicionando a cor dos cristais". Questions 2, 5 and 6 take the defaults of this spec.
- Replace or offer both: offer both. The protected setting
wallpaperEffectchoosesauroraorcrystals; the default iscrystals(Decision 4). - Shape: doubly terminated hexagonal prisms (quartz shape), as in Decision 2.
- Canvas camera: the wallpaper moves with the canvas. The design is a depth parallax for each layer: the far layer moves least, the near layer most, so the crystals float in the canvas space (Decision 3). The compositor shift of the whole wallpaper is only the fallback of phase 2 step 0.
- Palette: a new profile color changes the crystal colors at once, with a 600 ms transition in linear light and no page reload (Decision 5).
- Reduced motion: no effect at all, as today. No static frame and no parallax.
- Brightness: the luminance cap of 0.09 stays, also during the color transition. The crystals stay subdued, with no bright highlight. Decision 7 replaces this global cap with a local rule in phase 1.5. Until phase 1.5 lands, the global cap is the contract.
- Aesthetic pass (later on 2026-11-02). The user showed a reference image
and asked "Tem como ser mais aesthetic como nesse exemplo?", then accepted
the plan of phase 1.5 with "Sim". The reference image stays outside the
repository. It shows translucent faceted crystals that glow: a bright inner
core, visible internal facet lines and a soft halo. Volumetric clouds and fog
fill the background and the bottom of the image. Far crystals are blurred
and near crystals are sharp (depth of field). Many small soft particles
(bokeh) float between them. The palette is one hue, teal, from near black
to near white. The plan (phase 1.5):
- Crystals get an emissive core, procedural internal facet lines, a Fresnel rim, translucency and an additive halo sprite. No true bloom pass.
- The crystals effect gets a fog backdrop from fractal noise (fbm) in place of the gradient backdrop. The aurora effect does not change.
- Depth of field: the far layer draws into a half-resolution texture that the page blurs; the middle layer is soft and the near layer is sharp.
- Particles: about 180 soft point sprites in three layers.
- All colors come from the profile palette tokens, and the 600 ms live transition stays.
- Legibility: the luminance cap of 0.09 applies only behind the text that the chat draws straight on the wallpaper. Elsewhere the crystals can be bright.
- The resolution cap of 1280x720, the 30 fps cap, reduced motion (no effect), the context loss and the shader failure fallbacks stay as in phase 1.
What exists today
vendor/interface/host/wallpaper.html: a#wallpaper-rootand the bundle/shadcn-wallpaper.js(HeroUI phase 10,c0beded). The React root invendor/interface/ui-src/host/wallpaper.jsxowns the<canvas class="wallpaper-aurora">and callsstartWallpaperofwallpaper.jsin an effect. The bundle carries React, React DOM and the drawing code. The core serves the page at/desktop-wallpaper(web-shell/core/desktop-visuals.js) with the CSPscript-src 'self'; style-src 'self'; connect-src 'none'. The page has no preload and nox-shell-token, so it cannot call/api/routes.vendor/interface/host/wallpaper.js: one full-screen quad, one fragment shader, internal resolution capped to 1280x720 with no DPR multiplication, a frame rate of 10 fps at rest and 30 fps for 1 s after a camera or palette change (Frame rate at rest, 2026-11-03), a pause ondocument.hidden, no canvas under reduced motion, a CSS fallback on WebGL failure or context loss, and priority for a valid profile PNG (/desktop-wallpaper.png).vendor/interface/host/desktop-visual.css: the CSS fallback gradient from the--color-wallpaper-*tokens of/theme.css. The aurora shader uses fixed colors and ignores these tokens (openspec/specs/color-palette/spec.md).web-shell/test/wallpaper.test.js: nine tests with a fake GL context.web-shell/test/desktop-visuals.test.jstests the routes. No browser harness for the wallpaper exists: the aurora browser scripts stayed outside Git (openspec/specs/visual-effects-3d-shaders/spec.md).- Smithay draws the one wallpaper surface behind every window. Each extra
output draws a scaled copy of the same buffer (
wallpaper_copyinnative/smithay/src/scene.rs). On a Canvas workspace the wallpaper stays fixed to the output; the camera moves only the windows. - The core already has the camera. It polls the compositor
stateevery 100 ms (web-shell/core/smithay.js, near line 1382), and the snapshot hascanvasWorkspaces[]withcamera {x, y, zoom, target}for each workspace with a Canvas base (native/smithay/src/desktop/canvas_mode.rs, near line 1939). The core checks each value (canvasWorkspaceincore/smithay.js:|x|and|y|65536 or less, zoom 0.1 to 2). A camera animation lasts 300 ms (ANIMATIONinnative/smithay/src/canvas.rs). - The other protected pages follow a new palette live:
syncWallpaperTheme(revision)ofvendor/interface/host/wallpaper-theme.jsloads/theme.css?palette=<revision>and removes the old sheet after the new one loads. The revision ispaletteRevision()ofweb-shell/core/server.js(sha256 of the profile color and the Matugen layer). The wallpaper page does not get the revision today. - The wallpaper window shares the partition
agent-native-isolatedwith the chat, the bars and the panels (web-shell/core/desktop-window-options.cjs, line 7). Every window of that partition sends the launch cookieagent_native_session(web-shell/desktop.cjs, near line 292). Chromium opens at most 6 HTTP/1.1 sockets to one host for one partition, andweb-shell/test/held-streams.test.jsalready counts 5 held streams with the quick settings and the notification center open. The lock window has its own partitionagent-native-lock, with the cookie and an exact request allowlist (lockPartition,lockRequestAllowedandprepareLockSessioninweb-shell/core/lock-window.cjs). - The core routes
/host-layoutand/lock-stateaccept only the launch cookie (launched(req)), but only the Electron main process reads them. No renderer fetches a cookie route today. Generated HTML and plugin panels draw in sandboxed iframes withconnect-src 'none'. - Phase 10 measured the React root at about 0.37 MB of heap in headless Chromium (docs/work-log-2026-11.md), below the limit of about 2 MB.
Decision 1: render path
The crystals render with WebGL in the web wallpaper page. The compositor does not get a background shader.
| Criterion | Web page (chosen) | Compositor GLSL background |
|---|---|---|
| Contract | Same page, same CSP, same fallbacks | openspec/specs/themes/spec.md has no background target; a new manifest target and a new render path in Smithay |
| Failure | A GPU hang or a context loss in Chromium loses the WebGL context; the CSS fallback shows | GLSL is trusted code with no GPU timeout; a bad shader stalls the whole desktop |
| Activation | Host and core at the next login, no compositor build | New compositor build and a new login |
| Tests | Fake GL unit tests exist; phase 1 adds a browser harness | EGL tests only, no browser proof |
| Occlusion and camera | The camera reaches the page through the wallpaper channel (phase 2); occlusion stays in the compositor | The compositor knows both |
| Project rule | Visual components stay web; Smithay does compositing and GPU effects on surfaces | A wallpaper scene in Rust is close to a second native UI |
The compositor advantages are kept where they are cheap: phase 3 stops the frames of the wallpaper in the compositor, and the core sends the camera numbers that it already has to the page (Decision 5).
No Three.js. It adds about 150 KB gzip of JavaScript and heap to a process that lives for the whole session, and the scene needs only one mesh, one matrix helper and two programs. WebGL 1 is enough: 28 draw calls in a frame are within budget, and instancing is not necessary. No WebGL means the CSS fallback, as today.
Decision 2: look
Geometry
- One mesh: a doubly terminated hexagonal prism (a quartz shape). Six side faces, a six-sided pyramid tip at each end. Flat normals: 24 triangles, 72 vertices of position and normal (6 floats each), about 1.7 KB.
- Each crystal has a seeded random length (1.6 to 3 times its radius), a slight shear of the tips, and a scale. A fixed seed gives the same field after each reload.
Count and depth layers
| Layer | Count | Size on a 1080p output | Speed | Opacity | Notes |
|---|---|---|---|---|---|
| Far | 14 | 20 to 40 px | slow | 0.25 to 0.4 | Mixed toward the background color (fog) |
| Middle | 9 | 50 to 90 px | medium | 0.45 to 0.6 | |
| Near | 5 | 120 to 220 px | faster | 0.55 to 0.7 | Can cross the output edges |
The count is a constant in wallpaper.js. A perspective camera with a field of
view of 35 degrees looks at the field. Each crystal drifts on a slow path (5 to
25 px/s by layer), bobs on a sine, and turns 2 to 8 degrees per second around a
tilted axis. A crystal that leaves the field enters again at the opposite edge,
outside the view. JavaScript computes the matrices in doubles and sends them as
uniforms, so the shader needs no time wrap and the 24-hour float precision stays
correct.
Lighting and material
- Backdrop pass: one quad with a soft vertical gradient and one slow glow from the palette. The same function is in the crystal shader.
- Crystal pass, back to front by layer, alpha blending, no depth buffer:
- Fresnel rim: bright edges, nearly clear centers.
- One key light from the top left, Blinn-Phong highlight.
- Fake refraction: the shader evaluates the backdrop function at the screen position moved by the refracted normal. Three offsets (red, green, blue) give a small dispersion. No render target and no scene texture.
- A small tint difference for each face normal, so the facets read.
- No bloom pass and no post-processing.
- No MSAA:
antialias: falseanddepth: false, as small as the aurora context. The face alpha falls at grazing angles, which softens the silhouettes. MSAA at 1280x720 adds about 15 MB of GPU memory in the GPU process; it is an option only if the QA on a 1440p output finds jagged edges, and then the GPU process memory is measured again. - The resolution cap of 1280x720 stays.
Phase 1.5 replaces this list for the crystals effect: a fog backdrop, an emissive core, facet lines, halos, particles and a blur of the far layer. It still has no bloom pass and no MSAA (Phase 1.5: aesthetic pass).
Colors from the palette
The page reads --color-wallpaper-start, -middle, -end, -glow and
--color-on-wallpaper-accent with getComputedStyle once /theme.css loads.
These tokens follow the profile color and an applied Matugen palette
(openspec/specs/color-palette/spec.md). A missing or invalid value uses the defaults of
desktop-visual.css. The backdrop uses the wallpaper tokens; the crystal tint
and the rim use the accent. This is a behavior change: the aurora ignores the
palette, and the crystals follow it.
A new palette reaches the page at once through the wallpaper channel, and the crystal colors move to it in 600 ms (Decision 5).
Text on the wallpaper and the glass
- Three tokens draw text straight on the wallpaper:
--color-on-wallpaper(#f5f4fb, relative luminance about 0.91),-muted(#d1cee4, about 0.63) and-accent(#d2c9fc, about 0.62) (openspec/specs/color-palette/spec.md). The weakest token sets the cap: for 4.5:1, the background luminance must be 0.10 or less. - The cap is 0.09, which gives 4.7:1 or more for all three tokens without their
text shadow (4.82:1 for
-accentat 0.09, 4.79:1 at the 8-bit value 85/255, L 0.0908). The shader computes the relative luminance of the final color in linear light, before the sRGB encode, and scales the RGB bycap / Lwhen L is over the cap. Scaling keeps the hue; clipping each channel would not. - Visual consequence: the brightest rim or highlight is at most a dark tone of the accent hue (L 0.09). The crystals look subdued, with no bright sparkle. The user accepted this (decision 6).
- Smithay blurs the wallpaper behind the chat glass regions and the bar pill (openspec/specs/web-panels/spec.md). Crystals behind the chat show as soft colored shapes. This needs no change. The blur runs again for each wallpaper frame, as it does with the aurora; the performance acceptance measures it.
- Phase 1.5 keeps the cap of 0.09 and the three tokens, but applies the cap only in the legibility regions, behind the text that the chat draws straight on the wallpaper (Phase 1.5, Legibility).
Decision 3: canvas, overview and outputs
Canvas camera: depth parallax for each layer (phase 2)
The crystals move with the canvas camera, less than the windows, and less for a far layer than for a near one. Only the crystals effect gets parallax; the aurora is a flat field and stays fixed.
The page keeps a pan offset and a zoom scale for each layer:
| Layer | Pan factor f |
Zoom exponent k |
|---|---|---|
| Far | 0.05 | 0.05 |
| Middle | 0.12 | 0.10 |
| Near | 0.25 | 0.20 |
- Pan. A window moves on the screen by
-(dx, dy) * zoompixels when the camera center moves by(dx, dy)canvas units. A layer moves byftimes that, converted to the internal drawing buffer. The page adds only the deltas between two camera events of the same workspace. A workspace switch, a switch between Grid and Canvas, a reconnect and the first event add no delta, so the crystals never jump. The crystal positions wrap in the field (Decision 2), so the offset has no bound; JavaScript keeps it in doubles and wraps it before it sends the uniforms. One event moves a layer by at most half of the field width, so a long fit flight does not turn into noise. - Zoom. The scale of a layer around the screen center is
zoom ^ k: from 0.89 to 1.04 for the far layer, and from 0.63 to 1.15 for the near layer, over the zoom range 0.1 to 2. The target is 1 outside Canvas. A change of the workspace or of the layout eases the scale to the new target in 300 ms with the canvas camera curvecubic-bezier(.22,1,.36,1). - Smoothing. The core reads the camera at its 100 ms poll, so the events come at 10 Hz or less. The page follows the last value with an exponential filter (time constant 60 ms) at its own frame rate (30 fps for 1 s after each camera event, then 10 fps). The expected lag from a camera change to a wallpaper frame is about 100 to 160 ms. Phase 2 step 0 measures it.
- Camera value. The snapshot reports
mode.camera. Step 0 checks that this value follows the 300 ms flight and is not only its end. If it is only the end, the page eases toward it with the 300 ms camera curve instead of the filter.
Fallback. If step 0 shows that the channel cannot meet the budget of the
performance table (lag or CPU), phase 2 uses the compositor shift of the whole
wallpaper instead: Smithay scales the wallpaper surface a little and moves it
with the camera, as the workspace transition does with backgroundScale and
parallax (openspec/specs/themes/spec.md). It gives no depth between layers. The fallback
needs its own section in this spec before code, and the user sees the
measurement first.
Outputs
- One wallpaper surface exists. Each extra output shows a scaled copy that
covers it (
wallpaper_copy), so every output shows the same crystals with the same motion and a different crop for a different aspect. - The camera source is the workspace on the primary output only. The extra outputs show the parallax of the primary output through the copy. A pan on a Canvas workspace of an extra output (openspec/specs/multi-output-workspaces/spec.md, phase 3) moves no crystal, because the one surface would also move behind the windows of the primary output, which did not move. A field or a camera for each output is out of scope.
Overview, transitions and lock
- Workspace transition: no change. The v3 package scales and moves the wallpaper surface as before. The switch adds no pan delta; the zoom scale eases in 300 ms, the same time as the transition.
- Overview planes and PNG previews: no change. A plane renders when its workspace changes, and the scene signature leaves out the wallpaper (openspec/specs/visual-effects-3d-shaders/spec.md), so a card shows the crystals as they were at that render, with the parallax of that time.
- Overview: while the workspace overview shows (presentation
workspaces), the core sends the camera as inactive. The offsets stay where they are, and the zoom scale eases to 1. During that overviewcanvas_workspaces()reports the camera saved before the overview (workspace_overview_previous), so the gate on the presentation is necessary. The F9 window view is rejected (docs/architecture-decisions.md, Single workspace overview) and gets no rule. - Lock: the core sends the camera as inactive while the session is locked or locking. Phase 3 stops the drawing while locked.
Reduced motion, PNG and aurora
No parallax under reduced motion (no effect draws), with a valid profile PNG, or with the aurora. The page keeps the stream open and ignores the camera events, so a change of the setting or of the motion preference starts the crystals with the offsets at zero.
Decision 4: settings
The protected setting wallpaperEffect chooses the effect. Themes
(openspec/specs/themes/spec.md) are compositor packages of window effects and do not reach
the web page, so the choice is not a theme.
- Values:
aurora,crystals,nebula,matrix,black-hole,skylineorneoedo. Since 2026-11-13 the default is thewallpaperof the entry of the active window theme (skylinein Office,nebulain Galaxy; before,crystals), and a missing or invalid value means that default. - Storage:
store.state.wallpaperByTheme, a map from a theme id to an effect id (core/wallpaper-effects.js), besidecanvasandcanvasSharpZoom. The route writes the entry of the active theme, and the theme change applies the entry through the same function. A savedwallpaperEffectmigrated into the entry of the current theme and the key stays, holding the last hand-picked value (each manual choice writes both, a theme default never goes into it), so an older core keeps that choice after a rollback. The settings snapshot still reportswallpaperEffect, now the effect in force. - Route:
POST /api/wallpaper-effectwith exactly{effect}, whereeffectisauroraorcrystals. Any other body throwsInvalid wallpaper effect. It needs thex-shell-tokenof every/api/route, so only the protected host reaches it. The core saves the value, then sends theeffectevent (Decision 5). - UI: a new
WallpaperEffectcomponent invendor/interface/ui-src/host/settings.jsx, afterProfileColor, with the existing HeroUISettingSelect: the label "Efeito do papel de parede", the options "Cristais" and "Aurora", and the note "Um PNG no perfil ou a redução de movimento mostra o fundo sem efeito." The state and the action follow the pattern ofsetCanvasSharpZoom, with awallpaperEffectdefault (crystals, not busy) invendor/interface/host/settings-state.js. No plain DOM control. - Access: no agent tool, no MCP entry, no scheduled turn, no generated
HTML and no plugin panel gets the setting or the route.
system_contextdoes not report it in phase 1.
Both effects keep the same lifecycle in startWallpaper: the PNG priority,
the 1280x720 resolution cap, the frame rate (10 fps at rest, 30 fps for 1 s
after a camera or palette change), the pause on document.hidden,
no canvas under reduced motion, the CSS fallback on WebGL failure or context
loss, pagehide, and (phase 3) the compositor suspension. startWallpaper
takes effect and picks the programs; the lifecycle code is shared.
A change of the setting switches the effect in place, with no page reload.
The React root keeps the effect in its state and gives the canvas a key of
the effect, so a switch mounts a fresh canvas and a fresh WebGL context. The
cleanup of the old effect removes its listeners first, then calls
WEBGL_lose_context.loseContext(), so the intended loss does not show the
CSS fallback and the old context does not wait for garbage collection.
Decision 5: the wallpaper channel
One read-only event stream from the core to the wallpaper page carries the effect, the palette revision and (phase 2) the camera. Nothing goes from the page to the core.
Rejected paths
/api/routes: they need thex-shell-token. Giving that token to the wallpaper page gives it every protected route.- Electron main process to the page: the wallpaper renderer has no
preload, so it cannot get IPC messages.
webContents.executeJavaScriptevery 33 ms runs code strings in the page, and the main process would have to poll the core for the camera first: two hops instead of one. connect-src 'self': the page could then reach the other cookie routes (/host-layout,/lock-state). The CSP names the one path instead.
The wallpaper page is the first renderer that fetches with the ambient launch
cookie. The routes /host-layout and /lock-state also take only that
cookie, but only the Electron main process reads them, so they are a weak
precedent. The exact connect-src, the own partition and the fixed content
of the events keep this new reach narrow.
The wallpaper partition
The wallpaper window moves to its own partition agent-native-wallpaper, as
the lock window has agent-native-lock. In the shared partition the stream
would be the sixth held socket of the 6 that Chromium gives one host (the
seventh during a reload overlap), and every /api/ request of the chat and
the panels would wait.
web-shell/core/desktop-window-options.cjs:wallpaperPartition,wallpaperRequestAllowed(base, url)andprepareWallpaperSession(session, {base, launchKey}), in the pattern oflock-window.cjs.desktopWindowOptionssets the partition anddevTools: falsewhenwallpaperSurfaceis true, aslockWindowOptionsdoes for the lock window (web-shell/core/lock-window.cjs, near lines 126 to 130).prepareWallpaperSessionrefuses every permission, sets the launch cookie (httpOnly,sameSite: "strict") and cancels every request thatwallpaperRequestAllowedrefuses. The allowlist has exactly/desktop-wallpaper,/desktop-visual.css,/desktop-wallpaper.png,/shadcn-wallpaper.js,/theme.css,/theme.css?palette=<64 hex digits>and/desktop-wallpaper/events, plusabout:blank.web-shell/desktop.cjsawaitsprepareWallpaperSessionbeforeopenSurface("wallpaper", ...), as it awaitsprepareLockSession(near line 299). Without the cookie in place first, the HTML and the events get 403 and the wallpaper stays blank. It also removes the wallpaper routes from the allowlist of the shared partition.- The wallpaper gets no
/api/route at all: the allowlist has no/api/prefix.
The route
GET /desktop-wallpaper/events, a server-sent event stream. The core handles it inweb-shell/core/server.js, beside/host-layout, after thelaunched(req)check, and answers 403 without the cookie before it counts or closes any stream.desktopVisualkeeps the static assets and gets an optional fifth argument{effect, connectSrc}fromserver.jsfor the page. The defaults arecrystalsand'none', so the current 4-argument calls inweb-shell/test/desktop-visuals.test.js(near lines 32 to 49) andweb-shell/test/shadcn-wallpaper.test.js(near line 93) keep working.- The page:
/desktop-wallpaper(the HTML) needs the launch cookie too, because it carries the setting indata-effect. Without the cookie the core answers 403./desktop-wallpaper.pnggets the same cookie check in phase 1: today any local client reads it without the cookie (web-shell/core/desktop-visuals.js, near lines 36 to 58), and the wallpaper partition now holds the cookie. The CSS and the bundle keep their current rules. - CSP of the wallpaper page:
connect-src <base>/desktop-wallpaper/events, where<base>is the bound address and port of the core (http://127.0.0.1:<port>), never theHostheader of the request. It is the exact URL with no trailing slash, so it matches that path and nothing else. The rest of the CSP does not change. - Streams: a small wrapper around the
eventStreamhelper (web-shell/core/quick-settings-routes.js), which has no cap and no backpressure rule. The wrapper keeps at most two open wallpaper streams (a reload overlaps the old page): a third destroys the oldest. Before a camera event it readsres.writableLength; above 16 KB it drops the event, and the next change sends the newest value. Above 64 KB for any event it destroys the stream, and the page connects again after 5 s. Theeffectandpaletteevents are under 100 bytes and come only on a user action, so they never reach these limits alone. Alegibilityevent (phase 1.5) is under 1 KB and is never dropped, because a stale region can leave text without its cap: above 16 KB not yet sent, the wrapper destroys the stream instead. The page treats the regions as unknown from the stream error until the firstlegibilityevent of the new stream (Phase 1.5, Legibility).
The events
Each event has exactly the keys below. The page checks the keys and the types and ignores any other event.
| Event | Data | When |
|---|---|---|
effect |
{"effect": "aurora" or "crystals"} |
At connect, and after each accepted /api/wallpaper-effect |
palette |
{"revision": "<64 hex digits>"} |
At connect, and when paletteRevision() changes |
camera (phase 2) |
{"active": true, "workspace": n, "x": x, "y": y, "zoom": z} or {"active": false} |
When a value changes, at most once for each state poll (100 ms) |
legibility (phase 1.5) |
{"regions": [[x, y, w, h], ...]} (0 to 16 regions, fractions of the wallpaper) or {"regions": null} (unknown) |
At connect, and when the value changes, at most once for each 100 ms |
palette: one function,notifyPalette(), comparespaletteRevision()with the last value sent and sends the event when it differs. The core calls it at each place that returnswallpaperThemeRevisiontoday (web-shell/core/server.js, near lines 1156, 1173 and 1339), and afterreplace_ui, a recovery, and an apply or a removal of the Matugen layer. A unit test covers each of these writes.camera: the core builds it from the state that it already polls. It is active only whenstate.layout === "canvas"(the workspace of the primary output),state.presentation !== "workspaces",(state.sessionLock?.state ?? "unlocked") === "unlocked"(the form ofcore/smithay.jsnear line 818), and the effect iscrystals. The values are the camera ofstate.workspaceincanvasWorkspaces, already checked bycanvasWorkspace. The core sends a new event only whenxorychanges by 0.01 or more,zoomby 0.0001 or more, or the workspace or the active flag changes. The poll gives at most 10 events each second; no other rate limit exists. Thetargetwindow ID, the dock, the windows and every other field stay out.
How the page uses it
- At load: the core serves
wallpaper.htmlwithdata-effecton the body, set from the saved value (onlyauroraorcrystals), so the first frame draws the right effect. The page then opens the stream. - Effect: an
effectevent switches the effect in place (Decision 4). The event comes at each connect and each reconnect, so an event equal to the current effect does nothing: no new canvas and no new context. - Palette: the first
paletteevent after a load only records the revision, because the page already loaded that/theme.css. A later event with another revision callssyncWallpaperTheme(revision). Phase 1 adds an optionalonAppliedcallback to it; the other callers do not change.syncWallpaperThemereturns early for an equal revision, soonAppliedfires only for a real change. After the new sheet loads, the page reads the tokens again and starts the color transition below. The CSS fallback takes the new tokens at once, because custom properties do not animate. - Stream errors: the stream retries after 5 s (
retry: 5000). The page keeps the last effect, palette and offsets; it never stops drawing because of a stream error. Since phase 1.5 it does not keep the last legibility regions: they become unknown, which caps the whole wallpaper.
Color transition
- The page converts each token from sRGB to linear light and sends linear
uniforms. A transition interpolates the five colors in linear light over
600 ms with the curve
cubic-bezier(.4,0,.2,1), from the colors that show now to the new ones. A new palette during a transition starts from the colors that show at that moment. - The luminance cap applies to the final color of each pixel in the shader, so every frame of the transition stays at 0.09 or less with no extra rule. Since phase 1.5 this holds inside the legibility regions only.
- While the page draws nothing (hidden, reduced motion, PNG, aurora, phase 3 suspension), the new colors apply at once, with no transition.
- The aurora keeps its fixed colors; with the aurora, a new palette changes only the CSS fallback.
Phases
Each phase ships alone; the rollback is a git revert.
Phase 1: crystals, the setting and the live color
Files:
vendor/interface/host/wallpaper.js: add the backdrop and crystal programs, the mesh, the seeded field, the matrix helper, the palette read, the color transition and the luminance clamp. Keep the aurora shader as theauroraeffect.startWallpapertakeseffect; keep all its lifecycle code (PNG priority, caps, visibility, reduced motion, context loss,pagehide). Expected size: 24 KB or less.vendor/interface/host/wallpaper-theme.js: the optionalonAppliedcallback ofsyncWallpaperTheme.vendor/interface/ui-src/host/wallpaper.jsx: readdata-effect, open the event stream, keep the effect in the state, key the canvas by the effect, callsyncWallpaperThemeonpalette. Rename the canvas class towallpaper-effecthere, in the default selector ofstartWallpaperand indesktop-visual.css.vendor/interface/host/wallpaper.html:data-effect="__WALLPAPER_EFFECT__"on the body; the core replaces it with the saved value.vendor/interface/ui-src/host/settings.jsx, the settings state invendor/interface/host/host.js(as forcanvasSharpZoom) and the default invendor/interface/host/settings-state.js: theWallpaperEffectselect.vendor/interface/host/shadcn-wallpaper.jsandshadcn-host.js: the committed bundles, built again by the UI build;build:checkcompares them with the sources.web-shell/core/desktop-visuals.js: the exactconnect-srcfromconnectSrcand the effect in the HTML, both given byserver.js, and the cookie check of/desktop-wallpaper.png.web-shell/core/server.js: the cookie check of/desktop-wallpaper, the/desktop-wallpaper/eventsroute and its stream wrapper,store.state.wallpaperEffect,/api/wallpaper-effect, the settings snapshot field andnotifyPalette().web-shell/core/desktop-window-options.cjsandweb-shell/desktop.cjs: the wallpaper partition, its session and its allowlist; the wallpaper routes leave the allowlist of the shared partition.- Tests:
web-shell/test/wallpaper.test.js,web-shell/test/desktop-visuals.test.js(itsconnect-src 'none'assertion near line 49 changes to the exact URL),web-shell/test/shadcn-wallpaper.test.js(the selectorscanvas.wallpaper-auroranear lines 94 and 104 change tocanvas.wallpaper-effect),web-shell/test/held-streams.test.js, the settings tests, and the newweb-shell/scripts/test-wallpaper-browser.jswith the scriptnpm run test:wallpaper. Like the other browser harnesses,npm testdoes not run it; the gates run it as a separate step. - Docs: openspec/specs/visual-effects-3d-shaders/spec.md (current contract, both effects);
openspec/specs/color-palette/spec.md lines 48 and 137 (the crystals follow the tokens live,
and "no WebGL aurora" becomes "no WebGL effect"); docs/nested-qa.md (the
wallpaper checks); a line for
wallpaperEffectand the wallpaper channel in the Boundaries of AGENTS.md; this file.
No change to the compositor or the window options. The core and the host change, so the activation is the next login, or the documented host and core maintenance (AGENTS.md). A host asset reload alone is not enough.
Phase 1.5: aesthetic pass
Decision 7. Phase 1.5 changes only the crystals effect. The aurora, the
setting, the partition, the CSP and the effect and palette events do not
change. Phase 2 (parallax) and phase 3 (suspension) keep their numbers and
build on phase 1.5; each also works without it.
Look
The target is the reference of decision 7 in the profile hue. Each constant
below is a starting value in wallpaper-crystals.js; the nested QA and the
user tune it against the reference.
- Fog backdrop. One full-screen pass of value noise in fractal Brownian
motion (fbm): 5 octaves at half resolution, with one domain warp. It has a
low haze over the whole field, a denser cloud bank in the lower third, and
a softer mass around the slow glow center of phase 1. The dark tones come
from the phase 1 gradient (
--color-wallpaper-start,-middle,-end). The lit tones are the fog light: the glow token with more saturation (FOG_SATURATION1.6, away from its own gray) and more light (FOG_GAIN2.4), in linear light. The lit side faces the glow center. The noise offset moves on a circle with a period of 600 s, and JavaScript wraps the time at that period, so the loop has no jump and the coordinates stay small. The shader useshighpwhenGL_FRAGMENT_PRECISION_HIGHis defined, elsemediump. - Crystal material. The same mesh and field as phase 1 (14, 9 and 5
crystals), with these changes in the crystal shader:
- Emissive core: the shader computes the distance
dfrom the crystal center (the translation ofmodel) to the view ray of the fragment. The core addsexp(-4 d^2 / r^2)times the core gain of the layer, whereris the crystal radius. The core color is the accent token mixed 35% toward white. - Facet lines: the mesh gets a barycentric attribute (3 more floats for each
vertex), and the shader draws a thin line where a barycentric value is
near 0. Each crystal draws its back faces first (front faces culled) and
then its front faces, so the far edges show through the body as internal
lines. Three internal planes for each crystal add a few thin lines
inside, which fade away from the core. Their seeded normals are a
mat3uniform of the vertex shader, which sends the three plane distances to the fragment shader as avec3varying. WithOES_standard_derivativesthe line width usesfwidth; without it, a fixed width of 0.03. - Fresnel rim in the accent, as in phase 1.
- Translucency: the body alpha is
opacity * (0.18 + 0.6 * fresnel); the core and the lines add alpha. The fake refraction of phase 1 stays, but it samples the cheap gradient, not the fog: three fbm calls in each crystal fragment cost too much. - The body tint is the mix of the glow and the accent tokens, with the same saturation gain as the fog light.
- Emissive core: the shader computes the distance
- Halo. One additive quad for each crystal, centered on the crystal and turned to the camera, drawn before the crystal. Radius: 1.8, 2.2 and 2.6 times the crystal radius for the far, middle and near layers. Intensity 0.25, 0.35 and 0.45. The falloff is a soft exponential that reaches 0 at the quad edge. The color is the mix of the body tint and the core color. This is the glow of the reference; no bloom pass exists.
- Depth of field. The far layer (its fog, crystals, halos and particles)
draws into a half-resolution texture, and a separable blur softens it
(Render targets). The blur is a 9-tap Gaussian with 5 linear fetches in
each direction, with a tap step
FAR_BLUR_STEPof 1.5 texels: about 9 px of blur on a 1080p output. The middle layer draws at full resolution with a softer silhouette (asoftnessuniform widens the alpha falloff at grazing angles and lowers the line contrast). The near layer is sharp. - Particles. About 180 soft sprites (the constant
particleLayers): 110 far ones of 1.5 to 3 px (in the far texture, so the blur turns them into bokeh), 50 middle ones of 3 to 6 px with a soft disc, 20 near ones of 8 to 20 px, each a soft disc with a faint brighter ring. Alpha 0.15 to 0.6 by layer and size. Drift 3 to 12 px/s by layer, with a small sine sway. Each particle is two triangles in one static buffer for each layer; the vertex shader computes the position from the time (vertex shaders always havehighpin WebGL 1). Quads, notgl.POINTS: WebGL 1 letsALIASED_POINT_SIZE_RANGEbe as small as 1 px. Each velocity is a whole number of field crossings in 3600 s, and JavaScript wraps the particle time at 3600 s, so the wrap has no jump. Additive blending. - Colors. Everything comes from the five tokens of phase 1
(
--color-wallpaper-start,-middle,-end,-glowand--color-on-wallpaper-accent). The fog light, the body tint, the core color and the particle color are fixed functions of them in the shader, with no new token. The page still interpolates only the five tokens in linear light over 600 ms, so the whole scene, fog included, moves to a new palette in 600 ms. A teal profile (the preset "Verde-água",#14b8a6) gives a teal scene, as in the reference. The profile tokens have an OKLCH chroma of 0.1 or less (web-shell/core/profile-color.js, near line 234), which is why the shader adds the saturation gain. - Brightness outside the regions. No cap: the cores and the halos can reach white, as in the reference. Additive sums clamp at 1.
Render passes
The canvas context does not change: WebGL 1, alpha: false,
antialias: false, depth: false. Each pass writes sRGB-encoded colors, as
phase 1 does, and blends in encoded space. The page calls
gl.disable(gl.DITHER) at start, so the 8-bit writes round and do not
dither (WebGL 1 enables dither by default).
| Pass | Target | Draws | Blend |
|---|---|---|---|
| 1. Far | Texture A, half size | Fog (opaque), then far halos, far crystals (back, then front faces), far particles | Halos and particles additive; faces alpha |
| 2. Blur, horizontal | Texture B, half size | A to B | None |
| 3. Blur, vertical | Texture A | B to A | None |
| 4. Composite | Canvas, full drawing buffer | A, upsampled with linear filtering, with the region cap | None (opaque) |
| 5. Middle | Canvas | Middle halos, crystals (soft), particles | As pass 1 |
| 6. Near | Canvas | Near halos, crystals (sharp), particles | As pass 1 |
91 draws in a frame: 1 fog, 3 for each of the 28 crystals (halo, back faces, front faces), 3 particle draws, 2 blur draws and 1 composite. The no-DOF path makes 88.
Render targets
- Two textures, A and B:
RGBAandUNSIGNED_BYTE(color-renderable in every WebGL 1),ceil(width / 2)byceil(height / 2)of the drawing buffer, so 640x360 at the 1280x720 cap.LINEARfiltering, no mipmaps andCLAMP_TO_EDGEon both axes, which WebGL 1 needs for a texture whose size is not a power of two. Each has its own framebuffer with onlyCOLOR_ATTACHMENT0: no depth and no stencil attachment. - The legibility mask: one
LUMINANCEandUNSIGNED_BYTEtexture ofceil(width / 8)byceil(height / 8)(160x90 at the cap), withUNPACK_ALIGNMENT1,LINEARfiltering andCLAMP_TO_EDGE. - Texture units: unit 0 for A or B, unit 1 for the mask. WebGL 1 gives 8 or
more fragment texture units. No pass reads a texture in a vertex shader,
because WebGL 1 can give 0 vertex texture units. Only the blur and the
composite programs have a sampler on unit 0. Every other crystals program
sets its
legibilitysampler to unit 1 at link, because a sampler uniform starts at unit 0. Before pass 1 the page makes unit 0 active (activeTexture(TEXTURE0)) and bindsnulltoTEXTURE_2D, so no program can read texture A while it draws into A (a feedback loop). - Fragment uniforms: WebGL 1 guarantees only 16
vec4fragment uniform vectors. The crystal fragment shader keeps 10 or fewer: the five palette colors (5),resolutionandglowCenter(2), the crystal center (1), and its scalars packed in twovec4uniforms (opacity, fog, softness and core gain; radius and line width). The planesmat3is in the vertex shader, which has 128 or more. The regions are in a texture, not in uniforms. - A resize of the drawing buffer specifies A and B again at the new size and checks them again.
- Dispose deletes the framebuffers and the three textures before
loseContext.
No-DOF path. The page uses it when createTexture or createFramebuffer
returns null, when checkFramebufferStatus is not FRAMEBUFFER_COMPLETE for
A or B, when the half size is below 8 px or above MAX_TEXTURE_SIZE, or when
the test hook asks for it. Passes 1 to 4 then become one pass on the canvas:
the fog at full resolution with 4 octaves and the region cap, then the far
layer with softness 1 and 80% opacity, with no blur. The page logs one line
and keeps drawing; this is not the CSS fallback. The mask texture is required:
if it cannot be made, the page treats it as a shader failure.
Other failures, as phase 1. A shader that does not compile or link, of any crystals program, and a context loss, show the CSS fallback. Reduced motion draws nothing. A valid profile PNG blocks the canvas. The aurora has no targets, no mask and no regions.
Legibility
Text drawn straight on the wallpaper. The chat window has no background outside its cards, so this text in each chat window draws over the wallpaper:
#chat-welcome(the kicker, the title and the line).host.js(near line 200) shows it when the conversation is empty, outside the bar windows, the palette, the sidebar, the canvas dock and the workspace overview. It uses the three--color-on-wallpapertokens with a text shadow (host.css, near line 2876).#system-inspector: the trigger "Estado do sistema" and, when it is open, the dashboard (up tomin(300px, 42vh)). It shows when the welcome shows and the field is empty. The trigger uses the same tokens.#progress,#voice-status,#voice-transcriptand#change-recoveryin the composer area: plain lines with no card. They use the mode tokens (--color-muted,--color-accent,--color-text), not the on-wallpaper tokens. They count as text on the wallpaper for the regions; their colors are an earlier problem, out of scope.
Not text on the wallpaper: the bars (--color-top-bar-background,
#09080feb, or the glass bar), the composer, the cards, the message bubbles
and the panels. Each has a glass or solid tint (about 71% opacity or more for
the blurred bubble glass, 82% or more for the others). These surfaces
already draw over application windows, which can be white (the floating chat of the canvas, a panel over a window). A wallpaper pixel is
never brighter than white, so a bright crystal behind them is a case that
they already meet. Phase 1.5 does not cap the wallpaper behind them.
Source of the regions.
| Source | Result |
|---|---|
| Fixed zones in the page (a centered column) | Rejected. In Grid the chat is a tile of the workspace (openspec/specs/multi-output-workspaces/spec.md), so with applications open the welcome is not at the output center. The inspector opens to 300 px. An output chat on an extra output draws on a scaled copy with another crop. A zone large enough for all cases dims most of the screen. |
| Geometry from the host, through the core, on the existing stream (chosen) | The chat host already measures its own elements for the glass regions. The core already knows the chat window rectangles and the outputs from the state that it polls. The page gets only rectangles on the stream that it already has. |
The chosen source gives no new authority: the host uses the x-shell-token
that it already has, and the page keeps its read-only stream, its exact
connect-src and its allowlist. The rectangles carry no text, no window ID
and no output name.
Host. In each chat window (host.js, Electron only, not the bars and not
the recovery document), measureWallpaperText in host/workspace-zoom.js
measures the visible elements of the list wallpaperTextElements (the six
elements above). Each gives its getBoundingClientRect in CSS pixels of the
chat window, which are the logical pixels of its surface, as for the glass
regions. The rectangle is rounded outward and clipped to the window. A hidden
or empty element gives none, so the list has 0 to 6 rectangles, one for each
element at most. A reporter in the pattern of createBarGlassReporter sends
POST /api/wallpaper-text-regions with {"regions": [{x, y, width, height}, ...]} (an output chat adds "output": "<name>") when the measurement differs
from the last accepted one. The update that sets hidden on these elements,
a resize of the window or of the composer area, the inspector open or close
and a font load each ask for a measurement in the next animation frame. The
reporter sends the next request only after the earlier one returns. It sends
its first report only after layout settles: after document.fonts.ready,
after the first snapshot render that sets hidden on these elements, and
then in the next animation frame. An early empty report would end the
whole-window fallback of the core while the text is not yet measured. A 404
answer (an older core without the route) stops the reporter for the life of
the document; other errors try again at the next measurement. The recovery
document sends an empty list.
Core. /api/wallpaper-text-regions reads its body with a limit of
4096 bytes (the per-path limit of the /api/ body read in server.js, as
for /api/voice/transcribe). It accepts exactly regions and an optional
output (the rule of chatOutput). regions is an array of 0 to 6
rectangles. Each rectangle has exactly the keys x, y, width and
height, each a Number.isSafeInteger value, x and y 0 or more, width
and height 1 or more, and x + width and y + height 16384 or less. An
output that is not the name of an output of desktop.state.outputs is
refused, as setChatDock does (core/smithay.js, near line 803). Any other
body throws Invalid wallpaper text regions. A report equal to the stored
one for that output changes nothing: no mapping and no send.
The core keeps each report in memory, keyed by output, with the ID of the
chat window that the compositor reports for that output at that time
(outputs[].chat; on a compositor without that field, the window whose
windowRole is chat on the primary output). The map has at most one entry
for each output of the state, and each state poll drops the entries of
outputs that are gone. Nothing is saved and nothing goes to the compositor.
The new module web-shell/core/wallpaper-legibility.js has the pure
function legibilityRegions(state, reports):
- The wallpaper source size is the
widthandheightofstate.windows.find((w) => windowRole(w) === "wallpaper"), withwindowRolefromcore/window-declarations.js. Without it, the size of the primary output: the output withroleprimary, elseoutputs[0](the rule ofcore/workspace-outputs.js, near line 143). - The function checks the fields that
validStateofcore/smithay.jsdoes not check: anoutputs[].chatthat is not a safe integer, an output with no stringnameorrole, and a window with no stringoutputNamecount as no chat for that output. - For each output with a chat window that is
visible: a report with the same chat ID gives its rectangles, and an empty report gives no region. Before the first accepted report for that chat ID (no report yet, or a new chat window), the whole chat window rectangle is the region, which is safe. The fallback ends at the first accepted report, also an empty one. - Each rectangle moves to the global space (plus the window
xandy), grows by 24 px on each side, and moves to the space of its output. - On the primary output, the fraction is the position over the wallpaper
source size. On an extra output, the core maps it through the cover
placement of the wallpaper copy (
coverPlacement, a JavaScript copy ofcrate::outputs::coverinnative/smithay/src/outputs.rs, near line 717, with the same rounding and the same integer division of the offsets):(local - placement.x) / placement.width, and the same fory. - The fractions are clamped to 0 to 1 and rounded outward to 4 decimals. Empty regions drop. More than 16 become one bounding box.
- No connected compositor or no
outputsgivesnull.
The core runs it after each state poll and after each accepted report that
differs from the stored one. It sends legibility when the value differs.
The 100 ms rule is a throttle with a trailing timer in server.js: a change
within 100 ms of the last send starts one timer (or keeps the running one),
and the timer sends the newest value when it fires. So the last change is
never lost. At connect the stream gets the current value.
WallpaperChannel.write gets a rule for each event: above 16 KB not yet
sent, it drops a camera event (phase 2) and destroys the stream for a
legibility event; the 64 KB rule stays for every event.
Page. wallpaper.jsx checks a legibility event: exactly the key
regions, and null or an array of 16 or fewer arrays of 4 finite numbers
from 0 to 1 with a width and a height above 0. The React root keeps the
latest checked value in a ref and calls updateLegibility(regions) of the
running effect. It also passes the ref value to each new effect:
startWallpaper({canvas, effect, legibility}), so an effect switch, which
mounts a fresh canvas and scene (Decision 4), draws its first frame with the
held regions. Only an invalid event and a stream error set the ref to null
(unknown); the time before the first event of the page is null too.
legibilityMask(regions, width, height) in wallpaper-crystals.js makes the
mask: a texel is 255 when its center is inside a region grown by 1.5 texels,
and a smoothstep feather goes to 0 over 5 more texels (40 px; review
round 1 of the code widened it from a linear 2 texels, because a large halo
showed a hard edge at the border). With linear filtering,
every pixel inside a region then reads 1. The rows go bottom first, as
gl_FragCoord counts. null gives a mask of 255 everywhere. A new region
applies at once; a region that goes away fades out over 300 ms
(max(new, old * (1 - k))). The page computes the mask again only on a change
and during that fade.
Shader rule. Every crystals program reads
m = texture2D(legibility, gl_FragCoord.xy / resolution).r.
- Opaque draws (the composite, or the fog of the no-DOF path) and
alpha-blended draws (the crystal faces) scale the linear source color by
limit / Lwhen its relative luminanceLis overlimit = mix(1.0, regionCap, m). - Additive draws (halos, particles) multiply their output by
1 - m. regionCapis 0.088, a half 8-bit step under 0.09, to leave room for the 8-bit rounding of the blends.
Why this holds where m is 1: the first draw is opaque and writes L of
0.088 or less. Each alpha draw writes a * s + (1 - a) * d for each encoded
channel, with s and d both under the cap. The sRGB decode is convex (its
slope is 1/12.92, about 0.0774, on the linear part, about 0.0787 at the joint
and grows after it), so the decoded result is at most
a * decode(s) + (1 - a) * decode(d) for each channel. The relative
luminance is a positive sum of the channels, so it stays under the cap. The
additive draws add 0. This argument is for exact values. Each 8-bit write
rounds each channel on its own, so a stored pixel can sit a little over the
exact value, and the next blend starts from it. The bound with rounding is
the result of the property test (Tests, phase 1.5), not of this argument:
the pixels of a region stay within one 8-bit step of L 0.09 in that test,
also through the 600 ms color transition. With dither off the rounding is
deterministic. The three text tokens keep 4.7:1 or more against L 0.09, as
in phase 1.
null regions cap the whole wallpaper and turn off the halos and particles:
the brightness of phase 1 everywhere. This is the state at load until the
first event, after a stream error and after an invalid event.
Accepted limits.
- Lag: the core reads the window rectangles at its 100 ms poll, and the host reports one frame after a layout change. A chat window that moves or takes another tile can show its text up to about 200 ms before the region arrives. The old region fades over 300 ms. During that time the text keeps its shadow.
- The region of an output chat on an extra output also dims that area of the primary output, because both show one buffer.
- Phase 2 parallax does not move the regions: they are screen positions.
- A report measured in an old chat window that arrives after the chat window ID of its output changed gets the new ID, because the host does not know its own window ID. The new chat window sends its own first report after layout settles, which replaces it. Until then the region can be wrong for one report cycle; the text keeps its shadow.
- An empty report sent before the text is in place ends the whole-window fallback early. The host waits for layout to settle before its first report (Host, above). A later layout change that the host does not observe stays a risk; the text keeps its shadow.
Budgets
- Unchanged: the 1280x720 internal resolution cap with no DPR multiplication, the 30 fps cap and the pause rules.
- Extra GPU memory at the cap: A and B, 921,600 bytes each (1.84 MB); the mask, 14,400 bytes; the particle buffers, about 35 KB; the mesh grows to 2,592 bytes. About 1.9 MB of data; with the padding of the driver, the estimate is 2 to 4 MB in the GPU process. No depth buffer and no MSAA.
- Files:
wallpaper.jskeeps the lifecycle, the aurora, the palette read and the color transition, and stays at 24,576 bytes or less after Prettier (it gets smaller, because the crystal code moves out). The new source modulevendor/interface/host/wallpaper-crystals.jshas the crystals scene: the shaders, the mesh, the field, the particles, the render targets, the passes and the mask. Budget: 32,768 bytes or less after Prettier. A unit test checks both sizes. The esbuild bundleshadcn-wallpaper.jscarries both, so the page still loads one script; the bundle grows by about 15 to 20 KB minified (an estimate). - Served files, the CSP and the wallpaper partition allowlist: no change. The new module is a source of the bundle and is never served alone.
Files
vendor/interface/host/wallpaper-crystals.js(new): above.vendor/interface/host/wallpaper.js: the crystal code moves to the new module;startWallpapergetsupdateLegibilityon its dispose function, asupdatePalette, and deletes the targets at dispose.vendor/interface/ui-src/host/wallpaper.jsx: thelegibilityevent, the ref of the latest regions passed to each new effect,nullon a stream error or an invalid event.vendor/interface/host/workspace-zoom.js:measureWallpaperTextand its reporter.vendor/interface/host/host.js:wallpaperTextElementsand the reporter in each chat window; the recovery document sends an empty list.- The committed bundles that
build:checkreports, built again. web-shell/core/wallpaper-legibility.js(new):legibilityRegionsandcoverPlacement.web-shell/core/server.js: the route/api/wallpaper-text-regionswith its 4096-byte body limit, the reports in memory, thelegibilityevent at connect and on a change, and the trailing timer of the 100 ms throttle.web-shell/core/wallpaper-channel.js: the rule for each event inwrite; alegibilityevent is never dropped, and above 16 KB not yet sent the stream is destroyed.- Tests (Tests, phase 1.5).
- Docs: openspec/specs/visual-effects-3d-shaders/spec.md (the passes and the targets), openspec/specs/color-palette/spec.md (the cap applies in the regions only), docs/nested-qa.md (the checks), this file. The line of the wallpaper effect in the Boundaries of AGENTS.md (the text regions route takes only the host token; no agent tool, MCP entry, scheduled turn, generated HTML or plugin panel reaches it) lands in the implementation commit, not in this spec commit.
No compositor change. The core and the host change, so the activation is the next login, or the documented host and core maintenance.
Review round 1 (2026-11-02)
Round 1 of the spec (two code reviewers and a security auditor) reported 1 MEDIUM and 15 LOW findings, no HIGH. Each was checked against the code; all are fixed in this section and in Tests, none declined.
- M1: an effect switch started a scene with unknown regions, so the crystals stayed fully capped until the regions changed. The React root now holds the latest regions in a ref and passes them to each new effect.
- L1, L2: the host list has six elements (
#voice-transcriptadded, a plain<p>in the composer area with--color-text), so 0 to 6 rectangles. - L3: the source size is the wallpaper window, else the primary output by
role; the cover copy matches Rust for negative and odd offsets. - L4:
legibilityRegionschecksoutputs[].chat,role,nameandoutputNameitself, becausevalidStatedoes not. - L5: the whole-window fallback ends at the first accepted report, also
[]. - L6: the bound with 8-bit rounding is a property test result, not a proof; dither is off.
- L7: the planes
mat3moved to the vertex shader; the crystal fragment shader uses 10 uniform vectors or fewer, under the minimum of 16. - L8: 91 draws (88 without DOF), asserted exactly.
- L9: unit 0 is
nullbefore pass 1, and only the blur and composite read it. - L10: the host reporter stops after a 404.
- L11: per-event rules in
WallpaperChannel.writeand a trailing timer for the 100 ms throttle. - S1: a 4096-byte body limit on the route.
- S2: an unknown
outputis refused; the report map is capped at the output count and drops removed outputs. - S3: exact keys, safe integers, and
x + width,y + height16384 or less. - S4: a report equal to the stored one runs no mapping and no send.
- Note: the AGENTS.md Boundaries line lands with the implementation commit. An empty report before layout settles is handled by the delayed first report and is listed as an accepted limit.
Phase 2: depth parallax with the canvas camera
Step 0, measure before product code. On the real machine, with a
throwaway build, the user pans and fits on a Canvas workspace while the page
logs the time from each camera event to the next drawn frame, and the core
logs the event rate. Step 0 also checks that mode.camera follows the 300 ms
flight. The result picks the design: the channel if it meets the budget of
the performance table, else the compositor fallback of Decision 3, after the
user sees the numbers.
Files (channel design):
web-shell/core/server.js: thecameraevent, its gate, its thresholds and the backpressure drop.vendor/interface/host/wallpaper.js: the layer offsets and scales, the filter, the 300 ms ease at a switch, the wrap.vendor/interface/ui-src/host/wallpaper.jsxand the bundle: sendcameraevents to the renderer.- Docs: openspec/specs/canvas-windows/spec.md (the wallpaper moves with the camera, with depth), openspec/specs/multi-output-workspaces/spec.md (the extra outputs show the parallax of the primary output), this file.
No compositor change in the channel design. Activation: the next login.
Phase 3: no frames while covered or locked
Step 0, measure before code. In a nested run (Electron 45 on Ozone
Wayland, flags as in scripts/session-supervisor.py:144), a nested-only debug
command stops the frame callbacks of the wallpaper, and in a second test also
sets the xdg_toplevel suspended state. The run records the wallpaper commit
count and, through a temporary console line, document.visibilityState and
the draw count. The expected main case is the frame callbacks: Electron keeps
the page visible while backgroundThrottling is off, so the suspended state
probably does not reach document.hidden. The result picks the design before
any product code:
- Frame callbacks stop the draws: phase 3 uses them only.
- They do not: the Electron main process cannot read the compositor state, so
the core reads
wallpaper.suspendedand relays it to the host through an authenticated route. The host then callssetBackgroundThrottling(true)for that time, withsuspendedset too. This needs a decision of its own.
The suspended state reaches only clients bound to xdg_wm_base version 6.
Smithay 0.7 knows State::Suspended; step 0 checks the version that
XdgShellState in native/smithay/src/state.rs:360 advertises.
Definition of covered. Window finish reports no opaque regions
(native/smithay/src/window_finish.rs:151), so a geometric test is not
possible. The rule uses the presentation: an output covers the wallpaper when
its shown workspace has the Immersive presentation or a fullscreen window, and
no workspace transition runs on it. The wallpaper is suspended when the primary
output covers it and each extra output that draws the copy covers it too, or
when the session is locked. It is never suspended while a workspace
transition or the workspace overview (planes and PNG previews)
is open, because these draw the wallpaper buffer.
Accepted limit: an Immersive or fullscreen client with alpha shows the last wallpaper frame, frozen, behind its transparent pixels. The compositor cannot tell, because opaque regions are empty. Step 0 records how often this happens with the usual applications; if it is common, the user decides.
Lock. The wallpaper stays active until the lock has its hidden frame on
every output (the lock leaves Phase::Locking, native/smithay/src/drm.rs
near line 293). It becomes active at the start of the unlock.
Frame callbacks. Only the primary loop sends frame callbacks to the
wallpaper (drm.rs near line 235 skips the windows on_extra; the extra loops
in drm.rs near line 297 and, until step 8 of the GLES removal deleted it,
native/smithay/src/winit.rs near lines 372 to
398 send only to extra_windows). An extra output draws a copy of the same
buffer. So the primary loop keeps sending frame callbacks while any extra
output shows the copy, and stops only in the suspended state.
Channel. While suspended, the page draws nothing, but the event stream stays open. Camera events move the targets only, and a palette applies at once (Decision 5). The first frame after the suspension shows the current offsets and colors.
State. The compositor counts the commits of the wallpaper surface in the
commit handler (native/smithay/src/handlers/compositor.rs:31, with
layers::is_wallpaper from native/smithay/src/layers.rs) and reports
wallpaper: {suspended, commits} and capabilities.wallpaperSuspend in the
snapshot (native/smithay/src/desktop/snapshot.rs: the capabilities object
near line 164, the "capabilities" key near line 286).
The capability lets the nested QA and the skew checks tell the builds apart.
Phase 3 is a compositor change, so it needs a new login.
Relation to HeroUI phase 10
Phase 10 is on origin/main (c0beded, d5c9f51). Phase 1 builds on it: both
effects stay plain WebGL in wallpaper.js, and the React root owns the
canvas, the effect state and the event stream. The crystals add no HeroUI part
to the wallpaper page. The setting uses the HeroUI SettingSelect of the
settings page.
Tests
Unit tests in web-shell/test/wallpaper.test.js (fake GL, as today):
- The nine current tests keep passing, with the new class name, for both effects.
- The seeded field has 14, 9 and 5 crystals by layer, and two starts give the same field.
- One crystals frame makes one backdrop draw and one draw for each crystal, back to front by layer.
- The palette read takes valid
#rrggbbtokens and uses the defaults for a missing, empty or invalid value. - Each position stays finite and inside the wrap bounds after a simulated 24 hours.
- The clamp: the JavaScript copy of the clamp gives a luminance of 0.09 or less
for the brightest inputs, and the contrast of each of the three text tokens
against the cap is 4.5:1 or more. The test reads the defaults from
vendor/interface/host/theme.cssand the tones thatweb-shell/core/profile-color.jsmakes for each preset, so a palette change that breaks the rule fails the test. - Color transition: the colors at 0, 300 and 600 ms are the old colors, the eased mix in linear light, and the new colors; a second palette at 300 ms starts from the mix; while paused, a palette applies at once; the clamp of each sampled step stays at 0.09 or less for the brightest preset pair.
- Effect switch: a switch disposes the old effect (listeners removed before
loseContext, no CSS fallback) and starts the other one with the same caps. - Phase 2, parallax: deltas of one workspace move each layer by its factor; a
workspace switch, a layout switch, a reconnect and the first event add no
delta; one event moves a layer by at most half of the field width; the zoom
scale is
zoom ^ kand eases to the new target in 300 ms;active: falseholds the offsets and eases the scale to 1; reduced motion, a PNG and the aurora ignore camera events; after 24 hours of synthetic pans each offset stays finite and wrapped. - Phase 1.5, passes (the fake GL records the calls): one crystals frame binds
framebuffer A, draws the fog, the far halos, faces and particles, then the
horizontal blur to B, the vertical blur to A, the composite to the null
framebuffer, then the middle and the near layers, in this order. Each
crystal draws its halo, its back faces (front faces culled) and its front
faces. The halos and the particles use additive blending; the faces use
alpha blending; the composite uses none. A frame makes exactly 91 draws,
and 88 in the no-DOF path. The start calls
gl.disable(gl.DITHER). - Phase 1.5, texture units: before pass 1 unit 0 has
nullbound; only the blur and composite programs set a sampler to unit 0; every other crystals program setslegibilityto unit 1; while framebuffer A or B is bound, no draw runs with its own texture bound to a unit that a sampler of the current program reads. - Phase 1.5, fragment uniforms: a count over the declared fragment uniforms
of each crystals shader source (a
vec3,vec2orfloatcounts as one vector, amat3as three, samplers as none) gives 16 or fewer, and 10 or fewer for the crystal shader. - Phase 1.5, render targets: A and B are
RGBAandUNSIGNED_BYTE, of half the drawing buffer size, withCLAMP_TO_EDGEandLINEAR; a resize specifies them again; dispose deletes both framebuffers and the three textures beforeloseContext. - Phase 1.5, the no-DOF path: a null
createFramebuffer, a nullcreateTexture, an incompletecheckFramebufferStatus, a half size under 8 px and a size overMAX_TEXTURE_SIZEeach give one canvas pass with no blur draws, no CSS fallback and one log line. A failure of the mask texture, or of any crystals program, gives the CSS fallback. - Phase 1.5, the particle field: 110, 50 and 20 particles by layer, two starts give the same field, each velocity is a whole number of crossings in 3600 s, and the positions at 0 s and at 3600 s are equal.
- Phase 1.5, the mask:
legibilityMaskwithnullis 255 everywhere; with regions, a bilinear sample of the mask at every drawing buffer pixel inside a region is 1, for regions at the edges, of 1 px, and over each other; the rows go bottom first; a region that goes away fades out in 300 ms and a new one applies at once. - Phase 1.5, the contrast in each region: the JavaScript copy of the region
rule gives
Lof 0.088 or less form1 and the brightest inputs; a property test of 10,000 random sequences of 8-bit opaque, alpha and additive writes under the rule keeps each result within one 8-bit step of L 0.09. The test models the rounding of each channel on its own after each write (round to nearest, no dither), with source colors of different channel profiles: gray, one bright channel (red, green or blue), teal and violet, and alpha values from 0 to 1. The three text tokens oftheme.cssand of every preset keep 4.5:1 or more against that value; every sampled step of a 600 ms transition between the brightest preset pair keeps the same bound withm1. - Phase 1.5, the file sizes:
wallpaper.jsis 24,576 bytes or less andwallpaper-crystals.jsis 32,768 bytes or less. - Phase 1.5, the palette: the fog light, the body tint, the core color and the particle color are functions of the five tokens only; a new palette moves them in 600 ms with the tokens.
- Phase 1.5, an effect switch: with regions held from an earlier event, a
switch to the aurora and back to the crystals starts the new scene with
startWallpaper({canvas, effect, legibility}), and its first frame uploads the mask of the held regions, not the full mask. A stream error and an invalid event set the held value tonull.
Core tests (web-shell/test/desktop-visuals.test.js and the server tests):
/desktop-wallpaper/events,/desktop-wallpaperand/desktop-wallpaper.pnganswer 403 without the launch cookie, also with a validx-shell-token, and a refused request counts and closes no stream.- The wallpaper CSP has
connect-srcwith the exact events URL built from the bound address of the core, also for a request with anotherHostheader, and no'self'; the other directives do not change. wallpaper.htmlgetsdata-effectwith the saved value, andcrystalsfor a missing or invalid stored value: the core checks the value when it serves the page, not only when it writes it.- At connect the stream sends
effectandpalettewith exactly their keys. /api/wallpaper-effectaccepts only{effect}withauroraorcrystals, saves it, and sends oneeffectevent; it answers 403 without thex-shell-token.- A profile color change, a Matugen apply and remove, and a
replace_uieach send onepaletteevent with the new revision, and a write with the same revision sends none. - A third stream closes the oldest one. A stream with more than 64 KB not yet sent is destroyed.
wallpaperRequestAllowedaccepts exactly the listed routes and a/theme.css?palette=value of 64 hex digits, and refuses/api/,/host-layout,/lock-stateand any other path.held-streams.test.js: the wallpaper window is not in the shared partition (desktopWindowOptionswithwallpaperSurface: truegivesagent-native-wallpaperanddevTools: false), so its stream is not counted against the pool. The test reads onlyhost/*.js(near lines 13 to 22), where theEventSourcelands in the bundleshadcn-wallpaper.js. Its stream regex also matchesnew EventSource(, and the loop "every script with a stream belongs to a counted window" (near lines 58 to 60) exemptsshadcn-wallpaper.jsby name, as a script of its own partition.- The CSP of a plugin panel (
web-panels.cjs) keepsconnect-src 'none', so a panel cannot reach the events route. - No agent tool, MCP entry or scheduled turn names the wallpaper effect or the events route (a check over the tool list, as for the other protected settings).
- Phase 2: the camera event is active only for a Canvas layout on the primary
output, with no overview, no lock and the crystals effect; a Canvas state
with presentation
workspacesgivesactive: false; it has exactly its keys; it is not sent for a change under the thresholds; a response buffer over 16 KB drops it and the next change sends the newest value; the camera of an extra-output workspace never goes out. - Phase 1.5, the route:
/api/wallpaper-text-regionsanswers 403 without thex-shell-token; a body over 4096 bytes is refused; it accepts exactlyregionsand an optionaloutput, and 0 to 6 rectangles with exactly the keysx,y,widthandheightof safe integers in range. It throwsInvalid wallpaper text regionsfor an extra key, a float, a value overNumber.MAX_SAFE_INTEGER,x + widthory + heightover 16384, 7 rectangles, and anoutputthat is not indesktop.state.outputs. It saves nothing and sends no compositor command. A report equal to the stored one runs no mapping and sends nothing. The report map never has more entries than outputs, and a state poll without an output drops its entry. - Phase 1.5,
legibilityRegions(wallpaper-legibility.test.js, with synthetic states): a report on the primary output gives the rectangle grown by 24 px over the wallpaper window size; without a wallpaper window, the size of the output withroleprimary, elseoutputs[0]. An output chat on an extra output maps throughcoverPlacement, which gives the same placements as the Rust tests ofcover, also for negative offsets and an odd difference of sizes (integer division toward zero, as Rust). A visible chat with no report, or with a report of an older chat ID, gives its whole window; a report[]gives no region for that chat and ends the fallback; a hidden chat gives nothing; a non-integeroutputs[].chat, an output with nonameorroleand a window with nooutputNamegive no chat for that output; 17 regions give one bounding box; no compositor givesnull. - Phase 1.5, the event: at connect the stream sends
legibilitywith exactly its key; a report and a window move each send one event, a change under the rounding sends none; two changes within 100 ms send the first one at once and the newest one when the trailing timer fires, and a single change inside the 100 ms window is still sent by the timer; a buffer over 16 KB destroys the stream and drops nolegibilityevent, and still drops acameraevent (phase 2). - Phase 1.5: no agent tool, MCP entry or scheduled turn names the text regions route, and the recovery document sends an empty list.
- Phase 1.5, the host (
host-script.test.jsor a newwallpaper-text.test.js):measureWallpaperTextmeasures only the visible elements ofwallpaperTextElements, rounds outward, clips to the window and gives an empty list for a chat with messages;#voice-transcriptwith text gives a rectangle; the reporter sends only on a change, waits for the earlier request, sends its first report only afterdocument.fonts.readyand the first snapshot render, and stops after a 404 answer (no further request in 10 later measurements).
Settings test: the WallpaperEffect select shows the value of the snapshot,
sends /api/wallpaper-effect on a change, and is a HeroUI component.
Browser harness test-wallpaper-browser.js (headless Chrome with SwiftShader,
real assets on an isolated loopback server, same pattern as
test-palette-browser.js, and an events stub on the exact path): both
effects compile under the CSP; two frames 0.5 s apart differ; an effect
event equal to the current effect keeps the same canvas element; a PNG blocks
the canvas; reduced motion draws nothing; a simulated context loss shows the
CSS fallback; an effect event switches the effect with no reload and no
CSP violation; a palette event changes the crystal tint, a frame at about
300 ms has a mixed tint, and no 8-bit pixel of any frame of the transition is
over the cap plus one 8-bit step (the next 8-bit value above L 0.09); a fetch
to any other path is blocked by the CSP. Phase 2: a camera stream of a pan
moves the near crystals more than the far crystals. The pixel read happens in
the same task as the draw, through a test hook that the harness enables, or
with preserveDrawingBuffer: true set only by that hook.
Phase 1.5 adds these harness checks. The test hook gets three fields that only
the harness sets: time (a fixed scene time, so two frames compare), only
(far, middle or near: draw that layer only) and noRenderTargets (the
no-DOF path). The stub sends legibility events.
- Glow: with
{"regions": []}, some pixel of 10 frames has L 0.3 or more, and the frame has pixels over the cap. - Depth of field: at one fixed
time, the mean gradient of L (high frequency energy) of a far-only frame with the blur is 60% or less of the same frame withnoRenderTargets. A near-only frame keeps 90% or more of its energy with the blur. - Region cap: with a centered region and a region at a corner, no 8-bit
pixel inside a region is over L 0.09 plus one 8-bit step in 30 frames,
also through a
paletteevent and its 600 ms transition. Some pixel just outside a region goes over the cap in those frames. - Effect switch: with regions held, an
effectevent to the aurora and back to the crystals gives a first crystals frame with the region cap inside the regions and pixels over the cap outside them, with no newlegibilityevent. - Unknown: before the first
legibilityevent, after{"regions": null}, after an invalid event and after a stream error, no pixel of the frame is over the cap plus one step. - A region that goes away: the pixels inside stay under the cap plus one step until the fade starts, and some go over it within 1 s.
noRenderTargets: the page keeps drawing, shows no CSS fallback, makes no blur draw, and the region cap holds.- No new request: the page fetches the same paths as phase 1, with no CSP violation.
Phase 3 Rust tests:
- An Immersive or fullscreen workspace on the only output suspends the wallpaper, and no frame callback goes to it.
- A workspace transition or the workspace overview keeps it active.
- Two outputs: the primary covered and the extra free keeps it active, and the primary loop keeps sending its frame callbacks.
- A lock suspends it only after the hidden frame; an unlock makes it active.
- The commit counter counts only wallpaper commits.
Nested QA (scripts/nested-qa.py, docs/nested-qa.md; nested proof only, with a
software renderer, a synthetic profile and no provider):
- Phase 1:
start, twocapturecalls 1 s apart differ in the free wallpaper area; the crystals show behind the chat glass;start --outputs 2shows the copy on the second output. In the settings, choose "Aurora" and "Cristais" and capture each, with no wallpaper reload. Change the profile color, then capture at once and after 1 s: the tint changes, with no reload. The frame times ofRUST_LOG=frame_timing=infoare informational only, because the nested renderer is software. - Phase 1.5: set the profile color of the synthetic profile to the preset
"Verde-água" (
#14b8a6) and capture the free wallpaper. Compare the capture with the reference of decision 7, outside Git, item by item: one teal hue from near black to near white, glowing cores, facet lines, halos, fog with a cloud bank in the lower third, far crystals blurred and near ones sharp, soft particles. Record each item as present or absent; the look itself is the judgment of the user. With the chat empty, read the capture in the 24 px band around the welcome and the inspector (inside the region, outside the text): no pixel is over L 0.09 plus one 8-bit step in 5 captures 1 s apart. Send a synthetic message with no provider (the welcome hides), and capture after 1 s: the band can be bright again. Change the profile color to "Violeta" and capture at once and after 1 s: the whole scene, fog included, changes hue with no reload. Withstart --outputs 2, the welcome of the output chat of the second output also gets its band. Choose "Aurora": it looks as in phase 1. - Phase 2: turn on the
canvassetting in the synthetic profile, switch to Canvas with Super+Shift+T, pan with the canvas keys, and capture before and after: the near crystals moved more than the far ones, and a capture after a switch to Grid shows no jump. One output only. - Phase 3: check
capabilities.wallpaperSuspend;launchan application, make it Immersive, readwallpaper.suspended: trueand the samewallpaper.commitsvalue 10 s apart; leave Immersive and check thatcommitsgrows again.
The live session, a real GPU, a 1440p output, a second real monitor, the touchpad pinch and the visual judgment need the user. For phase 1.5 the user also compares the live teal desktop with the reference and checks the welcome text with crystals that pass behind it.
Performance acceptance
Measured in Electron on the real machine only, against the aurora on the same commit base and the same output. Nested numbers do not count. The measure uses the whole process tree (openspec/specs/performance/spec.md, line 53): the wallpaper renderer and the Electron GPU process, which holds the WebGL buffers. PSS for memory, CPU as a percentage of one core.
| Measure | Limit |
|---|---|
| Draw rate | 10 frames per second at rest, 30 for 1 s after a camera or palette change (since 2026-11-03); 0 while hidden, under reduced motion, with a PNG, and (phase 3) while suspended |
| Wallpaper renderer CPU, mean over 60 s, idle | 6% or less, and no more than the aurora plus 2 points |
| Wallpaper renderer CPU, mean over 60 s, one color transition every 2 s | No more than the idle crystals plus 0.5 points |
| Phase 2: wallpaper renderer CPU, mean over 60 s, continuous pan | No more than the idle crystals plus 1 point |
| Phase 2: core CPU for the camera events, continuous pan | 0.5 points or less over the core without the stream |
| Phase 2: camera events | 10 per second or less while the camera moves; 0 while it stays, outside Canvas, in an overview and while locked |
| Phase 2: lag from a camera change to the wallpaper frame | 160 ms or less at the 95th percentile |
| Wallpaper renderer PSS plus GPU process PSS | No more than the aurora plus 3 MB |
| Compositor frame time, 95th percentile, chat glass on | No more than the aurora plus 1 ms, also during a pan |
| Brightest wallpaper pixel, also during a color transition | Relative luminance 0.09 plus one 8-bit step or less (contrast 4.7:1 or more). Since phase 1.5: inside the legibility regions, and everywhere while the regions are unknown; no limit elsewhere |
| Phase 1.5: wallpaper renderer CPU, mean over 60 s, idle | 8% or less, and no more than the aurora plus 4 points |
| Phase 1.5: GPU process CPU, mean over 60 s, idle | No more than the aurora plus 5 points |
| Phase 1.5: draw rate achieved at the 1280x720 cap, idle | 29 frames per second or more, mean over 60 s, and no 1 s window under 24. Since 2026-11-03 the idle rate is 10 fps by design; this line now applies during a pan |
| Phase 1.5: wallpaper renderer PSS plus GPU process PSS | No more than the aurora plus 7 MB (the 3 MB of phase 1 plus 2 to 4 MB of render targets) |
| Phase 1.5: compositor frame time, 95th percentile, chat glass on | No more than the aurora plus 1 ms, as phase 1 |
Phase 1.5: core CPU for the text regions and the legibility events |
0.2 points or less over the core without them, with a chat window that moves |
Phase 3: wallpaper.commits while suspended |
No change over 10 s |
The GPU time of one WebGL frame is not a criterion: Chromium usually turns off
EXT_disjoint_timer_query, so the number is not available. Phase 1.5 uses the
achieved draw rate and the GPU process CPU in its place: a GPU that cannot
draw the passes in 33 ms drops frames. If the lag or a
CPU line of phase 2 fails in step 0, phase 2 uses the compositor fallback
(Decision 3). If a phase 1.5 line fails on the real machine, the user sees
the numbers before any change; the first lever is the fog octaves and the
particle count, then the no-DOF path as the default.
Frame rate at rest (2026-11-03)
The user asked for a performance analysis of the shell in use. At rest, with
the nebula, the Electron GPU process spent about 40% of one core (its
VizCompositor thread) and the compositor about 12%, every second, with no
user input. A nested comparison (scripts/nested-qa.py, one 1896x1032 output,
synthetic profile, two 20 s samples each, software rendering, so only the
ratio counts) gave for the GPU process 30.5% with the nebula and 0.8% with a
static PNG, and the nested compositor did about three times the work. The
wallpaper animation was the whole idle cost of the GPU process.
The change, in host/wallpaper.js:
- The draw rate is 10 fps at rest (
idleFrameMs). The three effects move slowly, so the step is not visible. - A camera event (the parallax) or a new palette while the scene draws asks
for 30 fps (
busyFrameMs) forbusyMs(1 s): the 300 ms workspace switch, the 60 ms filter and the 600 ms color move keep the rate of phase 2. - The page waits for the next frame with a timer and only then asks for an animation frame. Before, it asked for one on every vsync and skipped most of them; each wake-up cost the renderer and the GPU process work. A frame that the vsync brings up to 4 ms early still draws, so 30 fps on a 60 Hz output does not fall to 20 fps.
The idle rate came from a nested curve of the GPU process with the nebula
(wallpaper commits per second from state, CPU over 20 s): 1 commit/s 4.4%,
4 commits/s 10.2%, 9 commits/s 19.2%, 14 commits/s 28.4%, and main 15
commits/s 30.6% (the nested output already held main near 15 fps). The cost
grows about linearly with the rate. The user chose 10 fps over 15 fps: lower
rates make the twinkling step. The saving on the real machine, where main
came closer to 30 fps, is not measured yet: it needs a new host.
The pause rules, the PNG priority, the resolution cap and phase 3 do not change.
Rollback
- Phase 1:
git revertof the commit, then the next login. ThewallpaperEffectkey stays in the profile and the older code ignores it. A user can also stop the effect with the setting, a profile PNG or reduced motion. - Phase 1.5:
git revert, then the next login. The phase 1 page ignores thelegibilityevent, and the older core rejects the text regions route, which the older host does not call. The global cap of phase 1 returns. - Phase 2:
git revert, then the next login. The phase 1 page works with or without camera events. - Phase 3:
git revertand a compositor rebuild; the change takes effect at the next login. The phase 1 and phase 2 page works with or without phase 3.
Phase 1 implementation (2026-11-02)
Phase 1 follows this spec, with these choices where the spec left room:
- The stream wrapper is its own module,
web-shell/core/wallpaper-channel.js(WallpaperChannel), aroundeventStream, so the two-stream cap and the 64 KB rule have unit tests with fake responses.server.jsowns the route,notifyPalette()and the setting. server.jschecks the launch cookie of both/desktop-wallpaperand/desktop-wallpaper.pngbefore it callsdesktopVisual, so the 4-argument calls of the tests keep working.desktopVisualchecks the effect again.notifyPalette()runs after every authenticated/api/write that reaches the end of the route switch, after every MCP tool call and where the hosts readwallpaperThemeRevision(also the 100 ms/api/statepoll). A write branch that returns early reaches the page through that poll. It sends only when the revision changed, so the profile color, a Matugen apply or removal, areplace_ui,/api/restoreand/api/changes/recoverall reach the page with one code path. After a write or a tool call, a failure ofnotifyPalette()is logged and never changes the result.- The page carries
data-palette, the revision of the/theme.cssit loads. The first palette event of a stream loads the sheet again when it differs, so a change between the page load and the stream connect is not lost. A sheet that fails to load is tried again at the next palette event. - The wallpaper session is prepared in the chain of
openSurface("wallpaper"), afterlockWindows.start(), so a failure of its cookie blocks only the wallpaper. - The core answers any request whose
Hostheader is not its bound address with 400 before any route, so a page with anotherHostnever exists; the HTTP test checks that refusal. - The settings select is always shown (the wallpaper exists only on the Smithay desktop, and the setting is harmless elsewhere).
- The crystals keep their own clock while hidden, so a pause does not move them; the aurora still starts a fresh epoch, as before.
startWallpaperreturns its dispose function with anupdatePalettemethod; the React root calls it from theonAppliedcallback ofsyncWallpaperTheme.- A test hook (
window.__anosWallpaperTest) turns onpreserveDrawingBufferand gets each frame in the same task as the draw. Only the harness sets it; the page CSP lets no other script run. wallpaper.jsis 24,547 bytes after Prettier, under the 24,576-byte (24 KiB) budget.
Tests: web-shell/test/wallpaper.test.js (both effects, the field, the draw
order, the palette read, 24 hours of positions, the clamp against the three
text tokens of theme.css and of every preset, the transition and the
switch), wallpaper-channel.test.js, wallpaper-events-http.test.js (403
paths, the CSP, data-effect, the route, the palette writes, the stream cap
and the tool list), desktop-visuals.test.js, desktop-window-options.test.js
(the allowlist and the session), held-streams.test.js,
shadcn-wallpaper.test.js, shadcn-settings.test.js and host-script.test.js.
The browser harness is npm run test:wallpaper
(web-shell/scripts/test-wallpaper-browser.js); npm test does not run it.
Activation: the core and the host change, so the next login, or the documented host and core maintenance. A host asset reload alone is not enough. The performance acceptance table is not measured yet; it needs the real machine.
Phase 1.5 implementation (2026-11-02)
Phase 1.5 follows the spec above, with these choices where the spec left room:
- The scene is
vendor/interface/host/wallpaper-crystals.js(createCrystalScene, withresize,updateLegibility,render,disposeand adofgetter).wallpaper.jskeeps the aurora, the lifecycle, the palette read and the newlegibilityRegionscheck of an event value. Sizes after Prettier:wallpaper-crystals.js32,704 bytes (budget 32,768) andwallpaper.js13,289 bytes (budget 24,576). A unit test checks both budgets. - The fog runs 5 octaves at half resolution and 4 octaves on the no-DOF path,
through a uniform with a loop break. The first no-DOF frame logs one
console.warn. - The test hook
window.__anosWallpaperTestalso takestime,only(far,middleornear; the fog is then a clear to black) andnoRenderTargets. Only the harness sets it. - The core module is
web-shell/core/wallpaper-legibility.js(checkTextRegions,coverPlacement,legibilityRegions).server.jsholds one report for each output in memory, never on disk, and drops the report of an output that is gone at each state poll. - An older core answers the new route with 400
Unknown API, not 404. The chat host reporter and the recovery page treat both answers as "stop", so a new host on an older core sends one request and then nothing. - The route refuses a report while the core knows no chat window ID for the output ("Wallpaper chat window is not known"), so no report stays bound to no window.
- The host reporter forgets the accepted report after any failed request and tries again after 1 s, doubled up to 30 s, so repeated refusals back off. An accepted report goes again after 30 s, and at once when the desktop events stream connects again, so a core that lost its reports (a core restart, a new chat window ID, an output that came back) gets them back. A reconnect starts a new generation: an answer to an older request does not mark the report accepted, so the report goes to the new core at once. A stopped reporter arms no timer.
- The particle vertex shader takes the aspect as its own uniform
aspect, so no uniform is declared in both stages with other precisions. - The recovery page sends
{regions: []}once while the compositor is connected, so the whole-window fallback does not stay over the recovery window. It stops onUnknown APIand tries again after 2 s on other errors.
Tests: wallpaper.test.js (passes, texture units, uniforms, targets, the
no-DOF cases, derivatives, particles, the mask, the fade, the property test
of the cap and the file budgets), wallpaper-legibility.test.js,
wallpaper-text.test.js, wallpaper-text-regions-http.test.js,
wallpaper-channel.test.js (the rule for each event),
wallpaper-events-http.test.js (the legibility event at connect),
shadcn-recovery.test.js and host-script.test.js. The browser harness
npm run test:wallpaper adds the phase 1.5 checks: the glow with no
regions, the far blur and the sharp near layer, the region cap through a
palette change, an effect switch with held regions, unknown regions, the
fade of a region that goes away, the no-DOF path and no new request.
Activation: the core, the host and the wallpaper bundle change, so the next login, or the documented host and core maintenance. The performance acceptance table is still not measured on the real machine.
Phase 3 implementation (2026-11-02)
Phase 3 ("no frames while covered or locked") is implemented in the compositor. Phase 3 needs a new login: the compositor changes.
Step 0 (nested run 58662236, nested proof, one 1896x1032 output,
software renderer, synthetic profile, no provider). A temporary nested-only
debug flag in winit.rs stopped the frame callbacks of the wallpaper, and in
a second test also set the xdg_toplevel suspended state; a temporary console
line in the page logged the draw count and document.visibilityState each
second. All of it was removed before the commit.
| Test | Wallpaper commits over 10 s | Page draws over 10 s | visibilityState |
|---|---|---|---|
| Frame callbacks sent (baseline) | 32 and 88 | 33 and 87 | visible |
| Frame callbacks stopped | 0 | 0 | visible |
Frame callbacks stopped and suspended set |
0 | 0 | visible |
The draws stop with the frame callbacks alone, and the suspended state does
not reach document.hidden, as expected. XdgShellState::new_with_capabilities
of Smithay 0.7.0 advertises xdg_wm_base version 6. Design: frame callbacks
only; the core relay and setBackgroundThrottling are not built, and the
compositor never sets suspended.
As built. native/smithay/src/wallpaper_suspend.rs holds the rule. An
output covers the wallpaper when its shown workspace has the Focus layout with
the Immersive presentation and an application (the primary output: the focus
application exists; an extra output: the workspace that it shows). The
wallpaper is suspended when the lock is past Phase::Locking (Locked), or
when the primary output and every extra output cover it, with no workspace
transition (workspace_transitions.blocks_pointer()) and no workspace overview
(presentation workspaces or the historical overview flag). An unlock
resets the lock to Unlocked, so the wallpaper is active at once. The primary
loops of drm.rs and (until step 8 of the GLES removal) winit.rs skip the wallpaper frame callback while it is
suspended; the extra loops never sent it. The commit handler counts the root
commits of the wallpaper surface (layers::is_wallpaper). The snapshot reports
wallpaper: {suspended, commits} and capabilities.wallpaperSuspend: true,
and core/smithay.js checks their shape.
Review round 1 (2026-11-02). An output is covered only when the
rectangle that the Immersive application draws (its placement, cut to its
committed geometry at its scale) contains the whole output, and no opening
reveal of that application, workspace transition, thumbnail motion or camera
flight runs (pointer_animation_active). A fixed-size client, a first buffer
that is still small or a minimized application leaves the wallpaper active.
Decided (see the end of this paragraph): the Immersive application is placed in the content area, below the top bar strip and above the bottom bar strip, and the bars are transparent with glass that samples the wallpaper. With the bars of the host mapped, no output is covered, so in the product phase 3 suspends the wallpaper only while locked. The nested run above suspended because it measured the first rule, before this fix. A rule that accepts a frozen wallpaper behind the bar strips needed the user. Decision of 2026-11-03: the user chose "Only when locked". The wallpaper is suspended only while the session is locked; Immersive keeps it active, with no frozen wallpaper behind the bar strips and no square corners. The cover rule stays as built, so it takes effect only on an output with no bars.
What samples the wallpaper while an output would be covered: nothing that
shows. The bar glass and the bar strips sit outside the content area, so the
contain rule already keeps the wallpaper active with bars. The chat is hidden
in Immersive, and showing it leaves Immersive. Panel glass and the Alt+Tab
switcher draw over the application, which covers the output, so their blur
reads application pixels; switcher.rs draws no wallpaper. The overview
planes render only while the overview shows, which keeps the wallpaper active.
A PNG workspace preview (scene::workspace_elements) draws the last committed
wallpaper buffer as a still, which is a valid frame of it.
Resume: the DRM primary output renders on every 16 ms timer tick and on every vblank and queues a buffer each time, and the nested backend requests a redraw after every frame, so the frame callback reaches the wallpaper again within one frame after the suspension ends.
Review round 2 (2026-11-02). The window finish rounds the corners of
every application (scene::finish_radius, 2 to 12 px, in
window_finish.frag, now window_finish.wgsl), so an application that exactly fills the output leaves
the wallpaper in its four corners. The cover rule now needs each output corner
inside the rounded shape: the drawn rectangle must reach past the output by the
radius plus one pixel along one axis. An Immersive application that fills the
output therefore does not cover it, and the look of Immersive did not change.
With the bar strips above, the product suspends the wallpaper only while
locked; the user decided on 2026-11-03 to keep it that way (see above). wallpaper_suspended
checks the lock first and the animations and the overview before the covers.
Deviation: a fullscreen window is not a separate case. The compositor has no xdg fullscreen state outside the Canvas layout, and a Canvas fullscreen is a camera fit that can leave wallpaper in view, so only the Immersive presentation covers an output.
The alpha limit: the GNOME Calculator was opaque in the nested run; no application with alpha was measured, so how often it happens is still open.
Nested proof (same run). capabilities.wallpaperSuspend was true. With
the GNOME Calculator in the Immersive presentation (Focus layout, Alt+Tab),
wallpaper.suspended was true and commits stayed 1086 over 10 s, with the
page draws unchanged. A Super tap (the chat, presentation chat) made it
active: 106 commits over the next 10 s. The workspace overview over an
Immersive workspace kept it active (225 commits over 10 s), and closing the
overview suspended it again. stop ended the run. The lock, the transitions
and two outputs are covered by the in-process tests only.
Phase 2 implementation (2026-11-02)
Phase 2 follows the channel design of this spec. Step 0 did not run before the product code: it needs a new login on the real machine, which this change cannot make. The code ships with an off-by-default measurement instead (below), and the compositor fallback of Decision 3 stays available if the measurement fails. The choices where the spec left room:
- Camera value (the step 0 code check). The snapshot follows the
300 ms flight, not only its end.
advance_camera(native/smithay/src/desktop/canvas_mode.rs) runs each frame and callspan_to(flight.workspace, flight.sample(now)), which writesmode.camera; the snapshot ofcanvasWorkspacesreadsmode.camera; and the Rust test of the Super+F fit (canvas_tests.rs, near line 1902) reads a zoom strictly between the start and the fit at half the flight. So the page uses the exponential filter (60 ms), not the 300 ms ease, for the values between two events of one workspace. The core still reads them at its 100 ms poll, so a 300 ms flight gives about three events. - Core.
web-shell/core/wallpaper-camera.jsholds the gate (wallpaperCamera), the thresholds (cameraChanged) and the sender (createCameraNotifier).server.jscalls it at each state poll, after the legibility check, and after an accepted/api/wallpaper-effect, so a switch to the aurora sends{"active": false}. The 16 KB drop and the 64 KB destroy are the rules ofWallpaperChannelfrom phase 1.5. The thresholds compare doubles: a change that is 0.01 in decimal can be a hair under 0.01 in binary and wait for the next poll. - At connect. The stream also sends one
cameraevent at connect: the last value sent, or{"active": false}. The page adds no delta for the first event of a stream, so this event only sets the scale target. The table above says "when a value changes"; without the connect event a page that loads while the camera stays still would keep the scale at 1 until the first change. - Page.
vendor/interface/host/wallpaper-parallax.jsholds the layer table, the event check (cameraEvent: exactly{active: false}or exactly the five keys, a positive integer workspace, finite x and y, a zoom from 0.1 to 2), the per-layer state (createParallax), the camera curve (easeCamera) and the lag probe. The offsets are in output heights with y up; the pan of one event isf * (-dx, dy) * zoom / H, with the zoom of the newer event andHthe height of the page in CSS pixels (the canvas units at zoom 1). The clamp applies to the length of that vector, at half of the crystal field width (aspect + 0.3output heights). The offsets are doubles with no bound; the crystals wrap them incrystalPoseand the particles get them as wrapped fractions of their own field in the new vertex uniformview(x,y, scale). A first event, another workspace, a change of the active flag (Grid and Canvas, the overview, the lock, the effect) and a streamopenorerroradd no delta. A change of the active flag or of the workspace eases the scale in 300 ms withcubic-bezier(.22,1,.36,1); between two events of one workspace the scale and the offsets follow the filter. - Pauses. While the page is hidden, the offsets stay and the next event adds no delta. Under reduced motion, with a PNG and with the aurora the page ignores the events; a change of the motion preference or of the effect starts the crystals with the offsets at zero.
- Scale. Each layer sets its own projection with the focal length times
its scale, so the scale works around the screen center; the particles
scale through
wof their clip position.perspectivemoved fromwallpaper-crystals.jstowallpaper-parallax.jswith the field of view, sowallpaper-crystals.jsstays at its budget: 32,768 bytes after Prettier, exactly the limit.wallpaper.jsis 14,955 bytes.
Review round 1 (2026-11-02)
- A dropped camera value goes again.
WallpaperChannel.sendandopenreport a camera event dropped above 16 KB, and the camera sender keeps its last sent value in that case, so the next state poll sends the value again also while the camera stays still (an{"active": false}when leaving Canvas, or the last value of a pan). A drop at connect makes the sender forget its value, so the next poll sends it to every stream; a repeated value adds no delta on the page. - Zoom out shows no field edge. Below scale 1 (the middle and near
layers zoomed out, down to 0.79 and 0.63) the scale shrinks the sizes
only: the positions spread by
1 / scale(spreadOf), so on the screen a position moves bymax(1, scale). The crystal field and the particle field keep covering the output with their margin, and the density does not change. Above 1 the positions move out with the sizes as before. The particles get the spread as the fourth component ofview. - Smaller fixes. An event of the same workspace during a 300 ms scale
ease moves the end of the ease to the new target. The core applies the
page's checks (a safe-integer workspace of 1 or more, finite x and y, a
zoom from 0.1 to 2) and sends
{"active": false}when they fail. The step 0 counter counts each event in its own 1 s window and logs a window at the first poll after it ends, also when the events stop.at()reuses its view objects andperspectivekeeps the last 8 matrices, so a still camera allocates nothing per frame. - Declined: reducing the pan offsets modulo the field. The crystal field
(
aspect + 0.3by 1.3 output heights) and the particle field (1.1 output widths by 1.1 output heights) have different periods with no common multiple, so a reduction by one period would make the other layer jump. The offsets stay doubles; the 24 hour test shows them finite, and each scene wraps them before the uniforms. wallpaper-crystals.jsis 32,750 bytes after Prettier.
Review round 2 (2026-11-02)
- A stalled stream waits alone. The round 1 retry resent the camera to
every stream at each poll while one stream stayed between 16 KB and 64 KB.
Now
WallpaperChannelkeeps, for each stream, the newest camera value that it dropped (pending) and sends it on thedrainof that stream, or just before its next event once under 16 KB; a newer camera value replaces it. A camera event above 64 KB destroys the stream, as every other event does. The sender always records the value it sent, andforget()is gone, so the other streams never get a value twice. This replaces the first item of round 1. - No scale jump. An event of the same workspace during a scale ease starts a new 300 ms ease from the scale that shows now to the new target, instead of moving the end of the running ease.
- Shared values.
perspectivekeeps the last matrix of each layer slot instead of an 8-entry map, so an ease of three layers does not evict itself. Its matrices and the views ofat()are shared and read-only; the tests copy them. wallpaper-crystals.jsis 32,757 bytes after Prettier.
Review round 3 (2026-11-02)
- A steady zoom during an ease. Starting a new 300 ms ease at each event of one workspace (up to 10 Hz) began each one from rest, so a steady zoom lagged. Now such an event ends the ease and hands the scale to the 60 ms filter from the scale that shows: no jump, and the scale follows the new target. The 300 ms ease runs only for a switch. This replaces the "No scale jump" item of round 2.
- One drain listener. Each stream gets one persistent
drainlistener the first time a camera value waits for it (hooked), so events while the stream stays above 16 KB add no listener.
How to measure step 0 after a login
The measurement is off by default and costs nothing then. To run it:
- Before a new login, add
AGENT_NATIVE_WALLPAPER_CAMERA_DEBUG=1(the core) andELECTRON_ENABLE_LOGGING=1(Chromium prints the console lines of the wallpaper renderer on stderr) to the environment that the session supervisor passes to the core and the host.session-supervisor.pycopies its own environment for both children and writes their output. After the login, check that both processes have the variables:tr '\0' '\n' < /proc/<pid>/environ | grep -E 'WALLPAPER_CAMERA|ENABLE_LOGGING'. - With the variable, the core serves the page with
data-camera-debug="1". The page logs one line for each 100 camera events:Wallpaper camera lag: p50 <ms>, p95 <ms> over 100 events, the time from each camera event to the next drawn frame. The core logs one line for each 1 s window with events:Wallpaper camera events: <n> in 1 s. - With the
canvassetting on and the crystals effect, switch to Canvas (Super+Shift+T), then pan with a drag and the canvas keys, zoom with Super+scroll and run a few fits (Super+F) for about 60 s. Read the lines in the supervisor output (supervisor.logof the profile). - Measure the CPU lines of the performance table (wallpaper renderer and core, continuous pan against still) with the process tree method of openspec/specs/performance/spec.md.
- Pass: p95 lag 160 ms or less, 10 events or fewer in each 1 s window, and the CPU lines in budget. Fail: the user sees the numbers, and the compositor fallback of Decision 3 gets its own section here before any code. Either way, remove the two variables before the next login.
The lag line counts only the page part of the lag (event to frame). The core poll adds up to 100 ms before the event; the table limit of 160 ms covers both, so a p95 of the page line over 60 ms is a warning sign.
Tests: wallpaper-camera.test.js (the gate, the keys, the thresholds, no
events while still, in Grid, in the overview, locked or with the aurora,
the extra output, the 16 KB drop with the newest value after it, the 64 KB
destroy, the step 0 counter), wallpaper-parallax.test.js (the table, the
deltas, no jump at a first event, a switch, a layout change and a reconnect,
the clamp, the scale ease and the filter, active: false, 24 hours of pans,
the event check, the lag probe), wallpaper.test.js (the view uniform of
a pan, reduced motion, a PNG, the aurora and a hidden page),
desktop-visuals.test.js (the debug flag) and wallpaper-events-http.test.js
(the camera event at connect). The browser harness npm run test:wallpaper
adds "a camera pan moves the near crystals more than the far ones": a pan of
400 px moves the near layer about 100 px and the far layer about 20 px, and
a switch through Grid to a far camera adds no shift.
Not done: the nested QA of phase 2 and step 0 on the real machine.
Activation: the core, the host page and the wallpaper bundle change, so the
next login, or the documented host and core maintenance. Rollback: git revert, then the next login.
The skyline effect (2026-11-13)
The effect skyline (host/wallpaper-skyline.js, theme-packs phase 4; it is the default of Office)
draws four layers of building silhouettes in flat tones of the profile palette, the far layer
the lightest, over a vertical gradient of the sky, with a few small windows lit in the accent
color. It is one WebGL draw call with no image file and no new CSP entry.
- The city comes from a seeded generator (
skylineSeed), so the same profile draws the same city. The strip of each layer is periodic and drawn three times, so each output has a continuous strip under any parallax offset. - It is a dark picture in both modes. The tones are capped with
capLuminanceatluminanceCap(0.09; in light mode that is a lighter dark, a blue hour), and the legibility mask caps the picture atregionCapbehind the text of the chat, everywhere while the regions are unknown, as the nebula does. A lit window dims with the mask. - The window lights never blink: at most one window changes every
windowStepSeconds. - No camera on the Grid. On a Canvas workspace the layers take the parallax of the crystals (far, middle and near views) within the same bounds, the horizontal offset wrapping to the strip and the vertical offset clamped.
- Under reduced motion it draws one still frame (see Reduced motion above).
- A canvas below
skylineMinSizedraws plain geometry: the gradient and one flat band for each layer, with no buildings or windows. - The wallpaper list says that the black hole takes the window close of every theme.
Out of scope
- Crystals that react to the pointer, to agent states or to windows.
- A different crystal field or camera for each output.
- Parallax for the aurora or for a profile PNG.
- Real refraction of the windows or of a wallpaper image.
- A crystal effect over a profile PNG.
- Any agent tool, scheduled turn, generated HTML or plugin access to the effect, the setting, the events route or the text regions route.
- For phase 1.5: a true bloom pass, MSAA, WebGL 2, an adaptive quality that
changes the passes at run time, new palette tokens, a cap behind glass
surfaces, and the colors of
#progress,#voice-status,#voice-transcriptand#change-recoveryin the light mode.
Deep space backdrop (2026-11-03)
The specification moved to Galaxy: deep space backdrop. This heading remains for existing links.
Nebula effect (2026-11-03)
The specification moved to Galaxy: Nebula.
Back to 2D, with parallax (2026-11-03)
Slower rays and living stars (2026-11-03)
Solid polished material (2026-11-04)
The owner requested solid crystals with subtly rounded edges and a reflective finish. The material now draws opaque faces, replacing the emissive core, internal lines and simulated transmission with procedural studio reflections. The halos are subdued. A narrow normal blend softens the facet edges; this is a shading approximation, not rounded silhouette geometry. The existing field, animation, palette transition and local text luminance cap remain in use.
The reflections are synthetic lighting, not captures of desktop windows. Validation and screenshots use the isolated wallpaper browser fixture.
Rounded geometry refinement
The follow-up replaces the shading-only edge treatment with a rounded convex quartz mesh: flat faces, three curved strips at each edge, and corner fans. The body is slimmer, reflections broader, and particle rings less prominent. Normals use the inverse transpose for the per-crystal stretch and shear. The geometry is shared by every crystal and remains below 64 KB. No texture assets, new dependencies or extra render passes are introduced.
Moving reflected light
The material now reflects a procedural luminous ribbon, with finite-source parallax across each face and a slow periodic sweep. Broad colored reflections and narrow highlights reveal the bevels; secondary tints derive from the profile palette. Near crystals are larger (160 to 300 px at 1080p), and a subdued background light band connects the composition. Reflections remain synthetic, with no desktop sampling or new texture/render passes.
Subtle transparency
At the owner's request, the broad front faces now start at 72% opacity, with Fresnel and the narrow reflected highlight increasing opacity to at most 98%. Back faces contribute at 12%, giving a faint internal facet while preserving a solid polished appearance. This uses the existing back/front alpha-blended passes, not physical refraction or desktop sampling.
Clarification: solid volume, transparent crystal
The owner clarified that "solid" meant a coherent volume, not opacity. This supersedes the subtle-transparency tuning above. Broad front faces now start at 20% opacity and rear faces at 16%, increasing at grazing angles and light reflections. Dielectric Fresnel, displaced procedural environment light and small channel offsets suggest glass. The actual background shows through alpha blending; the displacement is not physical scene refraction.
Screen-space transmission prototype
The material lives in host/crystal-material.js. The middle layer reuses the blurred far-layer texture on unit 2. Before the
near layer, copyTexImage2D snapshots the current wallpaper framebuffer into
an independent texture on unit 2. Far crystals retain procedural transmission;
without DOF the middle layer also needs a copy. The fragment shader refracts that image with IOR 1.46,
small RGB dispersion and Beer-Lambert absorption with approximate thickness.
The transmitted image is decoded to linear light, combined with procedural
reflections, capped by the existing text mask and encoded again. Front faces
replace the pixel: blending the unshifted background over transmission would
weaken the distortion. This supersedes the alpha-only look above.
The snapshot contains only this wallpaper's own drawing, never application
pixels. One reusable RGB texture uses up to about 3.52 MiB at 1280x720 when
padded to RGBA by the driver. RGB is required because the default canvas has
alpha: false; copying it as RGBA produces INVALID_OPERATION. One copy per frame processes at most about 3.52 MiB with DOF; no CPU readback
is used in production.
It refracts earlier layers, not other crystals within the same layer. Thickness
is a bounded radial approximation, not a traced exit through the mesh; there
are no multiple internal bounces, caustics or physical environment-map lighting.
The existing gradient supplies the low-resource path if texture allocation fails.
The existing in-memory browser test hook accepts single, calibration and
noTransmission for a centered enlarged crystal, a calibration grid and a
copy-free comparison. These are not settings, routes or renderer permissions.
Tests check a different image with transmission, no GL error, one independent
copy for the near layer, safe texture reuse and disposal. Existing palette, mask, DOF and parallax checks apply.
Reference: WebGL copyTexImage2D.
Measurement on 2026-11-04: headless Chromium with SwiftShader, 1600x900 viewport / 1280x720 drawing buffer, fixed pose, first six frames discarded, 33-34 samples, serial runs after stopping the test suites. CPU submission plus a synchronous 1-pixel readback: full field median 45.4 ms / p95 52.0 ms without transmission, 59.4 / 71.5 ms with transmission; enlarged single crystal 62.1 / 71.4 ms. The initial three-copy design measured 75.0 / 87.0 ms for the field. The one-copy optimization removes two copies in the DOF path. These numbers include readback and software rasterization; they are not GPU timings, a real-session frame-rate guarantee or proof of a 30 fps budget. The profile's existing 10/30 fps policy is unchanged.
Validation: 1,237 Node tests passed; syntax, ESLint, build consistency and
Prettier passed. The browser harness passed with the new calibration comparison
and a zero WebGL error check. Nested run a57e4add showed the field and the
protected composer, and was stopped afterward. Local evidence names:
refraction-grid.png, refraction-field.png, refraction-chat.png and
refraction-timings.json. Nothing was uploaded or activated in the live session.
Antialiasing and art direction (2026-11-04)
The owner requested the image-finish and art-direction items of the remaining work. Crystals request WebGL antialiasing and render up to 1600x900 logical pixels, without DPR multiplication. Aurora and nebula retain 1280x720 and their context options. The far layer remains deliberately blurred in its half-size render targets; MSAA applies to middle/near meshes on the default framebuffer. The browser may decline MSAA; the measured test context returned antialias=true, SAMPLES=4 and NO_ERROR. Narrow specular highlights use a derivative-aware width where available. A smooth shoulder compresses reflected radiance before the existing text cap, preserving highlight gradation without repeatedly tone-mapping the transmitted scene. This is not a bloom pass or temporal antialiasing.
Three shared quartz meshes provide a classic prism, a slender long prism and a short broader cut, with different shoulder heights and bevel radii. Near-identical corner normals are deduplicated numerically to avoid tiny degenerate corner fans. Low-discrepancy initial placement and coherent drift per layer preserve spacing; rotation and reduced bobbing remain individual. Counts and camera/parallax remain unchanged. This adds two small shared vertex buffers, not per-crystal geometry.
The same serial SwiftShader benchmark as above, 1600x900 viewport and drawing buffer, 33 samples after warmup, measured median 74.3 ms and p95 77.4 ms for the full field including synchronous one-pixel readback. The previous 1280x720 pass measured 59.4 / 71.5 ms. This is software evidence only; it does not establish 30 fps or production GPU cost. Source: WebGL context attributes.
Validation of this refinement: 1,237 Node tests passed in the complete rerun
(the first combined command was terminated by a signal before completion).
Syntax, ESLint, build consistency, formatting and the wallpaper browser suite
passed. Nested run e8de5460 showed the new field and the composer and was
stopped. Local evidence: art-aa.png, art-chat.png, art-timings.json.
No activation in the live desktop was performed.
Matrix and mouse-reactive black hole (2026-11-04)
The protected wallpaper selector also offers matrix (Matrix) and black-hole
(Buraco negro). Both use the existing React wallpaper root, authenticated
setting, launch-cookie event stream, PNG precedence, reduced-motion behavior,
hidden-page suspension and WebGL failure recovery. They draw one full-screen
pass at up to 1280x720, with the existing legibility mask and 10 fps idle / 30 fps
busy policy (the black hole later moved to two passes at a fixed 30 fps; see Cost of the black hole). No new dependency, renderer permission or compositor command.
host/wallpaper-digital.js draws Matrix as two depths of procedural green
3x5 character rain, with independent column speeds, bright heads and fading
tails. Its green is intentional, independent of the profile accent. The black
hole has a dark shadow, a bright photon ring, a rotating accretion disk, an
upper lensed arc and a bent procedural star field. Its warm light mixes with
the profile accent. The lens is an artistic approximation, not relativistic
ray tracing. Neither samples application pixels.
The core projects the pointer already present in the compositor state into
an exact pointer event: {active: true, x, y} with fractions from 0 to 1,
rounded to 0.001, or {active: false}. It normalizes within the output under
the pointer; the single wallpaper is mirrored on all outputs, as before.
Only black-hole sends active positions, only while connected and explicitly
unlocked, outside the overview, with a valid containing output. The existing
100 ms state poll bounds delivery; unchanged rounded positions send nothing.
No buttons, window identities, raw state or coordinates while locked go to
the wallpaper. The event is read-only and has no agent tool or plugin API.
A stream backed up over 16 KB closes and reconnects rather than replaying old
pointer input. The renderer checks exact keys and bounds, retains the latest
point through scene initialization, and eases the center and disk inclination
with a 180 ms time constant. An inactive event or stream error returns the
center gently to rest. Pointer changes request the existing 1 s busy period;
hidden pages and reduced motion do not start drawing.
Tests cover effect selection over authenticated HTTP, normalized pointer data,
lock/overview/disconnect suppression, deduplication, backpressure, lifecycle,
PNG precedence and reduced motion for both effects. The isolated wallpaper
browser harness compiles both shaders under the actual CSP, checks animation,
and proves pointer response with a frozen animation clock and the luminance
cap with unknown text regions. ANOS_WALLPAPER_ARTIFACTS optionally saves
synthetic screenshots locally; it never uploads them.
Activation requires the rebuilt host and core at the next login, or documented host/core maintenance. The existing compositor already reports the pointer. Rollback is a git revert; an unknown saved effect resolves to crystals.
Validation: 1,289 Node tests passed, plus syntax, ESLint, build consistency,
Prettier and the wallpaper browser suite. Nested run a490f84a selected both
new effects through Appearance, retained the black-hole selection after a
host reload, and showed the center and disk tilt following pointer motion
from (200, 200) to (1650, 750). The wallpaper kept window id 3. The run was
stopped afterward. This proves the nested Electron/Smithay path, not sustained
performance on the physical GPU. Local synthetic evidence includes
matrix.png, black-hole.png, nested-selected.png, nested-mouse-left.png
and nested-mouse-right.png; no upload or live-session restart.
Closing into the black hole (2026-11-04)
The wallpaper reports its drawn center for a compositor-owned, 400 ms closing
animation of application windows. The events stream remains read-only; the
new exact /desktop-wallpaper/sink report is the only added wallpaper request.
See Black-hole window closing for lifetime, limits,
reduced motion, trust boundaries and activation.
Moving stars in the black-hole scene
The owner noticed that the black-hole stars only twinkled. The scene now shares
STAR_LAYER_SHADER from host/wallpaper-stars.js with the nebula (its original
star material, extracted unchanged). It uses three moving depths: the far layer
at 0.35/0.1 px/s, middle at 1.2/0.3 px/s and near at 3/0.8 px/s. Speeds use drawing
buffer pixels; the existing resolution cap still applies. Warm/cool tint,
individual twinkle and the brightest stars' cross glints come from the nebula.
The black-hole lens samples the moving field, so its distortion is preserved.
The nebula keeps its own previous drift and camera parallax unchanged.
Gentle framing and visible accretion (2026-11-04)
The owner reported dizziness from the mouse moving the entire scene, then clarified that the motion should remain with less amplitude. The center and tilt now use 10% of their original excursion: at most 0.9% of viewport width, 0.7% of height and 0.014 radians of tilt from rest. The suction destination continues to follow the rendered center. Broad gas streams rotate continuously with differential angular speed, making the disk's own movement visible. The stars keep their independent slow drift.
Matrix glyphs and complete stream lifetimes (2026-11-04)
The owner clarified that the background must be black, the glyphs should evoke Japanese lettering, and streams must visibly die. The shader now starts at exact RGB zero, uses hand-drawn 5x7 katakana (12 glyphs) and four digits, and runs each column through a complete fall, tail clearance and dark pause. The traversal length follows viewport height; tails no longer wrap modulo a fixed 42-row cycle. Each generation varies its length (6 to 24 cells), with independent column speeds and delays. No font, download or dependency is added.
Cinematic black hole (2026-11-04)
The owner supplied three visual references, requested a substantially more realistic aesthetic and explicitly prioritized GPU quality ("pode torar na gpu, eu quero um efeito AAA"). This supersedes the single-pass ellipse treatment and the low-power/10 fps policy for this effect only.
The black-hole shader integrates two subpixel bent rays, up to 192 adaptive steps each, through a 3D equatorial disk. Crossing the disk evaluates advected five-octave turbulence, fine radial filaments, a warm temperature gradient and view-dependent brightness. Secondary crossings produce the lensed upper/lower images. Captured and unresolved rays do not receive background stars. This is a cinematic Schwarzschild-inspired approximation, not a validated scientific geodesic solver or a claim of physically accurate radiative transfer.
A dedicated RGBA8 render target stores reversible compressed linear radiance; a second pass reconstructs it, adds multi-radius optical bloom and applies the existing text-legibility mask last. Maximum target size is 2560x1440 (14.1 MiB for the radiance texture); smaller viewports keep their native CSS resolution. Two subpixel samples soften the fine ring and gas edges. No external texture, font, library, network route or permission is added. Resize reallocates the single target, disposal releases its texture/framebuffer, and context failure retains the existing fallback behavior.
Black hole requests high-performance and targets 60 fps; other effects retain
their prior power/rate/resolution policies. This is a scheduling target, not a
measured physical-GPU frame rate. Hidden/reduced-motion behavior and suspension
are unchanged. Pointer excursion remains 10% of the original, and the exact
same center is reported for window suction. Matrix remains unchanged.
Validation: the real-browser suite covers shader compilation, two draw passes, star displacement, bounded pointer response, final luminance cap and CSP. Unit coverage includes 4K viewport capping to 1440p, target separation (no texture feedback), lifecycle disposal and the 60 fps schedule. Local render evidence uses an isolated Chromium/SwiftShader fixture, not a hardware performance claim.
Cost of the black hole (2026-11-04)
The owner reported the desktop slowing down with the wallpaper ("parece problema de performance, depois de um tempo o wallpaper fica lento e depois para de exibir") and stars that barely move ("as estrelas não se mexem o suficiente"). This corrects the 60 fps and the 2560x1440 cap of Cinematic black hole, which stayed a target with no hardware measure.
The measure, on the real Radeon RX 550 with a private nested run, read from drm-engine-gfx of the GPU process over 12 frames, so the time of other processes does not count:
| Target | Passes | GPU per frame | Share of the GPU at 60 fps | At 30 fps |
|---|---|---|---|---|
| 1920x1080, steps up to 0.6 (before) | 2 rays | 37.4 ms | 224% | 112% |
| 1600x900 | 2 rays | 26.5 ms | 159% | 79% |
| 1280x720 | 2 rays | 17.2 ms | 103% | 52% |
| 1280x720, steps up to 1.5 (now) | 2 rays | 12.4 ms | 74% | 37% |
| 1280x720 | 1 ray | 9.2 ms | 55% | 28% |
| 960x540, steps up to 1.5 | 2 rays | 7.3 ms | 44% | 22% |
The live session read gpu_busy_percent at 97 to 100 at the highest clock, 90% of the graphics engine in the GPU process of the shell and 2.6% in the compositor. So the frame could never reach 60 fps, about 26 fps with the whole GPU, and every other window waited behind it.
The black hole now uses the same 1280x720 cap as the aurora, the nebula and Matrix, at a fixed 30 fps, with steps of up to 1.5 far from the hole; 2 rays stay, because 1 ray shows steps in the ring. The ring also looks less jagged than at 1920x1080. The stars of this effect drift about 3.4 times faster in shader units, and about 5 times on a 1920x1080 output, because a shader unit is one pixel of the smaller target. A pixel of the target is larger on the screen, so the stars look larger too.
A lost WebGL context used to end the wallpaper until the next login: the page kept the CSS fallback for good. The page now starts the scene again at webglcontextrestored. This is a separate protection; no context loss was observed in the live session.
The leak that stopped the wallpaper (2026-11-04)
The page posted /desktop-wallpaper/sink about 7 times per second (the limit is 10) and never read the reply, so Chromium kept each request open. A nested run counted 181 requests in 25 s with status 200, and none finished. A comparison of two memory dumps of that renderer shows the growth in blink::RawResource, ThreadableLoader, ResourceLoader, FetchRequestData and BodyStreamBuffer, while the JavaScript heap stays flat at about 3 MB.
| Session | Renderer of the wallpaper |
|---|---|
| Live, before the fix | RSS from 194 MB to 575 MB in 34 minutes, about 12 MB per minute; 16,298 file descriptors; the process was gone at most 10 s after that reading, and the host stayed alive |
| Nested, before the fix | The same 12 MB per minute, 5,960 file descriptors after about 13 minutes, against 54 in the renderer of the chat |
The page now reads each reply with arrayBuffer(). The nested run after the fix counted 218 requests in 25 s, all finished. The soak numbers of that run are in docs/work-log-2026-11.md. body.cancel() was tried first and rejected, because it reports each request as cancelled instead of finishing it.
The cause of the death is not proven: no log or core dump exists. What the live session shows is the order of events: the leak reached 16,298 descriptors, close to 16,384, and the renderer ended. The reported symptom, slow and then gone, matches that order. The process limit of 524,288 descriptors was far away, so a limit inside Chromium is the likely one.
Nothing brought the page back, so the wallpaper stayed empty until the next login. The host now reloads the page after render-process-gone, at most once every 10 s (reloadWallpaperAfterRendererLoss). Only the wallpaper does this: it holds no state. The other protected surfaces still have no reload.
Inward accretion flow (2026-11-04)
The owner requested visible suction rather than rotation alone. All disk gas
textures now use shared material coordinates r^1.5 + 1.2*t and
angle + 2.4*log(r). A material feature moves inward at dr/dt = -0.8/sqrt(r)
and rotates at d(angle)/dt = 1.92/r^1.5, accelerating as it falls. Features stretch radially while their angular
width contracts toward the center. Circular angular coordinates keep the atan seam closed.
The emitting disk extends into a plunging region that fades from radius 2.8
to 1.12 before the horizon; bounded heat prevents a bright central pileup.
The existing bent-ray lens and bloom retain the luminous ring around the void.
This is artistic advection, not a physical accretion simulation.
No passes, turbulence octaves, ray steps, textures or permissions are added. The 1280x720 cap, 30 fps policy, gentle pointer response, reduced motion and legibility mask remain unchanged. The stars keep their independent drift.
Validation: syntax, ESLint, rebuilt bundle consistency, focused Prettier and
100 wallpaper lifecycle/pointer/sink tests passed. The rebuilt page was checked
in the isolated Chromium/SwiftShader wallpaper harness, with synthetic events
and no provider. Local evidence: black-hole.png in the
2026-11-04-black-hole-infall QA artifact directory, outside Git. No video,
upload, live-session restart or physical-GPU performance measurement.
Star and edge refinement (2026-11-04)
The owner reported streak-like stars and jagged disk/ring details. Black-hole stars now draw once in the composite pass with a bounded screen-space lens, instead of twice through the ray integrator's highly stretched sky mapping. The radiance texture's existing alpha stores escape/transmission coverage, keeping stars occluded by captured rays and the disk. The independent three star drifts and warm/cool material remain; nebula is unchanged. This deliberately trades relativistic-looking star arcs for readable, compact stars.
Gas filament frequencies are lower to reduce detail smaller than a pixel. The composite smooths high-contrast radiance with a five-tap cross filter in compressed light before adding stars. Bloom and the final legibility cap still apply. This is local edge smoothing, not temporal AA or extra ray samples. No target, pass or ray count is added; five nearby texture reads replace the single center read, and sky material runs once per output pixel. The 720p cap and 30 fps schedule stay. Hardware cost has not been remeasured.
Validation of the star/edge refinement: the rebuilt-browser suite, 100 focused wallpaper tests, syntax, ESLint, build consistency and focused Prettier passed. The final 1280x720 synthetic image was inspected. Native QA and the authorized video were interrupted by cross-task control of the private nested run; see QA report. No live activation.
The owner then requested a slightly smaller black hole. The ray camera uses 1.15 times the screen-plane coordinates (about 13% smaller apparent size). The center, pointer excursion, sink destination, star field, target resolution and 30 fps schedule remain unchanged.
Resumed QA selected the final smaller effect through the nested UI and produced a verified 36.4 s local WebM at 1848x984. Build, lint, syntax, 100 focused tests and the wallpaper browser suite passed on this final code. Nested runs were stopped. A text-contrast finding on glass over the bright ring is documented in the QA report; readability is not approved. No live activation.
Readable lensed flow and diagonal edges (2026-11-04)
The owner still saw jagged edges and apparently motionless upper/lower arcs. The disk now has broad advected emissivity knots sharing its material coordinates, so every disk crossing, including the lensed secondary images, samples the same moving light distribution. Lower emission and a rational display shoulder keep hot gas from washing out its variation. The horizon silhouette remains fixed.
Near-horizon integration uses a smaller step coefficient (0.06 to 0.10 blended from radius 2 to 5), retaining the 192-step ceiling and long far-field steps. The composite replaces the cross filter with a symmetric nine-tap tent to include diagonal edges. Two rays, 720p target and 30 fps schedule remain. This is spatial refinement, not temporal AA or native-resolution reconstruction. It adds one five-octave noise evaluation per emitting crossing and four texture reads per composite pixel; GPU cost must be remeasured before a performance claim.
Physical model and visual regression correction (2026-11-05)
Withdrawn the same day; see Reference look below. This section is history.
The shared shader uses escaped-ray sky lensing, a stationary distant sky, a disk outside the Schwarzschild ISCO, slow inward advection and radius-dependent Doppler/gravitational shifts. The first revision looked pale and nearly static; a temporary rollback was followed by a correction preserving those physical changes. The display palette is separated from the heat calculation, the illustrative time scale makes orbital motion readable, and angular material coordinates move the gas knots instead of emphasizing fixed bands. See Black-hole physical model for approximations, regression evidence and validation limits. No live desktop was restarted.
Orbiting observer (2026-11-05)
Withdrawn the same day; see Reference look below. This section is history.
The owner asked for stars that move more. The physical model keeps its lensed sky, and the observer now orbits the hole, one turn in 600 s. This replaces the stationary sky of the section above. See Orbiting observer in Black-hole physical model. No live desktop was restarted.
Reference look (2026-11-05)
The first login with the physical revision showed stars as gray marks of 12 to 13 pixels on a 1080p output, with little color and with long streaks around the hole, and the owner also rejected the banded disk. The owner then gave a visual reference: a disk that burns white in the middle and orange at its edges, a thin golden lower ring, a black shadow, fine stars on a nearly black sky with a faint red haze. This replaces the Physical model and Orbiting observer sections above, and the sky cube map is gone.
The shader starts again from d0be793 (compact stars through the bounded lens, two passes at 1280x720 and 30 fps) and changes only the look:
- The gain of the gas goes from 1.65 to about 13, with one orange hue that the display mapping pushes to yellow and white. The color follows the emitted light, so a fade stays warm instead of turning a pale color gray.
- The bands are gone. The gas is smooth, with soft filaments and broad advected knots, so its travel still shows. One noise evaluation per disk crossing is gone.
- Crossings after the first one, which are the lensed images, are lit only from radius 3.3 inward and at 42% of the light, which draws the lower arc as a thin golden ring.
- The bloom reads radiance only up to 5 and is tinted warm, because the bloom of a white source laid a gray veil on the shadow. The sky adds a faint painted red scatter around the disk. It is not computed from the gas and only shows on escaped rays, so the shadow stays black.
- The framing is closer to the reference: the camera sits lower (2.1 instead of 2.8), the roll is -0.17 instead of -0.10 radians and the hole is 15% larger than on 2026-11-04, which undoes that smaller framing. The hole stays centered, so the window suction and the bars keep their place; the reference has it right of center.
The star drifts run at three times their earlier speed: 3.6/1.05, 12/3 and 30/8.4 pixels per second of the target, so about 5.6, 19 and 47 pixels per second on a 1080p output. The stars are also a little dimmer, 0.26 instead of 0.32, as in the reference. The site shares this shader and is rebuilt with it.
Measure on the real Radeon RX 550, private nested run, graphics engine of the GPU process over three periods of 10 s: 43.2% to 43.7%, 14.4 to 14.6 ms per frame at 30 fps. The same reading for d0be793 with the faster stars was 14.7 ms, and for the physical revision 12.9 ms. So this look costs what the earlier one did: the reference asks for exposure and scattering, not for more rays. This is one reading with the live session sharing the card. No live desktop was restarted.
Binding contract (from AGENTS.md)
This section holds, word for word, the rule that AGENTS.md kept for this feature until 2026-11-10,
when AGENTS.md was reduced to the short invariants (openspec/changes/audit-2026-11-10/design.md, F10). It binds
exactly as AGENTS.md does; AGENTS.md keeps the short invariant and points here. Change both in
the same commit.
-
Wallpaper effect (openspec/specs/hex-crystals-wallpaper/spec.md, phase 1): only the protected settings choose the protected setting
wallpaperEffect(crystals,aurora,nebula,matrix,black-holeorskyline) through/api/wallpaper-effect. Since 2026-11-13 (openspec/changes/theme-packs/design.md, phase 4) the choice is the entry of the active window theme inwallpaperByTheme(theme and effect ids checked against closed lists with own-property checks), the default is thewallpaperof the theme entry, and a change of theme sets the wallpaper last, through the same function as the route (sink released, camera notified, event sent); a savedwallpaperEffectmigrates once into the entry of the current theme. The wallpaper page gets the effect and the palette revision only through the read-only streamGET /desktop-wallpaper/events, which takes the launch cookie and nox-shell-token; its CSPconnect-srcnames that exact URL, and its window has its own partitionagent-native-wallpaperwith an exact request allowlist./desktop-wallpaperand/desktop-wallpaper.pngalso need the cookie. No agent tool, MCP entry, scheduled turn, generated HTML or plugin panel reaches the setting, the route or the stream. Phase 1.5: only the protected chat host (and the recovery page, which sends an empty list) reports the text that it draws on the wallpaper throughPOST /api/wallpaper-text-regions, with the shell token, at most 4096 bytes, exact keys, at most six rectangles of safe integers and anoutputthat must exist. The core keeps one report for each output in memory, maps it with its own window and output state, and sends only roundedlegibilityregions on the wallpaper stream; nothing goes to the compositor or to disk. No agent tool, MCP entry, scheduled turn, generated HTML or plugin panel reaches the route. Phase 2: the stream also carries thecameraevent, built by the core from its own state poll: exactlyactive,workspace,x,yandzoomof the Canvas workspace of the primary output, active only outside the overview, unlocked and with the crystals, the nebula or the skyline, and dropped above 16 KB not yet sent. The page only reads it for the parallax of the crystals, the nebula and the skyline; no agent tool, MCP entry, scheduled turn, generated HTML or plugin panel reaches it. -
Black-hole wallpaper: the core projects the existing compositor pointer into the read-only wallpaper stream as normalized fractions, only while unlocked, connected and outside overview. No buttons, window identities or raw state go out. The effect eases its center and disk tilt with a small excursion (10% of the original amplitude). Matrix has no pointer input. See openspec/specs/hex-crystals-wallpaper/spec.md, Matrix and mouse-reactive black hole. Closing ordinary application windows also uses a bounded GPU snapshot and a 400 ms suction effect while the renderer reports its actual center through the launch-cookie-only
/desktop-wallpaper/sinkendpoint. The core forwards only a typed expiringwallpaper_sinkcommand; no agent tool or generated HTML reaches it. Reduced motion disables it. See openspec/specs/black-hole-close/spec.md.
The neoedo effect (2026-11-13)
The effect neoedo (host/wallpaper-neoedo.js, theme-packs step 5a; it is the default of the
experimental Ninja) draws the photograph of the active ambiance of Ninja (--ui-theme-ambiance of
the theme sheet; urbana in the other themes) in two layers:
- A still base: the photograph (
vendor/interface/host/wallpapers/ninja/<ambiance>.webp, 3840x2160, metadata stripped, credited inATTRIBUTION.mdthere), cropped to cover the output and a little larger than it so the parallax never shows an edge. The core serves the four files and their previews next to the wallpaper page (img-src 'self'). Until the photograph loads, and if it fails, a scene painted from the theme accents stands in for it. - A light animated layer drawn by the fragment shader: rain (Noturna), petals in the coral of the theme (Hirosaki), none for Urbana and Natureza.
- The legibility mask caps the picture at
regionCapbehind the text of the chat, everywhere while the regions are unknown, as the skyline does. Under reduced motion it draws one still frame with no animated layer, and again only when the ambiance, the regions or the size change. - It follows the camera parallax like the skyline. The four photographs together stay within 5 MB and each within 2 MB.