feat: phase 5 groundwork (playback format 3, videos contracts, migration 0010, strings)
Lays down every contract the later parcels of owner review 1 phase 5 build on, so they compile against shared types without touching each other's files. - Settings format 3: export.playback (direction, loops, fades, hold), omitted at its default and member by member; RequiredFormat is 3 only while used. - OutputProgram public API with a forward-only body; still-frame job parameters (StillFrame, StillPhoto) routed to format-3 nodes only. - Render.Sha256/Kind, RenderCopy, RenderKind; JobKind.VideoCopy = 24. - Migration 0010 (sqlite, postgres): renders.sha256/kind, ix_renders_created, render_copies without a foreign key. - Videos protocol DTOs, client calls, ServerCapabilities.Videos (declared, not announced yet), ServerSettingsDto.VideosPath. - IVideoLibrary with a NotImplemented stub registered on the server; TrashKind.Videos, VideoTrashNames, VideoErrors. - en and it strings for the whole phase, five icons, decisions 1-22 and the open-question defaults; tests that used format 3 as "newer" now use 4. Refs #21 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
86aa07c1d7
commit
d472dfdec1
67 files changed
+2233
-244
No files matched your search
@@ -734,3 +734,27 @@ One line per decision: date · decision · alternative · reason.
|
||||
| 2026-11-04 | Phase 4 review fixes, routing and gates: render routing sizes a job from its resolved preset box, never from the size posted with it (the posted size only without a preset size); the server's wait for a node re-routes the job as the claim does; the remote editor lets edits happen but refuses to save settings the server cannot read (`NeedsNewerServer` toast); archive sync keeps such settings here (`ServerFormatException`, the row stays LocalAhead with the reason; the server's format is cached for 1 minute, none announced = 1); a workspace push is refused whole, before its first version, when any unpushed version needs a newer home, and Sync's reason includes the unpushed versions; a local render of a workspace project (`RendersLocally`) is not gated by the server's format; the Library's Render on a remote card applies the editor's older-server gate and sizes the job on the project it read, without embedding it (the server renders the sequence's settings of the moment). (Owner review 1, phase 4.) | Let the server refuse | Nothing an older server would store and then fail to render is sent to it, and no job waits for a node that never takes it. |
|
||||
| 2026-11-04 | Phase 4 review fixes, editing: a turn or mirror on one side and a framing edit on the other (crop, keyframes, offsets, aspect, keyframes of waiting photos) are one merge conflict at the orientation member, settled with that side's framing; the derived top-level `version` is no settings difference while both are at most this Chronos's; a quarter turn transposes the aspect text without reducing it (21:9 → 9:21); an out-of-range crop is turned as it renders (clamped first); off-grid crop and keyframe values land on the 12-decimal grid at their first press and the keyframe centre sliders write gridded values; the Rotation row shows the turn as seen (reversed while exactly one of Mirror and Flip is on); Reset framing undoes the orientation press by press so keyframes and aspect stay on their content; the look strength minimum is 1 % and 0 or less clears the look; motion vectors are computed without the look and the knee; the horizon advisor maps its rows through turn, flip, straighten and cover zoom (the mirror moves only columns); inside a box with no slack a press pans while zoomed and the middle button always pans; the selected box shows a 2 px Accent ring; translations of keys whose English meaning changed are deleted (English fallback) instead of new keys. (Owner review 1, phase 4.) | — | Simplest safe choices for the review's findings. |
|
||||
| 2026-11-04 | Project text is written with LF on every OS (`NewLine = "\n"` in the `ProjectJson` source-gen options and in `ProjectSettings.IndentedJson`), so a project's canonical text and content hash are the same on Windows and on the Linux server. Versions already stored keep their text and hash (a Windows build's are CRLF): `ProjectContent.SameChoices` compares both texts with CRLF read as LF (lossless: a raw CR or LF in the JSON is whitespace between tokens), and the places that ask "is this text that version" (the workspace's tip and base, the head a render names, the render job's version, the send's matching version, the history's current marker) use `ProjectContent.MatchesHash`, true for the hash of the text's LF or CRLF form. Integrity checks (`Verifies` of a stored or pushed version, stored hash against stored hash) stay exact. The other indented JSON writers (`AdvisorJson`, `ArchiveJsonIndented`, `WorkspaceJson`, `WorkspaceMoveJson`, the `ProjectBundle` writer, settings files) feed no project hash and are left as they are. | LF only, comparisons exact | With LF alone, every version a Windows build stored would stop matching the text the new build writes: unchanged projects would read as modified at the upgrade. |
|
||||
| 2026-11-05 | Owner review 1 phase 5 (1): the editor header's Render button reads "Render" (Ctrl+R, `Editor.RenderButton`) at a fixed width; its tooltip (`Tooltips.Editor.RenderDetails`) gives preset, size, codec, fps, estimated size and time and the blocked reason; the Render menu's checked item shows the current preset. Supersedes "Render · preset" (`Editor.Render`, removed in phase 5's prune). | Keep the preset in the label (Q3) | The label's width changed with every preset and pushed the header around; the details stay one hover away. |
|
||||
| 2026-11-05 | Owner review 1 phase 5 (2): the Render menu lists, in order, the recommended preset, the batch presets, up to 3 recent presets of this sequence's render history and "Other presets ›" grouped by `ExportPreset.Group`; then a separator, Render batch (n), Add to queue, Save frame ›, Videos of this sequence. Each preset item has a muted size · codec · fps line; no estimates in the menu. | Estimates per item | An estimate costs a render plan per preset; the menu must open at once. |
|
||||
| 2026-11-05 | Owner review 1 phase 5 (3): a grouped preset table (28 px rows, collapsible group headers; columns batch ☐, Name + Recommended chip, Size, Codec, fps, Est. size, Est. time) replaces the preset cards of the Export step; a row click selects, the checkbox adds to the batch. Supersedes the card grid. | Keep the cards | Twenty presets as cards did not fit the measure area; a table compares them. |
|
||||
| 2026-11-05 | Owner review 1 phase 5 (4): collapsible setting groups are a new DESIGN §4 pattern: the header is the group name (Text.Body 600) with a chevron and, collapsed, a muted one-line summary; the state is kept per group in app settings, not in the project. Defaults: Output open, Encoding collapsed, Playback collapsed, File open. | Tabs inside the step | One scroll keeps every value reachable; summaries show the collapsed values. |
|
||||
| 2026-11-05 | Owner review 1 phase 5 (5): the Export footer stays fixed below the scrolling groups with the summary "<result name> · <size> · <time> · <duration> · <frames>", Render now (primary), Add to queue, Batch (n) and the links Videos (n), Reveal, Send again / Not sent. "Save project file" moves to the project ▾ menu; "Restore settings" becomes a row of the File group. Supersedes the earlier footer placement. | Actions inside the groups | The actions stay visible whatever group is open. |
|
||||
| 2026-11-05 | Owner review 1 phase 5 (6): advanced encoding edits the existing `ExportOverrides`, no format raise: rate control VBR/CBR/Quality (H.264, HEVC, AV1), bit rate for VBR/CBR, quality 1–100; keyframes in seconds (0.5–10, step 0.5, or Auto) stored as `GopFrames = round(s × fps)`; B-frames 0–4 or Auto, disabled with a reason for Baseline, MJPEG, GIF, APNG and the image sequences; profiles limited to what the codec and depth allow (H.264 Baseline/Main/High, HEVC Main or Main 10, AV1 Main only). Any edit makes the export Custom (BRIEF §11.4). | New settings members | The overrides already carry every value; older readers keep reading the projects. |
|
||||
| 2026-11-05 | Owner review 1 phase 5 (7): the Resolution choice offers Preset, Source, 720p, 1080p, 1440p, 4K UHD, DCI 4K, 5K, 6K, 8K and Custom; a standard choice writes the landscape box into `Overrides.Width/Height` and `RenderSize.Of` fits the chosen proportions (4K at 9:16 gives 2160×3840). Custom shows phase 4's W×H fields. | Portrait variants of each size | Proportions already win in `RenderSize.Of`; one list serves both orientations. |
|
||||
| 2026-11-05 | Owner review 1 phase 5 (8): playback is `export.playback` `{ direction, loops, fadeIn, fadeOut, holdEnd }` (forward/reverse/boomerang, 1–10, seconds), each member omitted at its default and the object omitted (normalised to null) when all are; settings format 3 (`ProjectSettings.CurrentVersion = 3`, `PlaybackVersion`), `RequiredFormat` is 3 only when the playback is not the default, else phase 4's rule. Lives in the export, so batch presets inherit it. The direction is a string (unknown values read as forward with `Export.Render.DirectionUnknown`). | Playback in Timing; an enum | The export is what a render reads; strings keep an unknown value from a newer Chronos. |
|
||||
| 2026-11-05 | Owner review 1 phase 5 (9): `OutputProgram.Build(plan, playback, frameRate)` turns the plan into the emitted (plan index, duration90k, gain) entries: reverse is the plan reversed; boomerang is forward then back without repeating the turning frame, and from the second loop starts at its second frame; hold extends the last entry; held frames inside a fade split per slot; fades longer than half the program are scaled to fit (`Export.Render.FadesShortened`); each loop is rendered again, and the estimate multiplies by the loop count. | Cache the first pass | Caching a whole pass needs disk the size of the video; renders are already resumable per frame. |
|
||||
| 2026-11-05 | Owner review 1 phase 5 (10): a fade goes to and from black, applied as the last FrameFinish step (after look and knee) in linear light with gain `SrgbToLinear(t)`; "Preview 10 s" does not play fades or direction (Q4). | Fade to white; fade in the preview | Black is the convention of video editors; the preview stays the plan as it is. |
|
||||
| 2026-11-05 | Owner review 1 phase 5 (11): window stacks (median, mean) play in program order; star trails accumulate in program order, so reversed trails grow from the end; boomerang with star trails is disabled with `Tooltips.Export.BoomerangStack` and, when set anyway, renders forward with `Export.Render.BoomerangStack` (Q5). | Trails that shrink on the way back | An accumulator cannot un-add frames without a second pass. |
|
||||
| 2026-11-05 | Owner review 1 phase 5 (12): Save frame › renders the frame under the preview cursor as PNG, JPEG or TIFF 16-bit (Q7) at the export's output size, with every correction and no playback. Job parameters gain `StillFrame` and `StillPhoto` (the photo's sha256 wins) with `RequiredSettingsFormat = 3`, so an older node never renders a whole video instead; the file is the name template + " - " + the 1-based frame number in 4 digits (Q8); recorded as a render with `kind = "still"`, fps 0, duration 0; routed like other renders. | Linear DNG; a separate job kind | A still is a render of one frame: same routing, same history, same videos library. |
|
||||
| 2026-11-05 | Owner review 1 phase 5 (13): migration 0010 (sqlite and postgres) adds `renders.sha256` and `renders.kind` (null = video or image sequence, told apart by the codec), `ix_renders_created` and the table `render_copies (id, render_id, path, sha256, bytes, copied_at, copied_by)` without a foreign key to `renders`. No backfill. | A foreign key | A copy of a server video downloaded to a PC has no local render row, and a copy outlives its render. |
|
||||
| 2026-11-05 | Owner review 1 phase 5 (14): every new single-file render is hashed (sha256) when recorded (RenderJobHandler, workspace ledger and send filing, render uploads); image-sequence folders keep a null hash and are verified file by file when copied; older renders are hashed lazily on their first copy, delete or restore (Q13). | Hash every old render at start-up | Hashing a library of large videos at start-up would take minutes for nothing. |
|
||||
| 2026-11-05 | Owner review 1 phase 5 (15): the videos folder is Settings › Archive › "Videos folder" on the desktop (default `%USERPROFILE%\Videos\Chronos`, `SpecialFolder.MyVideos`) and `videosPath` on the server (locked by `CHRONOS_VIDEOS_PATH`; Docker volume `/videos`, unset by default, copy disabled with `videos_folder_unset`) (Q12). A folder inside the archive root or the workspace is refused. Flat, " (2)" on collisions (Q11). | Per-sequence subfolders | Users browse these files outside Chronos; a flat folder is what a video player lists. |
|
||||
| 2026-11-05 | Owner review 1 phase 5 (16): copying is the job `JobKind.VideoCopy = 24` ("video-copy"), desktop and server, at the IO priority level: check free space; copy to `.incoming-<id>.part` and flush; hash and compare with the source's sha256 (hashing the source first when null); rename without overwrite; record `render_copies`. A mismatch deletes the part file and fails the item; the source is never touched; a server-only video is downloaded through `ISyncRemote.DownloadRenderAsync`. | Copy inline in the request | Copies of large files take minutes; a job shows progress, survives restarts and is cancellable. |
|
||||
| 2026-11-05 | Owner review 1 phase 5 (17): deleting a video moves it to the trash: `POST …/videos/delete` with `dryRun` returns items, bytes, blocked items (a running send/upload/copy, a missing file) and a fingerprint the real call must repeat; the file moves under the sequence lease with a `.pending` journal into `.chronos/trash/videos/<render id>-<ticks>/` with the record `trash/videos/<entry>.json`; the render row goes and `rendered_count` is recounted; copies in the videos folder stay (said in the confirmation); a missing file removes only its row. Entry names are `videos-<render id>-<ticks>`, `TrashKind.Videos` lists as "videos". | Hard delete | Destructive operations are dry-run, verified and reversible (BRIEF); records under `trash/videos/` are never read as sequence records by older builds. |
|
||||
| 2026-11-05 | Owner review 1 phase 5 (18): restoring a video re-hashes the trashed file against its record (refused with `trash_hash_mismatch`), moves it back with a free name if the original is taken, re-inserts the row with the same render id, and fails with `sequence_gone` when its sequence is not in the library; `EmptyTrash` includes video entries in its fingerprint. | Restore with a new id | The same id keeps sync links and copies pointing at the render. |
|
||||
| 2026-11-05 | Owner review 1 phase 5 (19): the server API is `/api/v1/videos`: list and get (Read), delete plan and delete (Delete, audited), copy (Edit, audited, as render uploads) (Q14); restore uses `/archive/trash/{name}/restore` (ManageArchive). Capability `ServerCapabilities.Videos = "videos"` (announced from phase 5's server package); without it the desktop lists local videos only and greys the server group with a reason. `RenderDto` gains `Sha256`, `Kind` (trailing, optional). | A new permission | The existing rights already separate reading, editing, deleting and archive management. |
|
||||
| 2026-11-05 | Owner review 1 phase 5 (20): Videos is a new rail section after Edit on Ctrl+4; Archive, Jobs and Server move to Ctrl+5…7 and Settings stays Ctrl+, (Q1, in the CHANGELOG). It lists local archive renders, the signed-in server's videos and the workspace's unsent renders, de-duplicated by render id (a synced render shows "Here and on server"); workspace renders are read-only rows (Play, Show in folder, Send) with "Not sent" (Q9). No "Remove copy": copies are user files (Q10). | A view inside Library | Videos are the product of every sequence; a section of their own is one click from anywhere. |
|
||||
| 2026-11-05 | Owner review 1 phase 5 (21): desktop playback runs in-process in a player pane of the Videos view: WPF `MediaElement` for MP4/MOV (H.264/HEVC where Windows has the decoder) and an image view for stills, GIF and APNG; when Windows cannot decode the file the pane says "Cannot play here" and Show in folder stays (Q2). No external process (BRIEF §8.6). | Show in folder only | Checking a render without leaving Chronos is the point of the section; MediaElement is part of WPF. |
|
||||
| 2026-11-05 | Owner review 1 phase 5 (22): the admin panel gains a Videos page after Library: list and cards, filters, sort, multi-select, Copy to videos folder, Delete… (dry-run dialog), Download, and Play in an HTML5 `<video>` dialog (the session cookie authorises the GET); restore goes through Library › Trash (kind Videos). No editing and no rendering (owner review 2, R6). | Restore on the Videos page | One trash view for every kind keeps restore in one place. |
|
||||
| 2026-11-05 | Owner review 1 phase 5, open questions without an answer take the plan's defaults: Q1 own section, Ctrl+4; Q2 MediaElement pane with fallback; Q3 "Render" only; Q4 preview stays forward; Q5 reverse trails in program order, boomerang disabled; Q6 loops 1–10, fades 0–30 s (slider 0–10), hold 0–60 s (slider 0–10) (`PlaybackSettings.MaxLoops/MaxFadeSeconds/MaxHoldSeconds`); Q7 PNG, JPEG, TIFF 16-bit; Q8 `<template> - 0123.<ext>`; Q9 unsent workspace renders listed read-only; Q10 no Remove copy; Q11 flat folder; Q12 `%USERPROFILE%\Videos\Chronos`, server unset; Q13 lazy hashing; Q14 copy needs Edit, delete Delete, restore ManageArchive. | Wait for the owner | The brief asks to choose the simplest safe option and continue. |
|
||||
| 2026-11-05 | Phase 5 groundwork (P0) contracts beyond the plan's list: `PlaybackDirection` string constants; `ProjectSettings.PlaybackVersion`; `RenderKind` (`Of(kind, codec)`); `RenderRules.StillFormat`, `StillCodecs` and a still-aware `RequiredFormat` overload; `ProcessingJobs.Still` (working); `RenderJobParameters.IsStill`; trailing optional `Kind` on `RenderResultRequest` and `RenderUploadRequest`; `ServerSettingsDto.VideosPath` (in Protocol, where the DTO lives); `VideoQueryDto`, `VideoCopyResultDto`, `VideoStates`, `VideoSorts`, `VideoBlockReasons`; `VideoErrors`, `VideoLibraryException`, `VideoTrashNames` in Data; `TrashKind.Videos`; `ArchiveService.Videos` (the `NotImplementedVideoLibrary` stub until P2) registered as `IVideoLibrary` on the server. The capability `videos` is declared but not announced until P3 serves the API. The section's strings use `Shell.Nav.Videos` / `Tooltips.Nav.Videos` (the rail builds `Shell.Nav.<key>`), not the plan's `Shell.Section.Videos`; `Editor.Render` stays until P5 moves the header to the existing `Editor.RenderButton`; `Tooltips.Nav.Archive/Jobs/Server` keep Ctrl+4…6 until P7 shifts the shortcuts. Italian follows the repository's terms ("Renderizza", "serie", "Attività", "Modifica"). Until P1 and P2 land, format 3 is written but `OutputProgram` is forward-only and still jobs are not handled by the render job handler. | Exactly the plan's names | Every later parcel compiles against P0 without touching shared files; the names follow the code that reads them. |
|
||||
Reference in new issue
Block a user