feat(editor): visual crop, rotate/mirror/flip/straighten, colour looks (owner review 1 phase 4) (#26)
CI / Build and test (push) Successful in 8m19s
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 7s
Release / Build, test and publish (push) Successful in 12m9s
CI / PostgreSQL 16 integration (push) Successful in 7m49s
CI / PostgreSQL 17 integration (push) Successful in 7m19s
CI / Docker image (push) Successful in 46s
Release / Server image (push) Successful in 1m14s
CI / Build and test (push) Successful in 8m19s
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 7s
Release / Build, test and publish (push) Successful in 12m9s
CI / PostgreSQL 16 integration (push) Successful in 7m49s
CI / PostgreSQL 17 integration (push) Successful in 7m19s
CI / Docker image (push) Successful in 46s
Release / Server image (push) Successful in 1m14s
Owner review 1 R5 + R6. Camera rotation, mirror, flip, straighten and crop handles locked to the output; an Exposure Look group; Export output size ("proportions win"); settings format 2 with older-node gates. Also fixes project text and hashes differing between Windows and Linux.
Closes #19
Closes #20
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Alberto Balbo <alberto.balbo.96@gmail.com>
This commit was merged in pull request #26.
This commit is contained in:
1 parent
db389a54f2
commit
188b2c2e55
355 files changed
+10549
-1061
No files matched your search
@@ -701,3 +701,36 @@ One line per decision: date · decision · alternative · reason.
|
||||
| 2026-11-04 | A move's failure and cancel: before the switch, renamed entries go back (if that fails the journal stays and the workspace stays held until Resume) and copies at the target are removed, the journal deleted; a user cancel (running, paused or failed) undoes it the same way. After the switch nothing is undone: a source entry goes only while each file still matches its verified copy (name, size, time), one changed since is kept and logged, one held open keeps the journal, and the job ends Done with `Archive.Log.WorkspaceMoveLeft`; the next run clears the rest. A pause, a yield or closing the program keep the journal. A resumed move does not check for other jobs again. (Owner review 2, R8, phase 5c; review safety-3, tests-3.) | Fail the job after the switch | The target is the workspace by then; refusing to resume would strand a half-done move. |
|
||||
| 2026-11-04 | Jobs and the move: `WorkspaceJobRoots.Resolve` (Data) makes a copy, render or send work in the folder that holds its project now (the one named, a switched move's target, or the folder in use through `CurrentRoot`), and refuses it (`Errors.Workspace.Moving`) while a move of either folder has not switched; a retry after the move then works. The desktop's gate (`WorkspaceHost.IsMoving`: a move job queued, running or paused, followed through `JobChanged` and adopted at start, or a journal in the folder in use) holds checkout, copies, Proxies only, save, sync, conflicts, restore, the picker's lists, rename, delete, Remove local copy, Change, Empty… and the clean-up. A journal at start, also one left in the old folder of a switched move into the folder in use, raises a notice and Settings shows *Resume*; Change… and Move… stay disabled meanwhile, their tooltips saying why. (Owner review 2, R8, phase 5c; review jobs-6, integration-2, integration-3, integration-6, ui-3; final check.) | Gate only the desktop's commands | Engine retries bypassed the gate and wrote into the old folder; choosing another folder before Resume would lose the old copy for good. |
|
||||
| 2026-11-04 | Phase 5c strings: every new key in en and it with final text; 19 unused keys removed from en and it and `i18n prune` removed 144 orphans from the other cultures; `Errors.Workspace.DiskFull` kept (the copy's space check). The Italian move plan, trash and job kind wordings were revised. (Owner review 2, R8, phase 5c; review ui-8, ui-9.) | Keep unused keys for later | Unused keys cost every translation. |
|
||||
| 2026-11-04 | Conditional settings format: `ProjectSettings.CurrentVersion = 2` is the highest format this build reads; `ToJson` writes the lowest format that renders the same (`RequiredFormat`: 2 only when a turn, mirror, flip, straighten or non-identity look is set, otherwise `BaseVersion` 1; a newer project read-only keeps its own number through `WrittenFormat`); `ProjectContent.FormatOf` falls back to 1. (Owner review 1, R5/R6, phase 4.) | Always write 2 | Every project that does not use the new features keeps byte-identical canonical text and hash, so no External versions appear and older builds treat it as before. |
|
||||
| 2026-11-04 | Rule for future settings members: a member that changes pixels and that the previous format would ignore raises the written format only when it is used; it is declared after the existing members, before `Extra`, and omitted at its default; lists that grow are strings, not enums. (Owner review 1, phase 4.) | Bump the format per release | Keeps old text stable and lets an older build carry the member through `Extra` in the same place. |
|
||||
| 2026-11-04 | Orientation members and order: `camera.rotate` 0/90/180/270 clockwise after Exif orientation, then `mirror` (left↔right) and `flip` (top↔bottom) in screen axes after the turn, then `straighten` ±15° positive clockwise; all inside the single warp between stabilisation and the virtual camera. Pixels are never rotated after decode. (Owner review 1, R6, phase 4.) | Rotate the decoded pixels | Stabiliser paths, the sky mask and the horizon stay in raw-frame space and one resample is kept. |
|
||||
| 2026-11-04 | Straighten cover zoom is automatic and never stored: c = cos\|θ\| + max(W'/H', H'/W')·sin\|θ\|, taken on the pixel-centre extents (W'−1)×(H'−1) (`FrameOrientation.CoverZoomOf`); about 1.43× at 15° on 16:9. (Owner review 1, R6, phase 4.) | A user zoom or a clamped border; the edge extents W'×H' | No smeared border can ever show and any crop in [0,1]² stays valid; the pixel-centre extents, slightly larger, put every output pixel centre inside the frame's, so the cover is whole (alpha 1) at ±15°. |
|
||||
| 2026-11-04 | Crop coordinates: `camera.crop` and the keyframe centres are normalised in the view frame T (oriented, straightened, cover-zoomed), which is today's meaning for the identity transform; the crop stays one atomic array in `ProjectMerge`, so a concurrent move and resize give one `camera.crop` conflict. (Owner review 1, R5, phase 4.) | Raw-frame coordinates; per-edge merge | The mask maps 1:1 to the stored crop and a merge never yields a rectangle of the wrong ratio. |
|
||||
| 2026-11-04 | Locked crop: editor edits write the aspect-locked box itself with `offsetX`/`offsetY` 0, so `FitCrop` returns it unchanged; the first edit of a legacy free crop with offsets bakes them in (`FitCrop(crop, ratio, offsets)`); the renderer keeps `FitCrop` as the safety net; an aspect change refits the box (same centre, new ratio, inside the frame). (Owner review 1, R5, phase 4.) | Keep free crops plus offsets | What the user drags is what renders. |
|
||||
| 2026-11-04 | A quarter turn keeps the content: rotate left/right remaps the crop and keyframe centres exactly and transposes a non-square aspect (manual or the Auto's advised value: 16:9 → 9:16); mirror and flip remap crop and centres and negate the keyframe roll; each press is one undo step (`OrientationEdit`). (Owner review 1, R6, phase 4.) | Reset the framing on a turn | The framed subject stays framed. |
|
||||
| 2026-11-04 | Proportions win: when the resolved aspect is not "source", a fixed-size preset is a size box and the aspect is fitted inside it, the box turned to portrait for a ratio below 1 (4K at 9:16 = 2160×3840, 1:1 = 2160×2160, 4:5 = 2160×2700, 21:9 = 3840×1646; 1080p at 9:16 = 1080×1920); "source" keeps the preset's size; sizes stay even for non-managed codecs; `AspectFromPreset` is removed and the preset name does not flip to Custom (`RenderSize`). (Owner review 1, R5, phase 4; for an Auto aspect see the advised-aspect row below.) | The preset ratio wins (crop in the preset frame) | The chosen proportions are what the user asked for; a project at "source" does not change. |
|
||||
| 2026-11-04 | Proportions win is not format-gated in storage: raising the format for it would drift the canonical text of stored projects and spawn External versions; it is gated only in routing and in the desktop's server gating, and the output change is a CHANGELOG upgrade note. (Owner review 1, R5, phase 4.) | Write format 2 for it | Stored projects keep their hash. |
|
||||
| 2026-11-04 | Routing format: `RenderRules.RequiredFormat(settings, export, srcW, srcH)` = max(written format, 2 when the adapted size differs from the preset's fixed size), never written; nodes announce `RegisterNodeRequest.SettingsFormat` (older node = 1); jobs carry `RenderJobParameters.RequiredSettingsFormat`; a claim and the "awaits a node" check skip incompatible nodes. (Owner review 1, phase 4.) | Send every job to every node | An older node never renders a job it would get wrong. |
|
||||
| 2026-11-04 | Server format announcement: `ServerInfo.SettingsFormat` is new (null from an older server = 1); the desktop disables Push and Send-and-render when the required format exceeds the server's, with a tooltip giving the reason (`Tooltips.Server.NeedsNewerServer`). (Owner review 1, phase 4.) | Let the server refuse | The user sees why before acting. |
|
||||
| 2026-11-04 | Colour look: parametric and built in (no LUT files a server or Docker image would lack): a linear-light 3×3 matrix, a contrast power about 0.18 and a lift, blended by strength; applied once per output frame after stacking, interpolation and blur and before the knee (`FrameFinish`), never seen by measuring, flow or stacking; `look.filter` is a string and an unknown name renders as identity with `Export.Render.LookIgnored`. (Owner review 1, R6, phase 4.) | LUT files; look before stacking | Same pixels everywhere, the knee compresses any overshoot, analysis stays on real data. |
|
||||
| 2026-11-04 | No ninth step: the transforms join the Camera step and the look joins the Exposure step (BRIEF §12.3); Alt+1…8, "n / 8" and the 82-px step cells are unchanged. (Owner review 1, phase 4.) | A Transform or Look step | Keeps the eight-step model. |
|
||||
| 2026-11-04 | Raw thumbnails: library, filmstrip, hero and admin-panel covers stay raw photos, without transforms or look. (Owner review 1, phase 4.) | Oriented covers | Thumbnails are frame identity, not output previews, and need no render. |
|
||||
| 2026-11-04 | Preview Source framing: with a non-identity transform the whole T frame is shown without stabilisation or camera pose, so the Camera-step mask is static and maps 1:1 to `camera.crop`; the Export step shows the per-frame output footprint mapped into T (`RenderGeometry.FootprintInView`). (Owner review 1, R5, phase 4.) | Show the raw frame | The mask the user drags is the stored crop. |
|
||||
| 2026-11-04 | Global only: the new settings are not per-frame and not frame-keyed, so there are no new parked positions; the keyframe `Rotation` roll is unchanged. (Owner review 1, phase 4.) | Keyframed straighten or look | Simple, and roll already covers per-frame tilt. |
|
||||
| 2026-11-04 | Phase 4 compatibility: new server + old node: v1 rendered by the node, v2 and proportions-win jobs never sent to it; old server + new desktop: v1 works, v2 push and render disabled with a reason, proportions-win render disabled (push works); new server + old desktop: v1 works, v2 listed and opened read-only, never mirrored or merged, the old desktop's own render uses the preset ratio (known limitation); old desktop local: v2 read-only, a format-1 `.chronos` refuses it, proportions-win renders at the preset ratio (CHANGELOG note). (Owner review 1, phase 4.) | — | Records the matrix the format, routing and gating rows give. |
|
||||
| 2026-11-04 | Phase 4 groundwork details: `ProjectSettings.WrittenFormat` (the format `ToJson` stamps, a newer project's own number); `EditPath.HasHandValues` counts a crop only when not whole (`CropFrame.IsWhole`), which matches today; FrameFinish clamps the look strength to 0..1 (missing = 1) and an unknown look still writes format 2 (it is a newer Chronos's); look names are ordinal and case-sensitive; `OrientationEdit` also remaps offsets and pending keyframes, negates straighten on mirror/flip, normalises rotate to 0..270 and rounds remapped coordinates to 12 decimals so four turns give the original text; the SelfTest geometry and colour checks sit before the robustness checks. (Owner review 1, phase 4.) | — | Simplest safe choices where the plan was silent. |
|
||||
| 2026-11-04 | Proportions win for an Auto aspect too: its advised value is the aspect, and the analysis advises 16:9 or 9:16 for every analysed sequence, so an analysed project at Auto with a fixed box of another ratio changes size (a 3:2 custom box 96×64 renders 96×54; the 1080×1920 vertical preset on a landscape source renders 1920×1080); 16:9 presets on landscape sources are unchanged, and Aspect *Source* keeps the preset's own proportions. (Owner review 1, R5, phase 4.) | Only a manual aspect wins | One rule for the aspect the user sees in the Camera step; *Source* is the way back. |
|
||||
| 2026-11-04 | Crop values: `CropFrame.ToCrop` writes the box on a 12-decimal grid (`CropFrame.Grid`), never −0, and a whole box as no crop; `CropFrame.Of` checks each of the four values for finiteness, as the render's `NormalisedCrop` does; `RenderGeometry.Orientation` is the orientation as rendered (cover zoom, normalised values) for the preview and the tests. (Owner review 1, R5, phase 4.) | Full precision; one finiteness check of the sum | Editor-written crops survive four turns or two mirrors byte for byte; the editor, `RenderSize` and the render read a damaged crop alike. |
|
||||
| 2026-11-04 | The advisor works on the view as shown: `SequenceContext` carries Rotate, Flip and Straighten (`ForCamera`), the aspect is advised on the turned size, and the export resolution advice keeps the source's orientation (proportions win adapts the box anyway); `EditorSession.Optimise` advises again for the camera as it is when its turn, flip or straighten differs from the analysis context, while the findings, the Analysis step and the presets keep the unturned analysis. (Owner review 1, R6, phase 4.) | Advise on the raw frame | Optimise after a quarter turn would otherwise put the unturned 16:9 back over the transposed aspect. |
|
||||
| 2026-11-04 | Look values (`LookFilter`, the plan gave none): a saturation k and tint gains normalised to luminance 1 (Rec.709), a contrast power about the pivot 0.18, a lift: mono k 0; sepia tint (1.30, 0.97, 0.62), k 0, power 1.05; warm tint (1.10, 1.00, 0.86), k 1.05; cool tint (0.90, 1.00, 1.14); vivid k 1.35, power 1.12; muted k 0.6, power 0.92; fade k 0.8, power 0.85, lift 0.025. The power applies only to values above 0 (zero, negative and NaN pass), the lift and the strength blend to every value; the last pixels of a row go through the vector kernel padded with zeros; a public scalar `Apply(filter, strength, r, g, b)` in double is the reference the tests use; a strength above 1 reads as 1, and NaN or non-positive strength, a one-channel image, none, null or an unknown name leave the image as it is; an alpha channel is never touched; the look table is internal. (Owner review 1, R6, phase 4.) | User-tuned parameters; a scalar tail loop | Eight fixed looks are enough for the request; a pixel's result never depends on where it lies, and nothing the knee or a negative value would break is raised to a power. |
|
||||
| 2026-11-04 | Render routing and errors: unreadable or newer sequence settings give no routing (the job keeps its posted size and format 1) and the render then fails with `Errors.Render.NewerSettings`, which `ProjectStore.Parse` gives in the user's language (the original exception kept inside); a job's `RequiredSettingsFormat` is the higher of the posted and the computed one; `ProcessingJobs.RequiredFormat` takes the highest over a batch's presets, and the editor's `RenderBlockedReason` uses it. (Owner review 1, phase 4.) | Validate settings on the server | The server stays free of settings validation; the job that cannot render says why. |
|
||||
| 2026-11-04 | Encoder limits are long edge × short edge (`EncoderSelector.Takes`) in `EncoderSelector` and the Media Foundation provider: on this PC the software H.264 MFT announces 4096×2304 and encodes 2160×3840; `Fit` caps a portrait frame against the turned limit. A node registered with settings format 2 or more has its limits read either way round; an older node is checked against its limits exactly as announced. (Owner review 1, R5, phase 4.) | Portrait limits of their own | Measured on the development PC; an older node may not encode portrait. |
|
||||
| 2026-11-04 | Desktop gates against an older server: the push gate compares the project's `WrittenFormat` (and, after the review, its unpushed versions') with the home's `SettingsFormat` (`IProjectHome.SettingsFormat`, a default member giving `CurrentVersion`, so local and archive homes need no change; `ServerProjectHome` takes it as an optional argument); while the push is blocked the whole *Sync* command is disabled, pull included; *Send and render* is held with an error toast (*RenderHeld* with the `NeedsNewerServer` text). (Owner review 1, phase 4.) | Pull while push is blocked | A pull's merge could push. |
|
||||
| 2026-11-04 | Crop on the preview: editable only on the Camera step with the mask on, an editable project not of a newer format, frames to show, and the preview showing the project's orientation (after a turn, mirror, flip or straighten the box waits for the rendered frame; a crop, aspect or preset change moves it at once); on the Camera step the box is `EditableCrop`, on the others the output footprint (`FootprintInView`); a commit writes `CropFrame.ToCrop(box)` with the offsets 0; a drag ends its own undo step (`EndEditRun`), nudges merge under `Camera.Crop` until the key goes up; the arrows nudge only once the box is selected (a press on it or Enter; Esc, a press outside or losing focus give the arrows back to the frames); the automation value is read-only, exposed only while the box is editable; every `PreviewViewport` needs a tooltip (`xaml-lint`), so the full-screen preview has `Tooltips.Editor.Preview.View`. (Owner review 1, R5, phase 4.) | Arrows always nudge | Left and right keep stepping frames as before; the box never shows over a picture not yet turned. |
|
||||
| 2026-11-04 | Camera step rows: the crop refit (`KeepCropLocked`) runs in `EditorSession.Edit` and `Optimise` and refits only a box already held to the old ratio without offsets; a legacy free crop, or one placed by Offset X/Y, is left to the render's `FitCrop` and baked into a held box at its first Crop size/X/Y edit (offsets then 0); without a source size the lock ratio is worked out on a 1×1 view; Straighten is stored rounded to 0.1°, never −0, shown `−1.2°` or `0°`, and drives `Editor.IsStraightening` from XAML only (`SliderActivity`, OneWayToSource); *Reset framing* sits on its own line above *Optimise section* · *Reset*, disabled with `ResetFramingNone` when nothing is set. (Owner review 1, R5/R6, phase 4.) | Reset framing in the button row | Three buttons do not fit the 292 px panel; a framing set before this release renders as before until it is edited. |
|
||||
| 2026-11-04 | Look and Export rows: the look is null when the filter is None, a strength of 100 % is stored as null, and the look's unknown members (`Extra`) are kept; *Output size* reads `W × H`, marked *capped* when the encoder shrank it (1 px allowed for rounding to even), its tooltip giving the encoder's maximum turned to the output's orientation, or the encoded size when a codec level capped it; Width and Height load the resolved preset box, empty for a side the preset leaves to the source, never the encoded size. (Owner review 1, R5/R6, phase 4.) | Width and Height show the encoded size | The fields edit the box the proportions are fitted in. |
|
||||
| 2026-11-04 | Phase 4 visuals the plan left open, in DESIGN.md and the mockups: the editable box outline in Accent, Shown and Locked keeping the 1 px TextMuted outline on the Scrim; rule-of-thirds lines 1 px Text at 50 %, the straighten grid 1 px Text at 30 %; the switch 36 × 20 (off TextMuted, on Accent with an OnAccent knob); a panel group header is a Stroke divider and the name in Text.Body 600; plain number rows on the Accent track; *Output size* drawn in `Export.html` (a 9:16 project, 2160 × 3840), `Editor.html` holding the Exposure screen, a Camera screen and the crop states one below the other. (Owner review 1, R5/R6, phase 4.) | A new mockup file per step | One file per existing screen. |
|
||||
| 2026-11-04 | Phase 4 strings, icons and captures: keys beyond the plan (`Server.Setting.Look`, `Tooltips.Editor.Camera.ResetFramingNone`, `Tooltips.Editor.NotApplicable.NoLook` and `NoSlack`, `Tooltips.Editor.Look.Group`, `Editor.Export.Capped` with `Tooltips.Editor.Export.OutputCapped`, `Editor.Preview.CropValue`); removed from en and it, then `i18n prune`: `Editor.Camera.CropLeft/Top/Right/Bottom`, `Editor.Camera.OffsetX`, `Tooltips.Editor.Camera.OffsetX/OffsetY`, `Tooltips.Editor.Camera.Crop`, `Export.Render.AspectFromPreset`; `Editor.Camera.OffsetY` kept (it names the advisor's horizon placement); the 60 new strings translated into the 36 other languages. The five orientation icons are desktop-only (no admin `icons.js` entry) and never mirror in right-to-left languages. Three new capture scenes on the Sunset sample at frame 45, after the per-theme editor loop: `edit-camera-crop` (a moved 9:16 box), `edit-camera-straighten` (turned right, straightened, the grid on) and `edit-exposure-look` (Sepia, the wipe on, the panel scrolled to the Look rows); 31 baselines accepted. (Owner review 1, phase 4.) | — | Records what the strings, icons and screenshots hold. |
|
||||
| 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. |
|
||||
Reference in new issue
Block a user