Commit Graph

9 Commits

Author SHA1 Message Date
bhursey acf582251f Give every mask its own tone curve.
Local masks could only shift tone globally, so a burnt sky or a backlit face had
to fight the frame-wide sliders. Each mask now carries an RGB point curve,
applied to the masked pixels before the mask blend. All eight curves ride in one
256×8 LUT texture, so the grade shader needs a single extra sampler rather than
eight. Masks saved before this exist migrate to an identity curve, so old edits
keep their look; the render check fails if the curve stops reaching the grade,
and a unit test pins the LUT's identity, per-row isolation and monotonicity.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-11-28 15:42:24 +00:00
bhursey 24deb8e69b Deploy through the predeploy gate instead of by hand.
`npm run deploy` now runs the gate (typecheck, unit suite, render check) before
anything is copied, then rsyncs the source, rebuilds and restarts the service on
the target from LUMINARY_DEPLOY_* variables, and fails if the server is not
serving the same bundle hashes as the reviewed local build. npm runs a script
named predeploy before deploy on its own, so the gate runs once; invoked as
`node scripts/deploy.mjs` the script gates itself. Both scripts exit through
process.exitCode, because process.exit() truncated the failure messages when
they were piped.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-11-28 15:20:18 +00:00
bhursey 4b17ca00db Skip the pre-deploy build when only test files changed.
predeploy was a shell chain that always rebuilt, so a test-only edit paid for a
full Vite build. It is now scripts/predeploy.mjs: typecheck, tests and the render
check always run, and the build is skipped when a content hash of the bundle
inputs (src and public minus test files, plus the Vite/TS/package config) matches
the last successful build. The signature lives in node_modules/.cache, so it is
gitignored and never rsynced to the server.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-11-28 15:02:00 +00:00
bhursey 6e80699829 Show the shadow palette in the clipping legend and pin both overlay checks.
The shadow warning gained per-channel colours but the legend only explained the
highlight palette, so the new marks had no key. The legend now switches to the
shadow palette whenever shadow clipping is on, listing one channel, the three
two-channel colours and all three. The render check also fails if the shadow
overlay stops following Exposure, the way the highlight side already did.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-11-28 14:58:03 +00:00
bhursey a67e9ef458 Name the channels in the shadow clipping warning too.
Shadow warnings were a flat blue, so a single crushed channel looked the same as
all three. The shadow branch now uses the highlight palette: red/green/blue for
one channel, yellow (red+green), magenta (red+blue) and cyan (green+blue) for
pairs, white for all three. The render check covers both ends of the range, and
`npm run predeploy` chains typecheck, tests, the render check and the build so a
shader regression cannot reach a deploy.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-11-28 14:40:50 +00:00
bhursey a6491f6ef6 Show the clipping overlay's per-channel colours and follow the sliders.
The overlay had been collapsed to a single highlight bit, so every warning was
white. It now reads the finished frame per channel again: red for one clipped
channel, yellow for two, white for all three, and it updates as Exposure or
Recovery moves, which is what holding Ctrl is for. The render check renders the
overlay and asserts both the colours and that +6 EV turns a clear band white.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-11-28 14:38:48 +00:00
bhursey fe9d2aff3f Name the clipped channels in the Ctrl clipping overlay again.
0c113e7 packed clipping into two alpha states (shadow / highlight), so the finish
pass could only paint white even though the legend still promised red, green,
blue and yellow. The grade pass now writes a 4-bit code (R/G/B + shadow) into
alpha and the overlay paints the channels it actually lost: red for one, yellow
for two, white for all three. The render check renders the overlay so this
cannot regress silently.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-11-28 14:35:30 +00:00
bhursey 1e7ec0cf15 Add a headless render check for the 16-bit sidecar swap.
The proxy and sidecar reach the GPU through different upload paths, and whether
they agree depends on UNPACK_FLIP_Y_WEBGL being ignored for ImageBitmap. A unit
test cannot see that, so the picture could silently start flipping again. The
check encodes a two-tone sidecar with the server's encoder, serves it beside the
matching JPEG and measures the rows that land in a WebGL2 texture in headless
Chrome.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-11-28 14:30:36 +00:00
bhursey 16456c3c69 Replace the Lensfun WebAssembly runtime with our own lens engine.
The wrapper's wasm, its 5 MB data blob and the runtime chunk were fragile to
serve (CSP, MIME, cache) and pulled an LGPL runtime into the bundle just for
calibration data. The Lensfun XML is now converted at build time into
public/lens-db/profiles.json, and search, matching and the correction maths live
in src/lib/lensDb.ts and src/lib/lensEngine.ts. Maps are pinned against output
captured from the previous implementation, so results are unchanged.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-11-28 05:17:02 +00:00