# Owner review 1, phase 5: export panel and Render menu (R3), export options (R8), videos library (R9), final plan ## Context **Owner request.** This is `docs/requests/2026-10-15-owner-review-1.md`, row 5 of the phase table: "R3 export panel and Render menu; R8 export options; R9 videos library (desktop, server API, admin page, copy folder, trash)". Gitea issue #21. It ships as `v0.1.0-rc.13` (owner review 3, phase 3 row). Phase 6 (#22: Docker/Unraid/deploy docs, BRIEF §24, full verification) and `v1.0.0` (#23) follow. - **R3, Export menu.** "Rivedi il menu di esportazione, così occupa troppo e si capiscono bene i dettagli delle esportazioni". The "non" is missing, so the meaning is: the Export tab and the header's Render menu take too much space and do **not** make the export details clear. Make them compact and clearer. - **R8, export options.** The Q&A answer, verbatim: "Advanced encoding (rate control, keyframes, B-frames, profile, standard resolutions); fades and hold last frame; reverse, boomerang and loop; single frame". - **R9, videos library.** Q&A: "Desktop + server, one library". Files: "One list; files stay in each sequence's `exports/` and can be copied (hash-verified) to a separate videos folder (Docker: a `/videos` volume). Delete = trash, never erased." - **Phase 4 answer that still applies.** "The chosen proportions win; the preset adapts its resolution (4K at 9:16 = 2160×3840)". - **Owner review 2 constraints.** - R6: the admin panel manages and never edits. It does not change project settings and does not start renders. Copying, downloading, deleting into the trash and restoring are management actions. - R12: a release at the end of each phase. - Project settings are versioned and portable, and older clients keep unknown members through `[JsonExtensionData]`. A project in a newer format opens read-only. - **Rules from phase 4** (`docs/plans/or1-phase-4.md`, DECISIONS rows dated 2026-11-04): - A new member that changes pixels or timing is declared after the existing members and omitted at its default. - Such a member raises the written format only when it is used. - A list of choices is a string, not an enum. - Routing format: `RenderJobParameters.RequiredSettingsFormat`, `RegisterNodeRequest.SettingsFormat` and `ServerInfo.SettingsFormat`. Older nodes skip a job they cannot read. On an older server the desktop disables push and render with `Tooltips.Server.NeedsNewerServer`. ### What exists today **Render menu in the editor header** - `src/Chronos.App/Sections/SequenceView.xaml:161-169`: `v:SplitButton x:Name="RenderButton"` bound to `RenderText`, `RenderChoices`, `SelectedRenderChoice`, `RenderToolTip` and `RenderChoiceToolTip`. `Ctrl+R` is set at `:55`. - `src/Chronos.App/Editor/EditorViewModel.cs:157`: `RenderChoices = [.. ExportPresets.BuiltIn.Select(p => new Choice(p.Id, p.NameKey))]`. This is a flat list of all **22** built-in presets, with no grouping and no details. It is the "too long" menu. - `:628`: `RenderText` is "Render · ", so the header widens with long preset names. - `:597-617`: `SelectedRenderChoice` (read-only sessions keep `_renderPreset`). - `:623-660`: `RenderExport`, `RenderFormat` and `RenderBlockedReason`. - `:718-733`: `RenderAsync(priority, batch)` goes through `Session.RenderRequests(export)`. - `src/Chronos.Ui/Visuals/SplitButton.cs:117-124`: the menu is a `ContextMenu` with `ItemTemplate` and `DisplayMemberPath` only. It has no separators, submenus or two-line items. **Export step** - `src/Chronos.App/Editor/EditorMeasures.xaml:275-314`: the measure area (`PrefersTallMeasure = true`, `ExportTab.cs:488`) is a `UniformGrid` of 118 px preset cards (`CardColumns`). Each card shows name, Recommended chip, Format, Encoding, Estimate and a batch checkbox. The cards for 22 presets take most of the tall area. - `src/Chronos.App/Editor/EditorPanels.xaml:374-581`: the Output panel is a flat 11-row grid: - Container, Codec, Resolution W×H with aspect, Output size (phase 4, `:460-463`), Frame rate with Auto/Reset, Quality, Encoder with kind, Colour depth, File name, Save to, Sync; - an estimate card (Size, Time, Result) and the Notices list; - a four-row footer: Add to queue with Batch…, Render now (36 px), the history line (History link, Reveal, Send again, Not sent, `HistoryText`), the "Save project file" link and the Restore settings split button. - `src/Chronos.App/Editor/ExportTab.cs` (762 lines): - `Codecs` (`:114-120`) and the commands (`:139-153`); - `Width`/`Height` `EditableField`s (`:148-149`, `LoadBox` `:574-579`); - `OutputSizeText` (`:287-302`), `FrameRates`/Auto (`:307-321`) and `Quality` (Mb/s or 1–100, `:324-345`); - `Encoders` (`:347-368`) and `Depths` (`:370-386`); - `HistoryText` (`:427-429`), `HasUnsent`/`SendAgain` (`:431-465`), `EstimateCardsAsync` (`:636-664`), `EditOverrides`/`EditExport` (`:729-733`) and `ValidateSize` 16..16384. - **Not shown anywhere today:** rate control, keyframe interval, B-frames, profile, frame count, output duration. **Encoding values already modelled end to end** - `ExportOverrides` (`src/Chronos.Core/Project/ProjectSettings.cs:237-256`) already holds `Profile`, `BitRate`, `GopFrames`, `BFrames`, `Quality`, `RateControl` and `Encoder`. - `ExportResolver.Resolve` applies them: it parses RateControl and keeps the GOP in seconds when the fps changes. `Matches` includes them, so editing one makes the export "Custom". - `EncodeSettings` (`src/Chronos.Core/Video/Encoding.cs`) carries them. - The Media Foundation session honours them (`MediaFoundationEncoderSession.cs:205-218, 265-286`). - So **advanced encoding needs UI only**. Nodes from phase 4 and earlier already read these members, so the format does not go up. - **Standard resolutions:** `ExportPresets.Resolutions` (`src/Chronos.Core/Export/ExportPreset.cs:120-124`, 720p…8K) is described as "offered in the Custom editor", but no UI offers it. `RenderSize.Of` (`src/Chronos.Core/Render/RenderSize.cs`) already adapts a W×H box to the chosen proportions (box turned to portrait below a ratio of 1). A standard resolution is therefore just a Width/Height override. **Not modelled at all: fades, hold, reverse, boomerang, loop, single frame** - `RenderPlan.Build` (`src/Chronos.Core/Render/RenderPlan.cs:199-260`) emits `PlannedFrame`s (From/To/Fraction/Duration90k/Slots/Held/Interpolated). - `RenderRun` (`src/Chronos.Core/Render/RenderPipeline.cs:200-228`) loops over `_plan.Frames`, with StarTrails/Median/Mean stacking in plan order. - `EmitAsync` (`:404-434`) calls `FrameFinish.Apply(frame, look, knee)`. `FrameFinish` works in linear light (`src/Chronos.Core/Render/FrameFinish.cs:9-14`, `ImageBuffer` linear float). - `RenderSetup.Workload()` and `Estimate()` count `Plan.Frames`. - GIF writes NETSCAPE2.0 with loop forever, and APNG writes `num_plays` 0, so those two already loop forever in the viewer. - `ImageSequenceSession` (`src/Chronos.Core/Video/Managed/ManagedSessions.cs:211-`) writes a folder `_000001.ext`. No session writes a single still file. **Renders and the "library"** - The `renders` table is in `src/Chronos.Data/Migrations/{sqlite,postgres}/0001_initial.sql:100-115`. `0009_projects.sql` added project/version. The latest migration is `0009`. - There is no hash and no kind column. The `Render` entity (`src/Chronos.Core/Model/Entities.cs:146-167`) has no Sha256. - `RenderRepository` offers Insert/Get/ListBySequence (newest first)/Delete/RebaseFolder. Insert and Delete recount `sequences.rendered_count`. - Renders are index-only (not in sidecars). Render ids are preserved across sync, and `RenderJobHandler.RenderId` is deterministic per job and entry. - On the server, renders are listed **per sequence only**: - `GET /api/v1/sequences/{id}/renders` (`src/Chronos.Server/Api/SequenceEndpoints.cs:51, 394-398`); - the file at `GET /api/v1/renders/{id}/file` (`FileEndpoints.cs:35, 115-122`); - the panel's sequence page section "Renders" with a download link (`src/Chronos.Server/Admin/web/pages/library/sequence.js:89-91, 417-450`). - No endpoint, panel page or desktop view lists all videos. - Nothing deletes a single render except internal code. Nothing copies a render elsewhere. - **Trash:** `.chronos/trash/` holds sequences (`.json` records), `trash/photos/` and replaced files. `TrashKind {Sequence, Photos, Replaced}` is at `src/Chronos.Data/Archiving/SequenceTrash.cs:53-63`, `ListAsync` at `:213-231`. - `EmptyTrash` (JobKind 18) works with a fingerprint and `.pending` journals. - `/archive/trash` endpoints (ManageArchive, `src/Chronos.Server/Api/TrashEndpoints.cs`). - The panel's `pages/library/trash.js` (`kindLabel`/`restoreTip` `:222-227`). - `JobKind` (`src/Chronos.Core/Model/Enums.cs:64-124`) ends at `WorkspaceMove = 23`, so the next free value is **24**. - `ServerCapabilities` (`src/Chronos.Protocol/Dtos.cs:31-38`) has only `Projects`. - `RenderDto` (`src/Chronos.Protocol/Sequences.cs:119-131`) has no hash or kind. - **Server paths:** `ServerOptions` has `CHRONOS_ARCHIVE_PATH` and `CHRONOS_SPACE_PATH` (`src/Chronos.Server/Configuration/ServerOptions.cs:41-42`). There is no videos path. The compose file mounts only `/archive` (`deploy/docker/docker-compose.yml:79`), and so does the Unraid template (`deploy/unraid/chronos.xml:28`). - **Desktop sections:** `SectionKey {Library, Import, Edit, Archive, Jobs, Server, Settings}` (`src/Chronos.App/Shell/SectionViewModel.cs:6-17`), with Ctrl+1…6 in `src/Chronos.App/MainWindow.xaml:18-30`. There is no Videos section. - **Bug found while reading:** `ProcessingJobs.BatchExport` (`src/Chronos.Data/Processing/ProcessingJobs.cs:186-187`) builds a **new** `ExportSettings` with only Preset, NameTemplate and Folder. Any new export member (playback) would be dropped from batch renders. - **Second bug:** `ProcessingJobs.Parameters` (`:190-200`) computes the format from `settings`, the project's own export, rather than from the job's export. Once export members raise the format this would under-route. - **BRIEF §8.6:** only `SHFormatDrive`, `ShellExecute("open", url)` and `ShellExecute("explore", folder)` are allowed. The desktop cannot hand a video to the system player. Playback has to be in-process (WPF `MediaElement`, Windows Media Foundation, the same OS component family the encoder already uses). `MediaPlayer` is used today only in tests (DECISIONS:270). ### Chosen approach (summary) - **R3.** - The header button becomes "Render ▾". Its tooltip carries the full details. - The menu becomes short and structured: Recommended, batch, recent, "Other presets ›" grouped by preset group, Save frame ›, Add to queue, Videos. - The Export step replaces the card grid with a compact, grouped **preset table** whose columns are the details: size, codec, fps, estimated size and estimated time. - The Output panel becomes four **collapsible groups** (Output, Encoding, Playback, File) with a one-line summary when collapsed. - A **sticky footer** holds a summary line, Render now, Add to queue, Batch (n) and the Videos (n) link. - **R8.** - Encoding is UI over the existing overrides: no format change, and older nodes stay compatible. - Playback (direction, loops, fades, hold) is a new `export.playback` section, format **3**, applied by a Core **`OutputProgram`** between `RenderPlan` and the encoder. - Single frame is a still render job (format-3-gated) launched from "Save frame ›". - **R9.** - Migration `0010_videos.sql` adds `renders.sha256`, `renders.kind` and `render_copies`. - One `VideoLibrary` service in Data (list, delete into trash, restore, copy with hash verification), backed by a `VideoCopy = 24` job and a `trash/videos/` area. - Server: `/api/v1/videos` endpoints and the capability `videos`. - Panel: a Videos page. - Desktop: a Videos section that merges local and server videos. - The videos folder is a desktop setting and a server setting (`CHRONOS_VIDEOS_PATH`, `/videos` volume). ## Decisions to record (`docs/DECISIONS.md` rows dated 2026-11-05, added in P0) 1. **Render ▾ without the preset name.** - The header button reads "Render" (Ctrl+R) and keeps a fixed width. - Its tooltip gives the preset, size, codec, fps, estimated size and time, and the blocked reason when there is one. - The menu's checked item shows the current preset. - This supersedes "Render · preset" (`EditorViewModel.cs:628`). 2. **Render menu contents, in this order.** - Recommended preset; the batch presets; up to 3 recent presets (from this sequence's render history); "Other presets ›" submenu grouped by `ExportPreset.Group` (Video, Social, Intermediate, Sequence, Web). - Separator, then Render batch (n), Add to queue, Save frame ›, Videos of this sequence. - Each preset item has a muted details line (size · codec · fps). Estimates are not shown in the menu, because they cost a plan per preset. 3. **Preset table replaces the preset cards** in the Export measure area. - One 28 px row per preset, grouped, with collapsible group headers. - Columns: batch ☐, Name (+ Recommended chip), Size, Codec, fps, Est. size, Est. time. - Clicking a row selects the preset. The checkbox adds it to the batch. - This supersedes the card grid (DECISIONS:149). 4. **Collapsible setting groups** are a new DESIGN §4 pattern. - The header is the group name (Text.Body 600) with a chevron and, when collapsed, a muted one-line summary of the values. - Collapse state is kept per group in app settings (not in the project). - Defaults: Output open, Encoding collapsed, Playback collapsed, File open. 5. **Export footer.** - The footer stays fixed below the scrolling groups. - Summary line: " · ·