Skip to content

Free open-source image editor for the browser

Simplify the docs around an architecture map and scoped reviews (#48)

Rodrigo Belfiored2ea954ecbb1
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
index 6da49a2..6000e3a 100644
--- a/.github/pull_request_template.md
+++ b/.github/pull_request_template.md
@@ -1,32 +1,7 @@
-<!-- Include evidence when opening the PR. Keep the description brief and direct;
-use PR/CI attachments for generated evidence instead of committing it. Omit work logs. -->
-
## Change
-<!-- Describe the problem and resulting behavior in one or two sentences.
-Add only the implementation details or tradeoffs needed to review the change. -->
-
-## Validation
-
-<!-- Report the required checks from AGENTS.md and any verification gaps. -->
-
-## Visual evidence
-
-<!-- UI additions or changes: embed actual screenshots with the affected controls
-visible in context for visual approval. Show before/after for existing UI changes
-and representative states for new UI. Rendered output alone is insufficient.
-Rendering changes: also show before/after output side by side, using the same
-fixture and matching conditions; name the settings and state what varies.
-Include quality metrics for a concrete quality claim or regression;
-state units and limits. Keep image-quality results separate from timings.
-Nonvisual code changes: show the exercised workflow. Verify that image links
-are accessible from this description. Documentation-only changes may mark
-this section not applicable. -->
+<!-- The problem and the resulting behavior, in a sentence or two. -->
-## Rendering performance
+## Verification
-<!-- Use a compact results table following PERFORMANCE.md: reproducible base/head
-comparison, workload and environment, timing scope, sample counts, median/p95,
-and a short interpretation. Include the reproduction command; link extra samples when useful.
-Separate neutral/bypass overhead from the cost of new active behavior.
-If rendering work is unaffected, explain why. Report missing evidence explicitly. -->
+<!-- What was checked (see REVIEW.md) and any gaps. Screenshots for UI changes; before/after measurements for GPU work (see PERFORMANCE.md). Omit what does not apply. -->
diff --git a/AGENTS.md b/AGENTS.md
index c70469c..743fffb 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -1,78 +1,51 @@
# OpenLight
-Build a professional photo editor with little, readable code. Vite, React, vgpu, Bun, and Biome.
+A professional photo editor with little, readable code: Vite, React, [vgpu](https://vgpu.sh) on WebGPU, Bun, and Biome.
-Write committed code, comments, documentation, and UI text in English. Use [CONTEXT.md](CONTEXT.md) for domain terms. [CONTRIBUTING.md](CONTRIBUTING.md#development) covers setup; [API.md](API.md) documents browser commands; [REVIEW.md](REVIEW.md) guides reviews.
+[ARCHITECTURE.md](ARCHITECTURE.md) maps the code and its layer rules; start there to find what a request touches. [CONTEXT.md](CONTEXT.md) names domain terms, [DESIGN.md](DESIGN.md) covers UI patterns, [REVIEW.md](REVIEW.md) covers reviewing and verifying a change, and [API.md](API.md) documents `window.openlight`.
-## Simplicity
+## Setup
-- Give each module, function, and component one coherent responsibility. Entry points compose; resource owners manage their own lifecycles.
-- Judge simplicity across the whole change, including callers, cleanup, tests, helpers, scripts, and documentation. Remove unnecessary work rather than compressing syntax or adding forwarding helpers. Keep cohesive work together; use no arbitrary line-count limits.
-- Start with direct functions and library calls. Add abstractions, dependencies, validation, scheduling, or caching for a current requirement. Prefer a few repeated lines over coupling unrelated behavior.
-- Extract a component when a region owns distinct state, refs, or behavior. Keep helpers local unless they have a separate responsibility or a real shared use. Define functions above their consumers.
-- Keep control flow linear: guard clauses, braces, and `const` by default. Avoid nested ternaries and dense logic in JSX; use early returns or components for meaningful branches.
-- Model actual states with precise types and explicit dependencies. Keep one source of truth; avoid casts and permissive types that conceal mismatches. Validate external input at its boundary and preserve useful errors.
-- Prefer named exports and imports. Use a default export when an integration requires or clearly benefits from it.
+```sh
+bun install
+bun dev
+bunx --no-install playwright install chromium
+```
-## Layers and ownership
+The last command installs the Chromium build that the project's Playwright version expects; it is needed once per Playwright version for browser tests and scripted screenshots. `bun run test:browser` starts Vite itself and runs WebGPU on SwiftShader; reuse the launch flags in [playwright.config.ts](playwright.config.ts) for any other scripted browser.
-| Layer | Owns |
+| Command | Checks |
| --- | --- |
-| 0 — `lib/` | Low-level code independent of OpenLight: math and utilities that could be standalone libraries. Keep it here when maintaining the small implementation is cheaper than a dependency, or when it is a candidate for extraction. |
-| 1 — shared primitives | `core/` owns document, image, and renderer infrastructure without React. Reusable `components/` and `hooks/` provide UI primitives and React bindings above it. |
-| 2 — `features/` | Removable product capabilities. A feature owns its processing, shaders, parameters, commands, components, and hooks as needed. Most product behavior belongs here. |
-| 3 — `app/` | Application shell, user entry points, and explicit composition of features and shared primitives. |
+| `bun run check` | Format and lint; writes fixes. |
+| `bun run build` | Types and production build. |
+| `bun run test` | Bun tests with `vgpu/mock`; seconds. |
+| `bun run test:browser [file]` | Chromium tests with real pixels; minutes for the whole suite. |
-Dependencies between layers point downward. Features do not import each other; `app/` connects them. Shared primitives must not import concrete features. Being reusable within OpenLight or independent of React does not qualify code for `lib/`.
+Run the first three on code changes; CI runs them too. Run browser tests for what a change can affect, as [REVIEW.md](REVIEW.md#verify) describes.
-`core/document` owns the serializable scene contract, history, and document resources; features own their defaults, validation, edits, and processing. `core/image` owns image sources, decoding, geometry, and the working color space. `core/renderer` exposes node composition, execution, transforms, and display through its module entry point. Keep module internals private unless a caller needs them; do not add an application-wide barrel.
+## Conventions
-Keep ordinary feature changes in the feature, its tests, and explicit app composition. Change shared primitives when a concrete requirement needs a new capability. Features need neither identical file layouts nor a universal plugin interface. Keep the histogram in its feature.
+- Everything committed is in English: code, comments, docs, UI text, commit messages, and PRs, even when the conversation is in another language.
+- File names use kebab-case. Prefer named exports; use `@/` across folders and relative imports within one.
+- Files read from small to large: define a function above the functions that use it.
+- Comment only what the code cannot say.
+- Keep Tailwind classes inline and use `cva` for variants. Text has one size; express hierarchy with color and weight.
-`src/` holds entrypoints, ambient types, and global styles. Use `@/` across folders and relative imports within a folder. `src/main.tsx` mounts the runtime and providers. `app/editor/tools.tsx` composes the rail: a tool brings a `Canvas` overlay and optional `Options` for the bar over the image while the sidebar always shows the selected layer's controls; a `View` supplies its own viewport. The mask overlay has one writer, `app/editor/mask-overlay.tsx`, which derives it from the selection.
+## Quality
-## Engine and React
+- Code quality comes first and technical debt is not accepted: no workarounds, dead code, or TODOs in place of a fix. When the right fix is larger than the request, say so instead of patching around it.
+- Find where the behavior lives and change it there, with the fewest lines that solve it well. Add no tests, helpers, abstractions, or docs the request does not need.
+- Give each module, component, and function one responsibility. Start with direct functions and library calls; prefer a few repeated lines over coupling unrelated behavior.
+- Drive behavior from the state that causes it, such as props or document state, never from incidental DOM structure, selectors, or timing.
+- Keep control flow linear with guard clauses and `const`. Avoid nested ternaries and dense logic in JSX.
+- Use precise types and one source of truth; avoid casts. Validate external input at its boundary and keep useful errors.
-Keep document edits and rendering callable without React, a mounted UI, or an implicit active document. Pass workspace, document, and GPU dependencies explicitly. Feature processing must be importable without its React panel; keep browser input and display adapters outside processing.
+## Tests
-Each document owns a vanilla Zustand scene store, history, and image resources. Scenes contain immutable, serializable content and image-source IDs; files and GPU resources stay outside history. The workspace owns document replacement and loading state.
+Tests follow what a person would verify: open an image, use a tool, undo, export, and check the output. Add or extend one when a change adds or alters such a workflow or its processing, or fixes a regression. Core algorithms such as render order and resource reuse may have focused unit tests. Layout, styling, and copy changes are checked by looking at the app, not by tests. Tests run offline: the browser fixture fails any request beyond the dev server.
-UI controls and browser commands call the same imperative edits. History groups changes without knowing loaders or tools: a slider or curve gesture is one edit; cancellation restores the previous scene. Preview settings and navigation stay outside content history.
+## Finishing
-React composes controls and mounts engine outputs. The engine owns GPU resources, rendering, and derived data such as histogram bins; frame data stays outside React state and props. Hooks and providers connect stable instances to mounting and cleanup. Every resource owner disposes what it creates.
-
-## Styling
-
-Follow [DESIGN.md](DESIGN.md) for shared interaction and surface patterns. Keep Tailwind classes inline. Reuse presentation through components or repeat classes, whichever is simpler; do not share class-string constants across files. Use `cva` for variants and `src/index.css` for app-global tokens such as shadows and typography. Text has one size, set on `body` in `src/index.css`; express hierarchy with color and weight, not size.
-
-## GPU invariants
-
-- Use `vgpu-react` for React bindings and `vgpu` for GPU operations. Create pipelines once per engine instance and reuse them.
-- Processing uses the [render node contract](PERFORMANCE.md#instrumentation). Features declare passes and inputs; the graph owns intermediate textures and timing. Connect nodes in app composition, keeping the engine independent of concrete features.
-- Keep `.wgsl` beside its owner. The Vite loader and ambient types are configured.
-- The working space is linear Rec.2020 in `rgba16float`. Decoders convert into it; display converts out. Processing outputs preserve the input format and primaries unless the operation explicitly converts them.
-- The adjustment shader's parameters use UI units. Its fitted constants are calibration data; preserve them when reorganizing code.
-- Layers process the source in stack order; the image layer's adjustments and tone curve run last, on the composite, so a local exposure sees the light a global exposure would compress.
-- Strokes are scene content; the renderer owns their rasterized coverage as a cache and stamps only appended dabs. Open history groups render a reduced proxy; every render image carries `scale`, its source pixels per texel, and shaders that take document coordinates or radii must apply it.
-- Preserve HDR headroom through exposure, curves, and vibrance. Exposure clips negatives and applies one luminance gain to all channels. `display()` in `core/image/color.wgsl` maps out-of-gamut colors toward their luminance.
-- TIFF and camera RAW use `raw-webgpu`. OpenLight adapts package resources to document ownership; codec implementation and coverage belong to the package.
-
-## Tests and completion
-
-For routine feature changes, prefer one short integration scenario that follows how a user would verify the change. For editing changes, load a suitable fixture, apply the operation, check the result, change a parameter, and undo. Reuse existing fixtures, helpers, and editing steps. Add cases for distinct failure modes or regressions; avoid repeating coverage of shared controls and history for each feature.
-
-Check meaningful output using a few representative samples, expected relationships, and tolerances. Assert rendered results when processing changes; state changes alone do not prove the effect works. Detailed numerical references and exhaustive parameter matrices need a concrete accuracy requirement or regression.
-
-Core algorithms also merit focused unit tests, especially rendering order, branch/merge connections, and resource reuse. Use Bun and real application modules with `vgpu/mock` for engine orchestration; the mock does not execute shaders. Use Playwright for rendered pixels, DOM interaction, and real format fixtures. Maintain the semantic [control API](API.md) for local, CI, and remote use. Wait for observable results; avoid production completion tracking added only for tests.
-
-For code changes, run `bun run check`, `bun run build`, `bun run test`, and `bun run test:browser` before a commit. Browser setup and focused commands are in [CONTRIBUTING.md](CONTRIBUTING.md#validation). For documentation-only changes, check the diff and affected references.
-
-Prepare evidence during implementation and include it in the initial PR description, using the [PR template](.github/pull_request_template.md). Lead with the problem and resulting behavior. Keep prose short and use compact comparison tables. Generated screenshots, logs, reports, and benchmark samples belong in ignored output directories and PR/CI attachments, not in Git. Commit test fixtures when maintained tests need them. Omit work logs and repeated explanations.
-
-Every code PR includes actual application screenshots or rendered output demonstrating the result. UI additions or changes require screenshots of the affected interface in context, with the new or changed controls visible for visual approval; rendered output alone is insufficient. Show before/after for changes to existing UI or image output, representative states for new UI, and the affected workflow for nonvisual code changes. Compare the same fixture under matching conditions and state what varies. Embed accessible images in the description, name the fixture and settings, and verify the published links. Documentation-only changes may mark visual evidence not applicable.
-
-Use image-quality metrics for a concrete quality claim or regression; ordinary correctness can use representative output checks. State metric units and limits, and do not generalize from synthetic fixtures to real photos. Keep quality results separate from rendering timings.
-
-Assess performance on every code change; changes affecting GPU work require reproducible before/after evidence under [PERFORMANCE.md](PERFORMANCE.md). Report unavailable checks and measurements as verification gaps.
-
-Update existing documentation for changed contracts or shared workflows; a feature does not need a separate guide. Link rules instead of duplicating them. Keep setup instructions portable; host-specific paths and workarounds stay outside the repository. Describe existing APIs accurately and label unimplemented designs explicitly.
+- When a change alters the structure [ARCHITECTURE.md](ARCHITECTURE.md) describes, confirm it with the user and update that file in the same change.
+- Before a substantial change's PR is ready, review it as [REVIEW.md](REVIEW.md) describes; after a small one, offer a review instead.
+- Keep PR descriptions short with the [template](.github/pull_request_template.md). Include [screenshots](REVIEW.md#screenshots) for new features and substantial UI changes. Generated output goes to the PR, never into the repository.
diff --git a/API.md b/API.md
index c7c1571..bd3e67a 100644
--- a/API.md
+++ b/API.md
@@ -92,8 +92,6 @@ A linear gradient has full coverage at `start`, zero at `end`; its points must b
A brush mask is a list of strokes. Each stroke has `mode` (`"paint"` or `"erase"`), `size` (diameter in source pixels), `feather` and `flow` (0–1), and `points`, each `[x, y, pressure]` in source pixels with pressure 0–1. Dabs land every quarter diameter along the points; a paint stroke adds `flow × pressure` of the remaining coverage under each dab, and an erase stroke removes that share of the existing coverage. The renderer rasterizes strokes into a cached coverage texture at source resolution and only stamps new points, so appending to the last stroke is cheap and undo replays the rest. A brush inside another mask keeps its own coverage, paint and erase strokes alike, which the mask adds or subtracts scaled by the brush layer's opacity. A mask with no painted coverage and nothing added to it is bypassed.
-Editor behavior for the rail, canvas bar, overlays, and Healing is described in [DESIGN.md](DESIGN.md#editor-tools).
-
## History
Each content change creates an undo step unless a group is open. No-op edits add no history. Preview changes stay outside history. Groups do not nest. While a group is open, the preview renders a reduced proxy of the image at the display's scale; committing or cancelling renders the full image again.
diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md
new file mode 100644
index 0000000..fcda156
--- /dev/null
+++ b/ARCHITECTURE.md
@@ -0,0 +1,62 @@
+# Architecture
+
+Where the code lives and the rules that keep it in place. Keep this file true: when a change moves a responsibility, update it in the same change.
+
+## Map
+
+| Path | Owns |
+| --- | --- |
+| `src/main.tsx` | Mounts the GPU provider and the app. |
+| `app/index.tsx` | The app: workspace, file drop, draft notice. |
+| `app/workspace` | The open document, its replacement, and loading state. |
+| `app/loaders` | Image, scene file, and Camera Raw XMP loaders. |
+| `app/draft` | The draft autosaved in the browser. |
+| `app/controls.ts` | `window.openlight`, documented in [API.md](API.md). |
+| `app/editor/index.tsx` | The editor with a document: header, tool rail, viewport, sidebar. A tool's `View` replaces viewport and sidebar. |
+| `app/editor/empty.tsx` | The editor before a document opens: welcome or loading status, and the placeholder sidebar. |
+| `app/editor/sidebar.tsx` | Sidebar sections in order: `EditorSidebar` with a document, `PlaceholderSidebar` without one. |
+| `app/editor/tools.tsx`, `tool-rail.tsx` | The rail. A tool brings a `Canvas` overlay, `Options` for the bar over the image, or its own `View`. |
+| `app/editor/renderer.ts` | Composes feature passes into the preview and export pipelines. |
+| `app/editor/mask-overlay.tsx` | The only writer of the mask overlay, derived from the selection. |
+| `app/editor/layers.ts` | The effect kinds the app offers and their layer factories. |
+| `app/editor/export` | The export view. |
+| `components/editor` | Editor primitives: panel, viewport, document and renderer contexts, brush input. |
+| `components/ui` | What [`@roprgm/ui`](https://ui.roprgm.com) lacks; see [DESIGN.md](DESIGN.md). |
+| `core/document` | Scene contract, layer tree, history, resources. |
+| `core/image` | Image sources, decoding, geometry, color. |
+| `core/renderer` | Render nodes, graph execution, masks, proxy, transform, display. |
+| `features/<name>` | One capability: usually `model.ts` (parameters, defaults), `edits.ts`, `pass.ts` with its `.wgsl`, and `controls.tsx`. |
+| `lib` | Utilities independent of OpenLight. |
+| `tests` | `*.test.ts` run in Bun with `vgpu/mock`; `*.e2e.ts` run in Chromium; `fixtures/` holds test images. |
+
+Below the `md` breakpoint (768 px) the same components rearrange through `max-md:` classes: the rail runs along the top and the sidebar becomes a bottom sheet. The output histogram is mounted from the sidebar but floats above that sheet over the image; the placeholder sidebar hides it on mobile.
+
+## Layers
+
+| Layer | Owns |
+| --- | --- |
+| 0 — `lib/` | Code independent of OpenLight that could be a standalone library. Being shared or React-free does not qualify code for `lib/`. |
+| 1 — `core/`, `components/`, `hooks/` | Document, image, and renderer infrastructure without React; UI primitives and React bindings above it. |
+| 2 — `features/` | Removable product capabilities: processing, shaders, parameters, edits, and controls. Most product behavior belongs here. |
+| 3 — `app/` | The shell, entry points, and explicit composition of features. |
+
+Dependencies point downward. Features do not import each other; `app/` connects them. Shared primitives do not import features. Keep module internals private and add no application-wide barrel.
+
+## Engine and React
+
+- Document edits and rendering run without React, a mounted UI, or an implicit active document: pass workspace, document, and GPU explicitly. Feature processing imports without its panel.
+- Each document owns a vanilla Zustand scene store, history, and image resources. Scenes hold immutable, serializable content and image-source IDs; files and GPU resources stay outside history.
+- UI controls and `window.openlight` call the same edits. A slider or curve gesture is one edit; cancelling restores the previous scene. Preview settings and navigation stay outside history.
+- The engine owns GPU resources, rendering, and derived data such as histogram bins; frame data stays out of React state. Every resource owner disposes what it creates.
+
+## Rendering
+
+- `core/renderer` defines passes as nodes (`node`, `pipeline`, `split`, `merge`); the graph owns intermediate textures and timing. Features declare passes; `app/editor/renderer.ts` connects them.
+- Use `vgpu` for GPU work and `vgpu-react` for bindings. Create pipelines once per engine and reuse them. Keep `.wgsl` beside its owner.
+- The working space is linear Rec.2020 in `rgba16float`. Decoders convert into it and display converts out; passes preserve format and primaries unless they explicitly convert.
+- Layers process in stack order; the image layer's adjustments and tone curve run last, on the composite.
+- Preserve HDR headroom through exposure, curves, and vibrance. Exposure clips negatives and applies one luminance gain to all channels.
+- The adjustment shader's parameters use UI units; its fitted constants are calibration data.
+- Strokes are scene content; the renderer caches their rasterized coverage and stamps only appended dabs.
+- Open history groups render a reduced proxy. Every render image carries `scale`, its source pixels per texel; shaders that take document coordinates or radii apply it.
+- TIFF and camera RAW decode through `raw-webgpu`; OpenLight adapts its resources to document ownership.
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index da1981e..b9c1ad1 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,54 +1,3 @@
# Contributing
-OpenLight is built with TypeScript, React, [vgpu](https://vgpu.sh), Bun, and Biome. [AGENTS.md](AGENTS.md) describes the architecture, ownership rules, and completion requirements; [CONTEXT.md](CONTEXT.md) holds the domain vocabulary; [REVIEW.md](REVIEW.md) guides reviews; [PERFORMANCE.md](PERFORMANCE.md) covers render nodes and performance measurements.
-
-## Development
-
-```sh
-bun install
-bun dev
-```
-
-### Browser setup
-
-Install the Chromium version matching the project's Playwright dependency:
-
-```sh
-bunx --no-install playwright install --with-deps chromium
-```
-
-On Linux, installing system dependencies requires administrator access. If Chromium is already installed but libraries such as `libnspr4.so` are missing, run `bunx --no-install playwright install-deps chromium`. In environments without administrator access, use a browser environment with those dependencies supplied. See [Playwright's setup instructions](https://playwright.dev/docs/browsers#install-system-dependencies).
-
-[playwright.config.ts](playwright.config.ts) starts Vite automatically and selects Chromium's bundled SwiftShader on Linux and Windows. Linux uses SwiftShader's Vulkan backend for image transfers and ANGLE's SwiftShader backend for canvas presentation. These tests execute WebGPU on the CPU without a physical GPU or a separate SwiftShader installation. Use this configuration when testing; another browser session does not inherit its launch flags.
-
-If the environment blocks local ports or browser processes, use its permitted execution mechanism. A launch failure or missing system library is an environment problem, not a shader failure.
-
-## Validation
-
-| Command | Checks |
-| --- | --- |
-| `bun run check` | Format and lint; writes fixes. |
-| `bun run build` | Type-check and production build. |
-| `bun run test` | Browser-free integration and core unit tests using real modules and `vgpu/mock`. |
-| `bun run test:browser` | GPU pixels, UI, and codec integration in Chromium. |
-
-Run all four for code changes before committing. [CI](.github/workflows/ci.yml) checks formatting/lint, Bun tests, and the build; browser tests run locally.
-
-During development, select an existing test by path:
-
-```sh
-bun run test tests/renderer.test.ts
-bun run test:browser tests/rendering.e2e.ts --workers=1
-```
-
-One browser worker reduces CPU contention with SwiftShader. The mock does not execute shaders; use browser tests to check actual pixels. Reuse [browser fixtures](tests/fixtures.ts), [image readers](tests/images.ts), and existing [editing steps](tests/editing.e2e.ts). Follow the [testing guidance](AGENTS.md#tests-and-completion) to keep coverage proportional to the change.
-
-The HEIC browser test reports a skip when the browser has no WebCodecs HEVC decoder.
-
-## Scripting
-
-`window.openlight` exposes commands for loading, editing, undo/redo, and export. See the [API reference](API.md).
-
-## Pull requests
-
-Code PRs include visual evidence: UI additions or changes require screenshots of the actual interface for visual review. GPU changes also need a reproducible performance comparison; [PERFORMANCE.md](PERFORMANCE.md#running-the-benchmark) explains how to run the benchmark. Use the [PR template](.github/pull_request_template.md) and the evidence rules in [AGENTS.md](AGENTS.md#tests-and-completion).
+[AGENTS.md](AGENTS.md) covers setup, checks, and code conventions for people and agents alike. [ARCHITECTURE.md](ARCHITECTURE.md) maps the code, and [REVIEW.md](REVIEW.md) describes how a change is reviewed and verified. Open pull requests with the [template](.github/pull_request_template.md).
diff --git a/DESIGN.md b/DESIGN.md
index 96215d8..98ffd2c 100644
--- a/DESIGN.md
+++ b/DESIGN.md
@@ -47,13 +47,3 @@ OpenLight uses a small set of shared UI primitives so the editor reads as one ap
- Use `ScrubInput` for numbers that read as inline text, drag sideways, and accept typing. It hugs its digits and unit and shows a subtly rounded background only while text editing is active.
- Give toolbar slider values an explicit minimum character width (`valueWidth`) when their expected range changes digit count. It counts digits, with the unit after them: percentages reserve three tabular characters, while brush size uses the actual maximum's digit count. Do not guess a global maximum.
- Text uses the global body size. Express hierarchy with weight and color.
-
-## Editor tools
-
-How the rail, canvas bar, sidebar, and layer stack behave. Commands they call are in the [control API](API.md).
-
-The sidebar always shows the output histogram, the layer stack, and the selected layer's controls under a title naming what they edit (Adjustments for the image, Mask adjustments for a mask, or the effect's kind); layers and controls scroll independently. The zoom percentage counts image pixels per device pixel: clicking it at fit zooms to 100%, and anywhere else returns to fit. The rail holds tools: **A** Adjust, **B** Brush, **L** Linear gradient, **R** Radial gradient, **H** Healing, and **C** Crop; **E** opens Export from the header. A selected mask is *active*: the sidebar shows its adjustments and the bar its opacity. It is *edited* only while a shape tool is on the rail, which shows its guides or brush and the overlay; Adjust leaves the canvas to pan and zoom. Selecting a mask in the stack arms the tool of its shape; selecting the image or an effect returns to Adjust. **Enter**, or **Escape** with no drag in progress, leaves one level at a time: a shape tool returns to Adjust with the mask still selected, so its sliders stay at hand without guides over the image, and in Adjust the selection climbs to the parent mask, then to the image with its global controls. The shape's key or the mask's row enters editing again. Enter on a focused button stays its click. The bar over the image edits the active tool and the selected layer: the tool's options, then the layer's opacity and a radial mask's Feather or a child mask's operation. It never wraps: when the canvas is narrow it drops the slider bars, then moves the layer options and finally everything into a menu at its end. Dragging with a gradient tool draws a new mask on top of the stack; the tool stays active, and **Alt** while starting the drag subtracts the gradient from the selected mask instead. Choosing the Brush tool creates an empty brush mask on top of the stack at once, so adjustments made before the first stroke belong to it; leaving the tool while that mask has no strokes and nothing else changed removes it together with its history entry. A brush stroke paints into the selected brush mask, or starts a new brush mask. Creating inside a mask happens in the layer stack: each root mask's actions menu has Add to mask and Subtract from mask submenus that choose a shape and nest the next mask inside it, and **Delete** removes the selected layer with any tool. The brush bar sets size, feather, flow, and paint or erase; **[** and **]** resize, holding **Alt** erases and shows Erase pressed, and **Escape** cancels the stroke. On a touch screen a second finger during a stroke cancels it and pinches instead, so painting and zooming never mix. The brush cursor previews the dab's feather and remains visible while Size or Feather is edited. Creating the mask and each stroke are separate undo steps.
-
-**H** enters Healing and creates an empty Healing layer unless one is selected. Each stroke becomes a patch filled from a donor elsewhere in the image. Size sets the next stroke and never resizes an existing patch. Healing keeps its own next-stroke Feather, initially 10%, without changing the Brush tool. A selected patch exposes editable Feather and Opacity; feather softens the accumulated hard-stroke shape inward from its contour rather than expanding it or feathering every dab independently. A stroke whose brush does not reach the image is declined. Healing chooses a nearby donor automatically; **Alt-click** sets it manually, and Automatic source clears the override. Its boundary correction is bounded to avoid extreme color gains and remains independent of Feather and Opacity. A stroke's donor search keeps its history group open, so Size, Feather, or a handle drag started meanwhile joins that stroke's undo step. Each patch receives the visible result of every earlier patch in its layer. The sidebar numbers patches in replay order with each one's brush size and any lowered opacity; drawing, selection, and row hover show their destination contour and first-point anchor. Dragging the destination anchor moves the shape while its source stays fixed. A completed patch also shows a quieter source contour whose anchor moves its donor; both anchors update the repair while they are dragged, as one undo step. **Escape** cancels painting or pending processing; Enter leaves after completion. Leaving an untouched new layer removes it.
-
-The red overlay shows a mask being edited that does not change the image yet: a gradient being drawn, or the selected mask while its adjustments and curve are default and its effects are off. Once the mask applies an effect, the image itself shows it, so painting continues without the tint. The overlay button beside a mask's adjustments title shows whether the overlay is visible; it and **O** show or hide the overlay for the selected mask in any tool, and the choice holds for the next mask selected. The tint follows the layer's opacity, which scales the mask's coverage. The curve's input histogram weighs pixels by that coverage, so it describes what the curve affects; it ignores opacity and stays available while the layer is hidden or at zero opacity. Selected masks stay editable: drag the center to move, guides to resize or rotate, and the radial inner handle or Feather slider to soften its edge. Shift constrains drawing; Escape cancels the gesture; Delete/Backspace removes the selected mask. Each gesture is one undo. A new mask shows a red overlay of its coverage until Enter leaves editing or its first adjustment; the overlay also shows while drawing or dragging a guide. The Add and Subtract submenus offer either gradient or a brush. **+** adds an effect, inside a selected top-level mask or above the selected sibling. Eye buttons toggle visibility; the inspector edits opacity. Drag a layer name to reorder (insertion line) or nest (highlighted row); the base stays locked and nesting is limited to two levels. Double-click a name to rename; the row menu also duplicates, deletes, reorders, or reparents. Image import still replaces the document; multiple image layers and additional blend modes are not implemented.
diff --git a/PERFORMANCE.md b/PERFORMANCE.md
index da233e9..3632b66 100644
--- a/PERFORMANCE.md
+++ b/PERFORMANCE.md
@@ -1,52 +1,26 @@
# Rendering performance
-Changes affecting GPU work require before/after evidence in the PR, including shader, pipeline, scheduling, and resource-lifetime changes. Measure intentional added cost separately from regressions in existing behavior. For changes that do not affect rendering work, explain why.
+Changes to GPU work, such as shaders, pipelines, scheduling, or resource lifetimes, carry before/after measurements in the PR. Other changes need none.
## Measure the workload
-1. Record base and changed revisions, reproduction command or script, fixture, dimensions, working format, and parameters. Use the same device, backend, runtime, and flags for both revisions.
-2. Separate setup and first-render costs from repeated rendering. Warm up the measured path, collect repeated completed samples, and report warmup count, sample count, median, and p95. Report missing samples and differences within measurement noise.
-3. Measure affected passes or nodes and completed rendering. For a new effect, compare the previous workload with the changed revision's neutral or bypassed path, then report representative active cost. Include pass counts and intermediate texture sizes when they explain the result.
-4. Check correctness alongside timing. Investigate unexpected regressions and explain intentional tradeoffs before calling the change ready. Use workload-specific expectations rather than universal thresholds across hardware.
+1. Compare base and changed revisions with the same fixture, parameters, device, backend, and browser flags, and record the command that reproduces the result.
+2. Separate setup and first render from repeated rendering. Warm up, then report sample count, median, and p95.
+3. For a new effect, compare the previous workload with the changed revision's neutral or bypassed path, then report its active cost.
+4. Check correctness alongside timing, and explain intentional tradeoffs.
| Measurement | Scope |
| --- | --- |
-| CPU preparation | Work to prepare and encode commands. `performance.now()` around encoding measures this. |
-| GPU duration | Timestamped GPU passes. A sum covers only the measured passes. |
-| Completed-render latency | Elapsed time through completion of submitted work. State whether preparation, readback, display, or encoding is included. |
+| CPU preparation | Encoding commands, measured with `performance.now()`. |
+| GPU duration | Timestamped passes; a sum covers only the passes measured. |
+| Completed-render latency | Time until submitted work completes; state what it includes. |
-Keep unrelated work off the queue during isolated measurements. Label software adapters such as SwiftShader: their results describe that backend, not hardware GPU performance. Do not extrapolate their timings or speedup ratios to physical GPUs; validate frame budgets on reference hardware. Mocks do not execute shaders. If timestamps are unsupported, measure completed-render latency and mark GPU timing unavailable; never substitute CPU encoding time or zero for a missing GPU measurement.
+SwiftShader results describe that software backend only; do not extrapolate them to physical GPUs. If timestamps are unsupported, report GPU timing as unavailable rather than substituting CPU time.
-## Instrumentation
+## Timing and inspection
-Import rendering primitives from `@/core/renderer`. [`node`](src/core/renderer/node.ts) defines a pass without a GPU: a stable instance name, shader, and optional vgpu `set` values, sampler descriptors, float storage data, or output size/format. `input` imports a caller-owned texture. `pipeline` connects a list of definitions through the shader's `source` binding; an omitted definition bypasses the effect. A multi-pass feature can supply an image-to-image function instead. `split` builds branches sharing their input, without copying textures. `merge` connects named inputs to a definition; its shader performs the combination. Output geometry defaults to the first input. See [unsharp masking](src/features/details/unsharp-mask.ts) for branches and [app composition](src/app/editor/renderer.ts) for preview/export ordering.
-
-[`createRenderGraph(gpu, timer?)`](src/core/renderer/graph.ts) initializes one vgpu effect per node name on first use, keeps it through bypasses, updates bindings, and owns storage buffers. A name identifies one executed pass. Passes with the same shader and non-input bindings may share an `instance`, while their names and input textures remain distinct for execution, inspection, and timing. Disposal releases buffers and intermediate targets; vgpu owns its internal effect resources and sampler cache.
-
-The graph executes each reachable node once and reuses compatible targets after their last consumer. Multiple inputs and requested outputs are supported. Requested outputs remain valid until the next render or disposal; imported targets remain owned by the caller. Unneeded targets are released after rendering. `inspect()` reports executed pass names, prepared effect count, and retained intermediate texture dimensions/formats, excluding source, display, decoder, buffers, and driver allocations. There is no cross-frame result cache or shader fusion.
-
-Layer composition builds subgraphs without allocating textures for containers. `mixAdjustment` combines an effect with its input using opacity and optional analytical gradients in document coordinates; Add/Subtract child masks use a small storage buffer in that same pass, without mask textures; it preserves input alpha. Node names include stable layer IDs. The display pass tints the previewed mask from the same analytical coverage, so the overlay adds no processing pass. Removed layers release their graph-owned instance handles and storage buffers through `release(prefix)`; bypassed layers keep their instances. vgpu's internal pipeline and uniform caches remain GPU-owned until GPU disposal.
-
-A mask that paints with a brush is rasterized instead: [`createMaskRaster`](src/core/renderer/mask/index.ts) keeps one `r8unorm` texture per brush with strokes at source resolution, outside the graph, whether the brush is a mask of its own or a child of one. Stroke dabs stamp in scissored chunks of 64, one frame each so buffer writes stay ordered; when a scene only appends strokes or points to a brush, only the new dabs stamp, and any earlier change replays that brush's strokes. A mask shaped by children combines its own gradient or brush with theirs, in stored order and scaled by their opacity, into a second texture named `<id>/group` in `inspect()`, rebuilt with one pass per part whenever any of them changes; a brush without children samples its own texture directly. The mix pass then samples the combined texture under the name `layer/<id>/raster` rather than `layer/<id>/mix`, the display overlay samples a row's own or combined texture, and thumbnails do the same. `inspect()` reports `stamped` dabs and the live `rasters`. A mask with no coverage is bypassed without a texture.
-
-Composition also exposes `brush(id, strokes)` for effects that own strokes. Healing uses one hard-stroke raster per patch with stable IDs owned by the feature. Healing reads that hard boundary for a cropped, coarse-to-fine harmonic color correction with bounded RGB gain. Jacobi iterations at each resolution share one prepared effect because their uniforms are identical, while their named executions and alternating texture bindings stay distinct; a typical patch retains 9–13 effects instead of about 80. Donor dragging moves only the overlay and applies the new offset once on release; a zero donor offset bypasses the correction and releases its prepared effects. Feather and opacity affect only the full-image blend, which softens coverage inside that boundary with fixed radial samples without another texture or pass. `inputImage(id)` exposes the accumulated visible result of earlier patches for donor search. The separate `createHealSearch` graph exposes `inspect()` and optional timestamps for its 512-pixel thumbnail pass; matching and readback are measured separately. Every composition pass remains visible in `inspect()` and timestamps, and image outputs remain linear Rec.2020 `rgba16float`.
-
-Interactive edits render a proxy. While a history group is open, the renderer's `update(scene, inputId, interactive)` reduces the source by an integer factor chosen from `setDisplayScale`, the device pixels shown per source pixel, so the composition runs at about display resolution; the reduced source is cached until the source, factor, or RAW development changes. Every `RenderImage` carries `scale`, its source pixels per texel, which the mix pass, unsharp masking, and the transform pass use to keep gradients, radii, and crops in document units. Committing or cancelling the group renders the full image, and export always renders in full. Measure interactive workloads with the proxy factor stated, since a factor of 4 cuts processed pixels sixteenfold.
-
-For GPU timing, enable the optional `timestamp-query` device feature, create a vgpu `timer(gpu)`, and pass it to the graph or `createEditorRenderer`. The graph instruments every node centrally. Results arrive asynchronously through `timer.onResults`; the caller disposes the timer. `gpu.settled()` covers timing readbacks in isolated runs or teardown. Do not wait after individual nodes during interactive editing. See the [vgpu guide](https://github.com/vercel-labs/vgpu/blob/main/docs/topics/performance-playbook.docs.md#13-time-passes-before-optimizing-timer).
-
-The [benchmark](tests/rendering-benchmark.ts) measures uninstrumented repeated rendering, then profiles nodes in a separate run. Report bypasses and missing samples explicitly. Sum a feature's pass durations only when every pass was measured. The graph works without React and without profiling support; it currently accepts programmatically composed nodes, not user-editable or serialized graphs.
-
-Fused shader operations share a pass duration; they are not individually timed. Compute dispatches and opaque package operations need supported instrumentation before claiming GPU timing coverage. Editing must work when profiling is unavailable.
-
-Reuse the existing [benchmark](tests/rendering.bench.ts) and timing helpers for the affected workload. An isolated benchmark explains cost; the complete workload establishes application impact. Summarize reproducible results and their interpretation in the PR; follow the [evidence rules](AGENTS.md#tests-and-completion) for detailed artifacts. An environment failure is a verification gap, not evidence of unchanged performance.
+Enable the optional `timestamp-query` device feature, create a vgpu `timer(gpu)`, and pass it to `createRenderGraph` or `createEditorRenderer`; the graph times every node and results arrive through `timer.onResults`. `inspect()` on the graph reports executed passes, prepared effects, and retained intermediate textures. Interactive edits render a reduced proxy, so state the proxy factor when measuring them. See the [vgpu guide](https://github.com/vercel-labs/vgpu/blob/main/docs/topics/performance-playbook.docs.md#13-time-passes-before-optimizing-timer).
## Running the benchmark
-After [browser setup](CONTRIBUTING.md#browser-setup), run `bun run test:browser --config playwright.bench.config.ts` separately from other GPU/browser work. Workloads cover neutral effects, color mixing, vignette, detail filters, Smart clone, and the combined pipeline. Healing workloads compare an empty layer, a 240 px patch, and the patch at proxy factor 2. AI inference latency is reported separately because it includes the external runtime and model. The fixture is a deterministic 2400×1600 linear Rec.2020 gradient containing neutrals, saturated colors, and HDR values; exposure is 0.25 and contrast is 10. Each workload uses 8 warmups and 40 measured samples. Settings live in [the benchmark](tests/rendering-benchmark.ts); select a workload with e.g. `--grep 'rendering heal'`.
-
-Results and rendered PNGs are written under `test-results/benchmarks`; keep generated artifacts out of Git. JSON includes environment details, samples, median/p95, setup, first render, completed-render latency, intermediate texture storage, and per-node GPU timestamps when supported. Timestamp profiling runs separately from the latency comparison. Decoding, display, readback, and image encoding run outside the measured loop. Software-adapter results describe that backend only. A hardware measurement requires a browser configuration that does not force SwiftShader; record the adapter actually used.
-
-Compare `pipeline` with `pipeline-input` to measure the curve input histogram: the latter retains the image entering the base curve and computes its histogram. Completed latency includes histogram compute and its buffer copy; per-node timestamps cover only image processing. Inspecting a mask adds one pass, `layer/<id>/input` or `layer/<id>/raster-input`, which copies the curve's input with the mask's coverage as alpha; the histogram weighs votes by alpha. A hidden or zero-opacity layer keeps that pass while inspected and drops its mix pass.
-
-For revision comparisons, use identical fixtures, settings, sampling, and browser configuration in both checkouts. The benchmark is opt-in and excluded from the regular test suite; correctness remains covered by GPU pixel tests and the editing session.
+Run `bun run test:browser --config playwright.bench.config.ts` apart from other browser work, and select a workload with `--grep`, e.g. `--grep 'rendering heal'`. Workloads and settings live in [the benchmark](tests/rendering-benchmark.ts): a deterministic 2400×1600 linear Rec.2020 fixture, 8 warmups, and 40 samples. Results and rendered PNGs go to `test-results/benchmarks`; attach them to the PR rather than committing them.
diff --git a/README.md b/README.md
index 1b4b492..0168755 100644
--- a/README.md
+++ b/README.md
@@ -61,7 +61,7 @@ bun install
bun dev
```
-The shared controls, such as buttons, sliders, menus, and panels, come from [@roprgm/ui](https://ui.roprgm.com). See [CONTRIBUTING.md](CONTRIBUTING.md) for browser setup, validation, benchmarks, and the pull request checklist. `window.openlight` exposes a scripting [API](API.md).
+The shared controls, such as buttons, sliders, menus, and panels, come from [@roprgm/ui](https://ui.roprgm.com). See [AGENTS.md](AGENTS.md) for browser setup and checks, and [ARCHITECTURE.md](ARCHITECTURE.md) for how the code is organized. `window.openlight` exposes a scripting [API](API.md).
## License
diff --git a/REVIEW.md b/REVIEW.md
index 61ea7f6..e44f32d 100644
--- a/REVIEW.md
+++ b/REVIEW.md
@@ -1,20 +1,38 @@
-# Code review
+# Review
-Use [AGENTS.md](AGENTS.md) for architecture and coding rules. Review the complete path from user action through edits, processing, and resource cleanup. Code should be a small, readable example of how the application works.
+A review checks a change before its PR is ready: substantial changes get one, and anyone can ask for one. Code should stay a small, readable example of how the application works; [AGENTS.md](AGENTS.md) and [ARCHITECTURE.md](ARCHITECTURE.md) hold the rules.
-## Review questions
+## Scope
-- **Ownership:** Does each module have one responsibility? Does feature behavior stay with its feature? Is shared code independent of its consumers? `lib/` must meet the layer-0 definition, not merely have multiple callers.
-- **Simplicity:** Does the whole change justify its code, including tests, helpers, scripts, and documentation? Could direct functions or a few repeated lines replace configuration, forwarding layers, or speculative extension points?
-- **State and boundaries:** Is each fact stored once? Are inputs and dependencies explicit, invalid states represented clearly, and external data validated at its boundary? Do errors retain enough context to fix them?
-- **Behavior and lifetime:** Do edits, grouping, cancellation, and undo work together? Can asynchronous work outlive or overwrite its document? Does each owner release resources, subscriptions, and pending work correctly?
-- **Tests:** Would a short, representative workflow fail if the changed behavior broke? Do extra cases protect distinct risks? Follow the [testing guidance](AGENTS.md#tests-and-completion).
-- **Evidence:** Can reviewers assess every new or changed UI from actual screenshots with the affected controls visible? Rendered output does not replace UI screenshots. Does the PR include [rendering measurements](PERFORMANCE.md) when GPU work changes? Check reported limitations as well as passing results.
+Read what changed: the diff against the base and what it was meant to do. Then follow the changed code to the user actions that reach it. That set is what the review verifies; workflows the change cannot reach need no check. A sidebar layout change does not call for export tests.
-## Findings and tradeoffs
+## Verify
-For each finding, name the affected code, the concrete problem or reading burden, and the smallest useful correction. Distinguish necessary changes from optional reorganization. Do not split cohesive code solely to reduce line counts.
+`bun run check`, `bun run build`, and `bun run test` are fast; run them for any code change. Beyond that, pick the cheapest check that would catch a regression in the scope:
-Accept a departure from a coding guideline when it demonstrably improves readability, reduces total complexity, or improves performance with evidence. Explain the tradeoff in the PR. Ordinary implementation choices do not require an approval ceremony.
+| Change | Check |
+| --- | --- |
+| Documentation | Links and the references it describes. |
+| Layout, styling, copy | Look at the affected screens at the widths they change. |
+| Document, edits, history, loaders | The Bun tests covering them. |
+| Processing, shaders, rendering | The browser tests of that feature, e.g. `bun run test:browser tests/vignette.e2e.ts`; before/after measurements when GPU work changes ([PERFORMANCE.md](PERFORMANCE.md)). |
+| Shared primitives in `core/` or `components/` | The browser tests of the workflows that use them. |
-Report required checks and remaining verification gaps. An image supplements tests; a performance claim needs measurements of the affected workload.
+Run the whole browser suite only when a change cuts across the editor. A failure that also happens on the base is not the change's; report it as a gap.
+
+## Screenshots
+
+New features and substantial UI or design changes show the affected interface in the PR description: before and after for changed UI, the new states for new UI, with the same fixture and viewport on both sides. For a smaller visible change, ask whether screenshots are wanted. Upload images to GitHub as PR attachments; never commit them.
+
+## Read the diff
+
+- **Size:** Does the change match the request? Could it be smaller or live closer to the behavior it changes?
+- **Ownership:** Does each module keep one responsibility and stay in its layer? Does feature behavior stay in its feature?
+- **State:** Is each fact stored once and behavior driven by it rather than by DOM structure or timing? Is external input validated at its boundary?
+- **Lifetime:** Do edits, grouping, cancellation, and undo work together? Can async work outlive its document? Is every resource and subscription released?
+- **Tests:** Would a user workflow test fail if the change broke? Flag tests that protect no workflow or regression.
+- **Architecture:** If the structure changed, was it agreed and is [ARCHITECTURE.md](ARCHITECTURE.md) updated?
+
+## Report
+
+For each finding, name the code, the concrete problem, and the smallest fix; separate required changes from optional ones. List the checks run and any gaps.
diff --git a/docs/benchmarks/color-mixer-active.png b/docs/benchmarks/color-mixer-active.png
deleted file mode 100644
index d5e9499..0000000
Binary files a/docs/benchmarks/color-mixer-active.png and /dev/null differ
diff --git a/docs/benchmarks/color-mixer-neutral.png b/docs/benchmarks/color-mixer-neutral.png
deleted file mode 100644
index 03108a2..0000000
Binary files a/docs/benchmarks/color-mixer-neutral.png and /dev/null differ
diff --git a/docs/benchmarks/color-mixer.json b/docs/benchmarks/color-mixer.json
deleted file mode 100644
index fe01cc5..0000000
--- a/docs/benchmarks/color-mixer.json
+++ /dev/null
@@ -1,736 +0,0 @@
-{
- "method": "Same harness and Chromium/Vulkan/SwiftShader flags in each checkout. 8 warmups and 40 samples per workload. CPU preparation and completed-render latency exclude display/readback/encoding; isolated active GPU durations use timestamp-query. Software-adapter measurements are not hardware GPU estimates.",
- "revisions": {
- "base": "fccc4ca",
- "before": "50f889f",
- "after": "50f889f plus validation changes; src/ is byte-identical to before"
- },
- "sourceTreeBeforeAndAfter": "3ce5232a552a5e7beac11f8e4f01c2146c60a065",
- "lineCounts": {
- "scope": "JavaScript/TypeScript under src and tests; declarations excluded",
- "before": {
- "physical": 8623,
- "nonblank": 8276
- },
- "after": {
- "physical": 8868,
- "nonblank": 8516
- },
- "productionDelta": 0,
- "editingSessionPhysical": {
- "before": 1095,
- "after": 1013
- },
- "additionalConfigPhysical": 18,
- "newHtmlPhysical": 9
- },
- "runs": {
- "base": {
- "baseline": {
- "revision": "fccc4caba12acae556dd218cdccb6b3be3c6fa77",
- "browser": "151.0.7922.34",
- "platform": "linux",
- "kernel": "7.0.0-22-generic",
- "cpu": "AMD Ryzen 5 3600 6-Core Processor",
- "logicalCpus": 12,
- "flags": [
- "--enable-unsafe-webgpu",
- "--use-webgpu-adapter=swiftshader",
- "--enable-features=Vulkan",
- "--use-angle=vulkan",
- "--use-vulkan=swiftshader",
- "--disable-vulkan-surface"
- ],
- "workload": "baseline",
- "size": [2400, 1600],
- "warmup": 8,
- "samples": 40,
- "timestamps": true,
- "adapter": {
- "vendor": "google",
- "architecture": "swiftshader",
- "device": "",
- "description": ""
- },
- "rendererSetupMs": 45.59999942779541,
- "firstRenderMs": 315.80000019073486,
- "rendering": {
- "cpuEncodeMs": {
- "samples": [
- 0.20000076293945312, 0.10000038146972656, 0.19999980926513672,
- 0.3000001907348633, 0.2999992370605469, 0.20000076293945312,
- 0.3000001907348633, 0.19999980926513672, 0.19999980926513672,
- 0.19999980926513672, 0.19999980926513672, 0.09999942779541016,
- 0.19999980926513672, 0.10000038146972656, 0.3000001907348633,
- 0.19999980926513672, 0.19999980926513672, 0.10000038146972656,
- 0.20000076293945312, 0.19999980926513672, 0.10000038146972656,
- 0.20000076293945312, 0.19999980926513672, 0.3000001907348633,
- 0.20000076293945312, 0.3000001907348633, 0.19999980926513672,
- 0.3000001907348633, 0.19999980926513672, 0.20000076293945312,
- 0.20000076293945312, 0.3000001907348633, 0.19999980926513672,
- 0.19999980926513672, 0.19999980926513672, 0.19999980926513672,
- 0.3000001907348633, 0.19999980926513672, 0.19999980926513672,
- 0.19999980926513672
- ],
- "median": 0.19999980926513672,
- "p95": 0.3000001907348633
- },
- "completedMs": {
- "samples": [
- 244.20000076293945, 238.5, 243.19999980926514, 238.20000076293945,
- 233.79999923706055, 244.5, 235.20000076293945, 237,
- 243.89999961853027, 236.19999980926514, 243.5, 236.19999980926514,
- 247.69999980926514, 232.10000038146973, 236.5, 234.5,
- 234.19999980926514, 240.39999961853027, 242.70000076293945,
- 231.0999994277954, 237.69999980926514, 237.70000076293945,
- 232.79999923706055, 236.5, 234, 241.9000005722046,
- 235.69999980926514, 244.5, 233.89999961853027, 239.5,
- 232.60000038146973, 237.19999980926514, 236.4000005722046,
- 232.69999980926514, 234.30000019073486, 234.69999980926514,
- 235.89999961853027, 232, 238, 248.69999980926514
- ],
- "median": 236.5,
- "p95": 244.5
- },
- "gpuMs": null,
- "missingGpuSamples": null
- },
- "isolated": null,
- "outputBytes": 0,
- "imageSha256": "9440cf1efcde5d423d22ba1620c50c25db5a21412a28a319807f1b8140eea29a"
- }
- },
- "before": {
- "active": {
- "revision": "50f889f6012223c1d9514417e826b460ad154569",
- "browser": "151.0.7922.34",
- "platform": "linux",
- "kernel": "7.0.0-22-generic",
- "cpu": "AMD Ryzen 5 3600 6-Core Processor",
- "logicalCpus": 12,
- "flags": [
- "--enable-unsafe-webgpu",
- "--use-webgpu-adapter=swiftshader",
- "--enable-features=Vulkan",
- "--use-angle=vulkan",
- "--use-vulkan=swiftshader",
- "--disable-vulkan-surface"
- ],
- "workload": "active",
- "size": [2400, 1600],
- "warmup": 8,
- "samples": 40,
- "timestamps": true,
- "adapter": {
- "vendor": "google",
- "architecture": "swiftshader",
- "device": "",
- "description": ""
- },
- "rendererSetupMs": 45.5,
- "firstRenderMs": 569.6000003814697,
- "rendering": {
- "cpuEncodeMs": {
- "samples": [
- 0.3000001907348633, 0.3000001907348633, 0.3000001907348633,
- 0.19999980926513672, 0.2999992370605469, 0.19999980926513672,
- 0.19999980926513672, 0.19999980926513672, 0.3000001907348633,
- 0.39999961853027344, 0.3000001907348633, 0.20000076293945312,
- 0.20000076293945312, 0.20000076293945312, 0.3000001907348633,
- 0.20000076293945312, 0.3000001907348633, 0.3000001907348633,
- 0.19999980926513672, 0.19999980926513672, 0.19999980926513672,
- 0.19999980926513672, 0.3000001907348633, 0.19999980926513672,
- 0.19999980926513672, 0.20000076293945312, 0.3000001907348633,
- 0.2999992370605469, 0.19999980926513672, 0.19999980926513672,
- 0.2999992370605469, 0.19999980926513672, 0.3000001907348633,
- 0.20000076293945312, 0.19999980926513672, 0.3000001907348633,
- 0.2999992370605469, 0.19999980926513672, 0.19999980926513672,
- 0.19999980926513672
- ],
- "median": 0.20000076293945312,
- "p95": 0.3000001907348633
- },
- "completedMs": {
- "samples": [
- 440, 440.0999994277954, 446.70000076293945, 449.5,
- 451.19999980926514, 438, 439.80000019073486, 443.5999994277954,
- 444.4000005722046, 441.69999980926514, 449, 440, 433.5,
- 450.6000003814697, 460.8999996185303, 437.9000005722046,
- 439.8999996185303, 445.5, 443.80000019073486, 440.5999994277954,
- 448.4000005722046, 456.0999994277954, 447.9000005722046,
- 457.5999994277954, 460.69999980926514, 451.1000003814697,
- 452.6000003814697, 454.0999994277954, 455, 449.9000005722046,
- 454.79999923706055, 458.5, 453.8999996185303, 457.20000076293945,
- 458.0999994277954, 455.4000005722046, 455, 458.19999980926514,
- 458.30000019073486, 457.6000003814697
- ],
- "median": 450.25000047683716,
- "p95": 458.5
- },
- "gpuMs": null,
- "missingGpuSamples": null
- },
- "isolated": {
- "cpuEncodeMs": {
- "samples": [
- 0.3000001907348633, 0.39999961853027344, 0.19999980926513672,
- 0.20000076293945312, 0.19999980926513672, 0.19999980926513672,
- 0.20000076293945312, 0.10000038146972656, 0.20000076293945312,
- 0.19999980926513672, 0.19999980926513672, 0.09999942779541016,
- 0.2999992370605469, 0.19999980926513672, 0.3000001907348633,
- 0.09999942779541016, 0.3000001907348633, 0.19999980926513672,
- 0.19999980926513672, 0.20000076293945312, 0.19999980926513672,
- 0.19999980926513672, 0.19999980926513672, 0.19999980926513672,
- 0.19999980926513672, 0.3000001907348633, 0.10000038146972656,
- 0.19999980926513672, 0.3000001907348633, 0.19999980926513672,
- 0.3000001907348633, 0.10000038146972656, 0.09999942779541016,
- 0.20000076293945312, 0.19999980926513672, 0.3000001907348633,
- 0.10000038146972656, 0.3000001907348633, 0.3000001907348633,
- 0.3000001907348633
- ],
- "median": 0.19999980926513672,
- "p95": 0.3000001907348633
- },
- "completedMs": {
- "samples": [
- 209.69999980926514, 208.30000019073486, 208.5999994277954,
- 204.10000038146973, 203.19999980926514, 198.69999980926514,
- 201.9000005722046, 205, 202.9000005722046, 199.89999961853027,
- 204.10000038146973, 209.30000019073486, 199.5, 203.19999980926514,
- 202, 199.39999961853027, 209.9000005722046, 200.5,
- 212.69999980926514, 201.4000005722046, 213.5, 202.5, 212.5,
- 206.69999980926514, 208, 204.89999961853027, 201.80000019073486,
- 213.60000038146973, 204.39999961853027, 209.69999980926514,
- 208.80000019073486, 205.9000005722046, 199.29999923706055,
- 205.60000038146973, 205.89999961853027, 203.10000038146973,
- 213.39999961853027, 210.30000019073486, 213.60000038146973,
- 209.30000019073486
- ],
- "median": 205.30000019073486,
- "p95": 213.5
- },
- "gpuMs": {
- "samples": [
- 208.752435, 207.079435, 206.96791399999998, 203.08783, 201.949274,
- 197.37588699999998, 200.24505399999998, 204.306288, 201.933333,
- 199.171177, 203.226101, 208.0626, 198.255302, 202.21149499999999,
- 200.33637399999998, 198.825085, 208.54652299999998, 199.63619,
- 212.174735, 200.570756, 211.997515, 201.668992, 211.147349,
- 205.70174699999998, 206.512621, 203.210782, 201.141369,
- 212.073904, 202.93762999999998, 208.65427499999998,
- 207.04537399999998, 205.292924, 197.68402799999998,
- 204.07582599999998, 204.961572, 201.95278399999998, 211.906884,
- 209.10155699999999, 212.35833599999998, 208.536294
- ],
- "median": 204.191057,
- "p95": 212.073904
- },
- "missingGpuSamples": 0
- },
- "outputBytes": 30720000,
- "imageSha256": "c4633367c9482c4939135ba829ad1bee4d8235023f4e6ae9c32199b768ceed3f"
- },
- "baseline": {
- "revision": "50f889f6012223c1d9514417e826b460ad154569",
- "browser": "151.0.7922.34",
- "platform": "linux",
- "kernel": "7.0.0-22-generic",
- "cpu": "AMD Ryzen 5 3600 6-Core Processor",
- "logicalCpus": 12,
- "flags": [
- "--enable-unsafe-webgpu",
- "--use-webgpu-adapter=swiftshader",
- "--enable-features=Vulkan",
- "--use-angle=vulkan",
- "--use-vulkan=swiftshader",
- "--disable-vulkan-surface"
- ],
- "workload": "baseline",
- "size": [2400, 1600],
- "warmup": 8,
- "samples": 40,
- "timestamps": true,
- "adapter": {
- "vendor": "google",
- "architecture": "swiftshader",
- "device": "",
- "description": ""
- },
- "rendererSetupMs": 44.80000019073486,
- "firstRenderMs": 315.4000005722046,
- "rendering": {
- "cpuEncodeMs": {
- "samples": [
- 0.3000001907348633, 0.19999980926513672, 0.19999980926513672,
- 0.19999980926513672, 0.20000076293945312, 0.20000076293945312,
- 0.20000076293945312, 0.10000038146972656, 0.19999980926513672,
- 0.10000038146972656, 0.19999980926513672, 0.19999980926513672,
- 0.3000001907348633, 0.19999980926513672, 0.3000001907348633,
- 0.20000076293945312, 0.3000001907348633, 0.19999980926513672,
- 0.10000038146972656, 0.19999980926513672, 0.19999980926513672,
- 0.10000038146972656, 0.19999980926513672, 0.2999992370605469,
- 0.19999980926513672, 0.2999992370605469, 0.20000076293945312,
- 0.19999980926513672, 0.3000001907348633, 0.19999980926513672,
- 0.10000038146972656, 0.20000076293945312, 0.2999992370605469,
- 0.10000038146972656, 0.3000001907348633, 0.19999980926513672,
- 0.20000076293945312, 0.20000076293945312, 0.3000001907348633,
- 0.3000001907348633
- ],
- "median": 0.19999980926513672,
- "p95": 0.3000001907348633
- },
- "completedMs": {
- "samples": [
- 243, 241.80000019073486, 236.39999961853027, 231.5999994277954,
- 237, 246, 240.5, 232.80000019073486, 241, 238.80000019073486,
- 232.9000005722046, 229.79999923706055, 243.10000038146973, 236,
- 230.89999961853027, 235, 229.80000019073486, 242.80000019073486,
- 231.60000038146973, 237, 236.0999994277954, 237.9000005722046,
- 249.5, 244.19999980926514, 242.80000019073486, 242.79999923706055,
- 235.60000038146973, 241.69999980926514, 235, 240.69999980926514,
- 238, 250.70000076293945, 240.29999923706055, 237.80000019073486,
- 236.80000019073486, 232.89999961853027, 234, 236.30000019073486,
- 234.80000019073486, 241.39999961853027
- ],
- "median": 237.40000009536743,
- "p95": 246
- },
- "gpuMs": null,
- "missingGpuSamples": null
- },
- "isolated": null,
- "outputBytes": 0,
- "imageSha256": "9440cf1efcde5d423d22ba1620c50c25db5a21412a28a319807f1b8140eea29a"
- },
- "neutral": {
- "revision": "50f889f6012223c1d9514417e826b460ad154569",
- "browser": "151.0.7922.34",
- "platform": "linux",
- "kernel": "7.0.0-22-generic",
- "cpu": "AMD Ryzen 5 3600 6-Core Processor",
- "logicalCpus": 12,
- "flags": [
- "--enable-unsafe-webgpu",
- "--use-webgpu-adapter=swiftshader",
- "--enable-features=Vulkan",
- "--use-angle=vulkan",
- "--use-vulkan=swiftshader",
- "--disable-vulkan-surface"
- ],
- "workload": "neutral",
- "size": [2400, 1600],
- "warmup": 8,
- "samples": 40,
- "timestamps": true,
- "adapter": {
- "vendor": "google",
- "architecture": "swiftshader",
- "device": "",
- "description": ""
- },
- "rendererSetupMs": 52,
- "firstRenderMs": 344,
- "rendering": {
- "cpuEncodeMs": {
- "samples": [
- 0.3000001907348633, 0.19999980926513672, 0.3000001907348633,
- 0.19999980926513672, 0.20000076293945312, 0.19999980926513672,
- 0.19999980926513672, 0.39999961853027344, 0.3000001907348633,
- 0.19999980926513672, 0.19999980926513672, 0.10000038146972656,
- 0.19999980926513672, 0.19999980926513672, 0.20000076293945312,
- 0.19999980926513672, 0.19999980926513672, 0.09999942779541016,
- 0.19999980926513672, 0.20000076293945312, 0.19999980926513672,
- 0.3000001907348633, 0.19999980926513672, 0.19999980926513672,
- 0.19999980926513672, 0.19999980926513672, 0.09999942779541016,
- 0.09999942779541016, 0.19999980926513672, 0.2999992370605469,
- 0.19999980926513672, 0.2999992370605469, 0.10000038146972656,
- 0.19999980926513672, 0.19999980926513672, 0.20000076293945312,
- 0.2999992370605469, 0.19999980926513672, 0.19999980926513672,
- 0.19999980926513672
- ],
- "median": 0.19999980926513672,
- "p95": 0.3000001907348633
- },
- "completedMs": {
- "samples": [
- 244.20000076293945, 249, 238.5, 241.19999980926514,
- 241.20000076293945, 250.19999980926514, 259.69999980926514,
- 257.19999980926514, 241.80000019073486, 253.69999980926514,
- 240.60000038146973, 238.9000005722046, 239.5, 241.0999994277954,
- 244.10000038146973, 246.19999980926514, 246.30000019073486,
- 257.69999980926514, 248.0999994277954, 243.70000076293945,
- 242.0999994277954, 238.60000038146973, 242.19999980926514,
- 241.89999961853027, 237.80000019073486, 245.5, 245.69999980926514,
- 254.5999994277954, 243.4000005722046, 249.19999980926514,
- 243.80000019073486, 246.0999994277954, 252.10000038146973, 247,
- 248.0999994277954, 237.70000076293945, 246.19999980926514,
- 242.89999961853027, 248.10000038146973, 242.69999980926514
- ],
- "median": 244.1500005722046,
- "p95": 257.19999980926514
- },
- "gpuMs": null,
- "missingGpuSamples": null
- },
- "isolated": {
- "cpuEncodeMs": {
- "samples": [
- 0.09999942779541016, 0.10000038146972656, 0, 0, 0,
- 0.09999942779541016, 0, 0, 0, 0, 0, 0.10000038146972656, 0, 0, 0,
- 0, 0, 0.10000038146972656, 0, 0, 0, 0, 0, 0, 0, 0,
- 0.10000038146972656, 0.10000038146972656, 0, 0, 0, 0,
- 0.09999942779541016, 0, 0, 0.10000038146972656, 0,
- 0.10000038146972656, 0.09999942779541016, 0
- ],
- "median": 0,
- "p95": 0.10000038146972656
- },
- "completedMs": {
- "samples": [
- 0.09999942779541016, 0.20000076293945312, 0, 0.19999980926513672,
- 0, 0.19999980926513672, 0.10000038146972656, 0,
- 0.19999980926513672, 0.09999942779541016, 0, 0.20000076293945312,
- 0, 0.19999980926513672, 0, 0.19999980926513672, 0,
- 0.10000038146972656, 0.09999942779541016, 0.10000038146972656,
- 0.09999942779541016, 0.10000038146972656, 0.10000038146972656,
- 0.09999942779541016, 0.10000038146972656, 0.09999942779541016,
- 0.10000038146972656, 0.19999980926513672, 0.10000038146972656,
- 0.10000038146972656, 0.10000038146972656, 0, 0.19999980926513672,
- 0.09999942779541016, 0.10000038146972656, 0.10000038146972656,
- 0.09999942779541016, 0.10000038146972656, 0.19999980926513672,
- 0.10000038146972656
- ],
- "median": 0.10000038146972656,
- "p95": 0.19999980926513672
- },
- "gpuMs": null,
- "missingGpuSamples": null
- },
- "outputBytes": 0,
- "imageSha256": "9440cf1efcde5d423d22ba1620c50c25db5a21412a28a319807f1b8140eea29a"
- }
- },
- "after": {
- "active": {
- "revision": "50f889f6012223c1d9514417e826b460ad154569",
- "browser": "151.0.7922.34",
- "platform": "linux",
- "kernel": "7.0.0-22-generic",
- "cpu": "AMD Ryzen 5 3600 6-Core Processor",
- "logicalCpus": 12,
- "flags": [
- "--enable-unsafe-webgpu",
- "--use-webgpu-adapter=swiftshader",
- "--enable-features=Vulkan",
- "--use-angle=vulkan",
- "--use-vulkan=swiftshader",
- "--disable-vulkan-surface"
- ],
- "workload": "active",
- "size": [2400, 1600],
- "warmup": 8,
- "samples": 40,
- "timestamps": true,
- "adapter": {
- "vendor": "google",
- "architecture": "swiftshader",
- "device": "",
- "description": ""
- },
- "rendererSetupMs": 44.59999942779541,
- "firstRenderMs": 565,
- "rendering": {
- "cpuEncodeMs": {
- "samples": [
- 0.3000001907348633, 0.19999980926513672, 0.3000001907348633,
- 0.09999942779541016, 0.3000001907348633, 0.19999980926513672,
- 0.19999980926513672, 0.3000001907348633, 0.3000001907348633,
- 0.3000001907348633, 0.19999980926513672, 0.3000001907348633,
- 0.20000076293945312, 0.3000001907348633, 0.19999980926513672,
- 0.3000001907348633, 0.3000001907348633, 0.3000001907348633,
- 0.3000001907348633, 0.3000001907348633, 0.3000001907348633,
- 0.19999980926513672, 0.19999980926513672, 0.3000001907348633,
- 0.19999980926513672, 0.3000001907348633, 0.2999992370605469,
- 0.3000001907348633, 0.20000076293945312, 0.3000001907348633,
- 0.3000001907348633, 0.19999980926513672, 0.2999992370605469,
- 0.19999980926513672, 0.19999980926513672, 0.3000001907348633,
- 0.19999980926513672, 0.3000001907348633, 0.19999980926513672,
- 0.39999961853027344
- ],
- "median": 0.3000001907348633,
- "p95": 0.3000001907348633
- },
- "completedMs": {
- "samples": [
- 455.80000019073486, 449.5, 441.5, 437.79999923706055,
- 445.20000076293945, 444.3999996185303, 449.69999980926514,
- 443.1000003814697, 440.5, 443.9000005722046, 442.19999980926514,
- 449.8999996185303, 440.80000019073486, 445.1000003814697,
- 445.5999994277954, 457.19999980926514, 460.5, 452.5,
- 464.80000019073486, 450, 439.19999980926514, 447.4000005722046,
- 434.0999994277954, 435.9000005722046, 448.1000003814697,
- 438.30000019073486, 460.79999923706055, 437, 441.30000019073486,
- 439.5, 441.5, 444.4000005722046, 459.19999980926514,
- 455.8999996185303, 451.69999980926514, 455.6000003814697,
- 445.19999980926514, 456.30000019073486, 452.8999996185303,
- 452.1000003814697
- ],
- "median": 445.40000009536743,
- "p95": 460.5
- },
- "gpuMs": null,
- "missingGpuSamples": null
- },
- "isolated": {
- "cpuEncodeMs": {
- "samples": [
- 0.3000001907348633, 0.3000001907348633, 0.3000001907348633,
- 0.19999980926513672, 0.10000038146972656, 0.19999980926513672,
- 0.3000001907348633, 0.19999980926513672, 0.19999980926513672,
- 0.2999992370605469, 0.19999980926513672, 0.3000001907348633,
- 0.19999980926513672, 0.3000001907348633, 0.19999980926513672,
- 0.09999942779541016, 0.19999980926513672, 0.3000001907348633,
- 0.20000076293945312, 0.3000001907348633, 0.19999980926513672,
- 0.3000001907348633, 0.3000001907348633, 0.10000038146972656,
- 0.19999980926513672, 0.19999980926513672, 0.3000001907348633,
- 0.20000076293945312, 0.19999980926513672, 0.10000038146972656,
- 0.3000001907348633, 0.19999980926513672, 0.19999980926513672,
- 0.20000076293945312, 0.3000001907348633, 0.20000076293945312,
- 0.3000001907348633, 0.3000001907348633, 0.19999980926513672,
- 0.19999980926513672
- ],
- "median": 0.20000028610229492,
- "p95": 0.3000001907348633
- },
- "completedMs": {
- "samples": [
- 212.30000019073486, 208.4000005722046, 210.89999961853027,
- 208.19999980926514, 209.20000076293945, 212.39999961853027,
- 208.30000019073486, 208.89999961853027, 208.80000019073486,
- 208.0999994277954, 206.80000019073486, 209.19999980926514,
- 208.10000038146973, 211.80000019073486, 200.0999994277954,
- 198.19999980926514, 198.89999961853027, 200.5, 203,
- 206.20000076293945, 201.79999923706055, 205.9000005722046,
- 208.5999994277954, 206.5, 221.30000019073486, 207.89999961853027,
- 210, 203.4000005722046, 205.80000019073486, 202.10000038146973,
- 210.5, 214.5, 203.0999994277954, 205.10000038146973,
- 207.39999961853027, 203.9000005722046, 217.5999994277954,
- 202.9000005722046, 201.69999980926514, 208.69999980926514
- ],
- "median": 207.99999952316284,
- "p95": 214.5
- },
- "gpuMs": {
- "samples": [
- 211.35441, 207.26082499999998, 210.036193, 206.62772199999998,
- 208.268992, 211.02247799999998, 206.897754, 207.99319, 207.685598,
- 206.964214, 205.671876, 208.337422, 207.33130599999998,
- 210.237904, 199.270838, 196.73511299999998, 197.87704, 199.467618,
- 202.023484, 204.95017199999998, 201.25691, 204.877752, 207.670698,
- 205.355844, 219.834251, 207.134095, 208.732485, 202.298646,
- 204.27480799999998, 200.714776, 209.262287, 213.00317099999998,
- 202.009405, 204.222567, 206.14659999999998, 202.98926,
- 216.07173799999998, 201.488991, 200.262373, 207.93025
- ],
- "median": 206.76273799999998,
- "p95": 213.00317099999998
- },
- "missingGpuSamples": 0
- },
- "outputBytes": 30720000,
- "imageSha256": "c4633367c9482c4939135ba829ad1bee4d8235023f4e6ae9c32199b768ceed3f"
- },
- "baseline": {
- "revision": "50f889f6012223c1d9514417e826b460ad154569",
- "browser": "151.0.7922.34",
- "platform": "linux",
- "kernel": "7.0.0-22-generic",
- "cpu": "AMD Ryzen 5 3600 6-Core Processor",
- "logicalCpus": 12,
- "flags": [
- "--enable-unsafe-webgpu",
- "--use-webgpu-adapter=swiftshader",
- "--enable-features=Vulkan",
- "--use-angle=vulkan",
- "--use-vulkan=swiftshader",
- "--disable-vulkan-surface"
- ],
- "workload": "baseline",
- "size": [2400, 1600],
- "warmup": 8,
- "samples": 40,
- "timestamps": true,
- "adapter": {
- "vendor": "google",
- "architecture": "swiftshader",
- "device": "",
- "description": ""
- },
- "rendererSetupMs": 43.89999961853027,
- "firstRenderMs": 315.1000003814697,
- "rendering": {
- "cpuEncodeMs": {
- "samples": [
- 0.19999980926513672, 0.19999980926513672, 0.19999980926513672,
- 0.19999980926513672, 0.3000001907348633, 0.3000001907348633,
- 0.19999980926513672, 0.3000001907348633, 0.19999980926513672,
- 0.20000076293945312, 0.20000076293945312, 0.3000001907348633,
- 0.19999980926513672, 0.19999980926513672, 0.19999980926513672,
- 0.10000038146972656, 0.09999942779541016, 0.19999980926513672,
- 0.19999980926513672, 0.19999980926513672, 0.20000076293945312,
- 0.10000038146972656, 0.20000076293945312, 0.20000076293945312,
- 0.19999980926513672, 0.19999980926513672, 0.3000001907348633,
- 0.19999980926513672, 0.19999980926513672, 0.3000001907348633,
- 0.09999942779541016, 0.19999980926513672, 0.10000038146972656,
- 0.3000001907348633, 0.19999980926513672, 0.19999980926513672,
- 0.19999980926513672, 0.3000001907348633, 0.3000001907348633,
- 0.3000001907348633
- ],
- "median": 0.19999980926513672,
- "p95": 0.3000001907348633
- },
- "completedMs": {
- "samples": [
- 242.89999961853027, 239.60000038146973, 248.10000038146973,
- 239.89999961853027, 243.5, 244.80000019073486, 239.19999980926514,
- 237.5, 240.69999980926514, 241.5, 238.9000005722046,
- 234.0999994277954, 236.30000019073486, 238.89999961853027,
- 232.69999980926514, 235.60000038146973, 241.5, 239.39999961853027,
- 243, 238.60000038146973, 243.20000076293945, 244.19999980926514,
- 241, 241.80000019073486, 245.30000019073486, 240.19999980926514,
- 238, 234.9000005722046, 231.79999923706055, 234.30000019073486,
- 243.5, 235.19999980926514, 236.69999980926514, 234.5,
- 238.30000019073486, 241, 238.39999961853027, 238.5,
- 238.80000019073486, 237.5
- ],
- "median": 239.05000019073486,
- "p95": 244.80000019073486
- },
- "gpuMs": null,
- "missingGpuSamples": null
- },
- "isolated": null,
- "outputBytes": 0,
- "imageSha256": "9440cf1efcde5d423d22ba1620c50c25db5a21412a28a319807f1b8140eea29a"
- },
- "neutral": {
- "revision": "50f889f6012223c1d9514417e826b460ad154569",
- "browser": "151.0.7922.34",
- "platform": "linux",
- "kernel": "7.0.0-22-generic",
- "cpu": "AMD Ryzen 5 3600 6-Core Processor",
- "logicalCpus": 12,
- "flags": [
- "--enable-unsafe-webgpu",
- "--use-webgpu-adapter=swiftshader",
- "--enable-features=Vulkan",
- "--use-angle=vulkan",
- "--use-vulkan=swiftshader",
- "--disable-vulkan-surface"
- ],
- "workload": "neutral",
- "size": [2400, 1600],
- "warmup": 8,
- "samples": 40,
- "timestamps": true,
- "adapter": {
- "vendor": "google",
- "architecture": "swiftshader",
- "device": "",
- "description": ""
- },
- "rendererSetupMs": 47.59999942779541,
- "firstRenderMs": 315.20000076293945,
- "rendering": {
- "cpuEncodeMs": {
- "samples": [
- 0.19999980926513672, 0.19999980926513672, 0.2999992370605469,
- 0.19999980926513672, 0.19999980926513672, 0.3000001907348633,
- 0.20000076293945312, 0.19999980926513672, 0.19999980926513672,
- 0.19999980926513672, 0.19999980926513672, 0.3000001907348633,
- 0.20000076293945312, 0.19999980926513672, 0.10000038146972656,
- 0.19999980926513672, 0.19999980926513672, 0.3000001907348633,
- 0.10000038146972656, 0.09999942779541016, 0.09999942779541016,
- 0.2999992370605469, 0.3000001907348633, 0.09999942779541016,
- 0.19999980926513672, 0.3000001907348633, 0.3000001907348633,
- 0.19999980926513672, 0.19999980926513672, 0.19999980926513672,
- 0.3000001907348633, 0.3000001907348633, 0.19999980926513672,
- 0.3000001907348633, 0.3000001907348633, 0.19999980926513672,
- 0.2999992370605469, 0.3000001907348633, 0.19999980926513672,
- 0.3000001907348633
- ],
- "median": 0.19999980926513672,
- "p95": 0.3000001907348633
- },
- "completedMs": {
- "samples": [
- 246.30000019073486, 244.30000019073486, 241.69999980926514,
- 243.30000019073486, 237.39999961853027, 248.39999961853027,
- 244.80000019073486, 244.19999980926514, 237.80000019073486,
- 243.30000019073486, 237.69999980926514, 231.5, 246.4000005722046,
- 241.0999994277954, 243.4000005722046, 241.19999980926514,
- 246.30000019073486, 235.10000038146973, 233.10000038146973,
- 235.39999961853027, 234, 237.69999980926514, 244.19999980926514,
- 246.0999994277954, 239.5, 243.0999994277954, 233.9000005722046,
- 232.69999980926514, 236.0999994277954, 242.60000038146973,
- 234.0999994277954, 233.9000005722046, 234.19999980926514,
- 231.80000019073486, 235.19999980926514, 233.60000038146973,
- 234.5999994277954, 230.9000005722046, 236.89999961853027,
- 240.60000038146973
- ],
- "median": 237.75,
- "p95": 246.30000019073486
- },
- "gpuMs": null,
- "missingGpuSamples": null
- },
- "isolated": {
- "cpuEncodeMs": {
- "samples": [
- 0.10000038146972656, 0, 0, 0, 0.09999942779541016, 0, 0, 0,
- 0.10000038146972656, 0.09999942779541016, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0.09999942779541016, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0.10000038146972656, 0.09999942779541016, 0, 0, 0, 0,
- 0.09999942779541016, 0, 0, 0
- ],
- "median": 0,
- "p95": 0.10000038146972656
- },
- "completedMs": {
- "samples": [
- 0.10000038146972656, 0.19999980926513672, 0, 0.10000038146972656,
- 0.09999942779541016, 0.20000076293945312, 0.09999942779541016, 0,
- 0.10000038146972656, 0.09999942779541016, 0.10000038146972656, 0,
- 0.09999942779541016, 0.10000038146972656, 0.09999942779541016,
- 0.10000038146972656, 0, 0.19999980926513672, 0, 0,
- 0.09999942779541016, 0, 0.10000038146972656, 0.09999942779541016,
- 0.10000038146972656, 0.09999942779541016, 0.10000038146972656,
- 0.10000038146972656, 0.09999942779541016, 0, 0.10000038146972656,
- 0.09999942779541016, 0.10000038146972656, 0.10000038146972656,
- 0.19999980926513672, 0, 0.09999942779541016, 0.10000038146972656,
- 0.10000038146972656, 0.09999942779541016
- ],
- "median": 0.09999942779541016,
- "p95": 0.19999980926513672
- },
- "gpuMs": null,
- "missingGpuSamples": null
- },
- "outputBytes": 0,
- "imageSha256": "9440cf1efcde5d423d22ba1620c50c25db5a21412a28a319807f1b8140eea29a"
- }
- }
- },
- "pixelTestDuration": {
- "before": {
- "milliseconds": [2745, 2733, 2788, 2687, 2783],
- "median": 2745,
- "runs": 5
- },
- "after": {
- "milliseconds": [1739, 1775, 1757, 1744, 1711],
- "median": 1744,
- "runs": 5
- }
- }
-}
diff --git a/docs/screenshots/color-mixer-hue.png b/docs/screenshots/color-mixer-hue.png
deleted file mode 100644
index 3a56e1e..0000000
Binary files a/docs/screenshots/color-mixer-hue.png and /dev/null differ
diff --git a/docs/screenshots/color-mixer-luminance.png b/docs/screenshots/color-mixer-luminance.png
deleted file mode 100644
index f755bb5..0000000
Binary files a/docs/screenshots/color-mixer-luminance.png and /dev/null differ
diff --git a/docs/screenshots/color-mixer-saturation.png b/docs/screenshots/color-mixer-saturation.png
deleted file mode 100644
index 97e712b..0000000
Binary files a/docs/screenshots/color-mixer-saturation.png and /dev/null differ
diff --git a/src/main.tsx b/src/main.tsx
index 24eb95f..91c4583 100644
--- a/src/main.tsx
+++ b/src/main.tsx
@@ -50,8 +50,13 @@ if (root) {
</TooltipProvider>
</GpuProvider>
</GpuBoundary>
- <Analytics />
- <SpeedInsights />
+ {/* Their scripts load from Vercel's CDN; development and tests stay offline. */}
+ {import.meta.env.PROD && (
+ <>
+ <Analytics />
+ <SpeedInsights />
+ </>
+ )}
</>,
);
}
diff --git a/tests/fixtures.ts b/tests/fixtures.ts
index b8d8f53..2873aee 100644
--- a/tests/fixtures.ts
+++ b/tests/fixtures.ts
@@ -4,8 +4,17 @@ export { expect };
export const test = base.extend<{ browserErrors: undefined }>({
browserErrors: [
- async ({ page }, use) => {
+ async ({ page, baseURL }, use) => {
const errors: string[] = [];
+ // Tests run offline: a request beyond the dev server fails the test.
+ const origin = new URL(baseURL ?? "").origin;
+ await page.route(
+ (url) => url.origin !== origin,
+ (route) => {
+ errors.push(`Request outside the app: ${route.request().url()}`);
+ return route.abort();
+ },
+ );
page.on("pageerror", (error) => errors.push(error.message));
page.on("console", (message) => {
if (message.type() === "error") {