# Custom UI replacement Last updated: 2026-05-12 ## What changed The active interface is a custom browser UI served from `web/` by the FastAPI app in `app.py`. The old Gradio files live in `legacy/` and are no longer used by the active application. ## UX goals 1. Match the supplied minimal reference image as the default view: file identity, one purple extract action, large waveform, compact right controls, and sample cards. 2. Keep the first screen focused on extraction and audition, not pipeline/debug/editor internals. 3. Preserve advanced workstation features behind a single secondary `Review & edit` workbench. 4. Keep stage timing, logs, run history, and semantic supervision available without dominating the default layout. 5. Make `stem=all` and `online_preview` available as advanced presets instead of primary controls. 6. Keep the frontend deployable without a JavaScript build step until the interaction model stabilizes. ## Pass 6 visual simplification The UI was first restyled to the supplied minimal reference direction: - light native-feeling canvas instead of the previous dark dashboard; - compact top bar with file selector/status and one primary purple `Extract Samples` action; - large waveform-first workspace with colored lollipop onset markers; - right-side control card for the primary extraction decisions; - advanced DSP/model parameters moved into a collapsible panel; - representative samples rendered as auditionable cards with waveform thumbnails; - pipeline, run history, supervision, and raw tables kept available as collapsible utility panels. ## Pass 7 reference-alignment hardening This pass closed the visual fidelity gaps from the previous approximation: - removed the visible waveform header so the canvas is quiet like the reference image; - replaced separate native stem/reconstruction audio controls with one minimal transport row: play button, time, progress line, and Source/Stem/Reproduced preview modes; - renamed the right card to `Common controls` and limited it to stem, hit sensitivity, sample groups, plus fast-preview/best-quality presets; - collapsed pipeline/history/supervision/tables into one `Review & edit` workbench below the sample cards; - hid selected-hit/sample audio elements from the default layout while preserving click-to-audition behavior; - tightened card spacing, border radii, font scale, waveform height, and sample-card proportions to better match the supplied image. The UI is still not a pixel-for-pixel clone because it must remain functional across arbitrary audio files and preserve the project’s editing tools, but the default screen is now intentionally aligned with the reference composition. ## Pass 8 fixed workstation layout This pass responds to the no-scroll workstation requirement and the missing-upload affordance: - the document body is fixed to the viewport with `overflow: hidden`; - the app uses a top bar, left sidebar, center workspace, right sidebar, and bottom dock; - pipeline/history/selection tools moved into the left sidebar; - extraction/export/advanced controls moved into the right sidebar; - semantic review/edit tools and raw tables moved into the bottom bar; - all long content now scrolls only inside its own panel; - the upload affordance is now an explicit `Upload audio` button in the top bar; - dropping a file anywhere on the app loads it and shows a full-screen drop overlay while dragging. ## UI structure | Area | Purpose | |---|---| | Top bar | App identity, explicit upload button, selected-file metadata, backend status, and one primary purple `Extract Samples` action. | | Left sidebar | Source/drop guidance, selected-hit/sample context, pipeline logs, and run history. | | Center workspace | Quiet waveform canvas, Source/Stem/Reproduced transport row, and representative sample cards. | | Right sidebar | Common controls, exports, and collapsed advanced parameters grouped by stem separation, hit detection, grouping, export, and cache. | | Bottom dock | Review/edit semantic supervision tools and raw tables in expandable panels. | ## Frontend implementation Files: - `web/index.html` - `web/styles.css` - `web/app.js` The frontend uses modern browser APIs directly: - `fetch` for API calls. - `FormData` for upload. - `