Add per-cell source assignment for grid compilations #25
Loading…
Reference in a new issue
No description provided.
Delete branch "d/grid-cell-sources"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
🤖 Claude AI Code Review
Summary
Adds per-cell source assignment mode to grid compilations, replacing the boolean split flag with a
CellContentModeenum and returning a richerGridCompilationResult, plus a duration-mismatch trim dialog.Code Quality ⭐⭐⭐⭐☆
Clean API evolution with good validation guards and test coverage for the new mode and error cases.
Issues
🟡 Home.razor —
GetCellAssignmentfallback can produce out-of-range cell index.CellLabel/GetCellAssignmentare called forcellin[0, _gridLayout), but_gridLayoutcan be a value other than 2/4 in the loop context. Confirm_gridLayoutis always 2 or 4 whenAssignedSourcesis shown;CellNames/BuildCellRectsonly handle 2 and 4, andCellNames(_gridLayout)[cell]will throw for any other value.🟢 ShotcutService.cs —
cellSourceswith a source index not present insourcePlaylistssilently falls back toTargetDurationSeconds = 0viaFirstOrDefault(). Not necessarily a bug (0 = default target), but if a cell is assigned a playlist the user never added tosourcePlaylists, the entries may still be pulled correctly bySelectRandomEntries— worth verifying that an unselectedsourceIndexis actually valid input. No test covers this path.🟢 Home.razor —
ConfirmCellDurationsAsynccomparesEntry.Durationsums, but the render trim usesSetRenderRangeToPlaylistDurationon the shortest playlist while the tractor may include a longer track; ensure this matches the same duration definition used elsewhere (per-frame vs seconds). Minor, likely fine given existing usage.Solid change. Just confirm
_gridLayoutis constrained to 2/4 before theAssignedSourcescell loop renders, sinceCellNameswill throw otherwise.📊 Tokens: 8365 input + 717 output | 💰 Cost: ~$0.0597
Generated by Claude Opus 4.8 via Gitea Actions