Document web UI interactions and content-versioned assets
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015UXA39Sh9coAx4FhRkd8R2
This commit is contained in:
@@ -115,6 +115,12 @@ A custom mastering toolkit that provides metrics to evaluate audio masterings th
|
||||
- A static site: decoding and every metric run in the visitor's tab; nothing is
|
||||
uploaded or stored. Served with `Content-Security-Policy: connect-src 'none'`
|
||||
(`deploy/nginx.conf`), so the page and its worker cannot make network requests
|
||||
- The image versions assets by content: everything but `index.html` is copied to
|
||||
`v/<hash>/` and the page's references rewritten (Dockerfile `assets` stage);
|
||||
nginx serves `v/` immutable and the page `no-cache`. Needed because Cloudflare
|
||||
forces browser caching of .js/.css to 4 h, which paired a fresh index.html with
|
||||
a stale app.js (`Cannot set properties of null`). Source `web/index.html` keeps
|
||||
plain relative paths, so serving `web/` directly still works
|
||||
- `decode.js` — `AudioFile.__init__` counterpart. WAV/AIFF PCM & float are parsed
|
||||
directly with libsndfile scaling (bit-identical to `librosa.load`; Chromium's
|
||||
own WAV decoder scales positive int16 by 1/32767). Other formats go through
|
||||
@@ -133,8 +139,16 @@ A custom mastering toolkit that provides metrics to evaluate audio masterings th
|
||||
metric per request, transfers typed arrays back
|
||||
- `app.js` — `MainWindow` + `AnalysisResultsManager` + renderer: track list,
|
||||
overlay set, per-metric result cache, job queue (foreground jobs jump ahead of
|
||||
background prefetch), uPlot for curves/bands + canvas spectrogram (log axis
|
||||
drawn from linear rows), draggable reference lines per metric, metric hlines
|
||||
background prefetch; LUFS + true peak prefetched first for the metadata
|
||||
panel's loudness summary), uPlot for curves/bands + canvas spectrogram (log
|
||||
axis drawn from linear rows, cached offscreen image). Guide and reference
|
||||
lines are painted in a uPlot draw hook, so dragging a line is a cheap redraw
|
||||
and moves live. One zoom/pan controller serves both renderers: wheel zoom
|
||||
(Ctrl = x only, Shift = y only, over an axis = that axis), rAF-throttled drag
|
||||
pan, double-click reset; `state.zoom` survives redraws and resets when units
|
||||
change. In-plot legend overlay like pyqtgraph's
|
||||
- Font: CSS `--font` stack prefers M PLUS 1 Code, else the system UI font;
|
||||
canvas/uPlot text reads the same variable
|
||||
- `vendor/` — uPlot 1.6.32, vendored (the CSP only allows same-origin scripts)
|
||||
- Needs an HTTP server (module scripts and workers don't load from `file://`),
|
||||
but no secure context — plain `http://` on a LAN works
|
||||
|
||||
Reference in New Issue
Block a user