summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcashmere <cashmere@autistici.org>2026-07-26 22:34:11 +0200
committercashmere <cashmere@autistici.org>2026-07-26 22:34:11 +0200
commit3e461c6fd62fcdb3c68a1fdda00bf7f060c09435 (patch)
tree319b490a44c3c6cc58c01ea51960cf7fd43a3bf8
parent4b6caee158a4913f9fda423e4df7f9df2e8a53a0 (diff)
downloadopencut-3e461c6fd62fcdb3c68a1fdda00bf7f060c09435.tar.gz
docs: mark MediaPreview guard done in AGENTS.md
-rw-r--r--AGENTS.md7
1 files changed, 3 insertions, 4 deletions
diff --git a/AGENTS.md b/AGENTS.md
index b9f12437..addf2ddb 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -135,11 +135,10 @@ Behavior details and known limitations:
### Pitfalls
-- `MediaPreview` (`apps/web/src/components/editor/panels/assets/views/assets.tsx`, ~line 449) renders `<Image src={item.url ?? ""}>` for image assets — any image asset without `url` crashes the panel with Next.js console errors. When creating image assets programmatically, always set both `url` (`URL.createObjectURL(file)`) and `thumbnailUrl` (`generateImageThumbnail`). The component itself still lacks a guard; fixing that is an open polish item.
+- `MediaPreview` (`apps/web/src/components/editor/panels/assets/views/assets.tsx`) renders image assets with `item.url ?? item.thumbnailUrl`, falling back to `MediaTypePlaceholder` when neither exists. Still, when creating image assets programmatically, always set both `url` (`URL.createObjectURL(file)`) and `thumbnailUrl` (`generateImageThumbnail`) — the placeholder is a degraded fallback, not a presentation anyone wants.
- New timeline-affecting operations should go through the actions system (`definitions.ts` + `useActionHandler` in `use-editor-actions.ts`) and editor managers (`editor.timeline.*`, `editor.media.*`, `editor.renderer.*`), which wrap everything in undoable commands. MediaTime is a branded ticks type from `@/wasm` — use `mediaTimeFromSeconds`, `addMediaTime`, etc., never raw arithmetic on stored values.
### Open next steps
-1. ~~Commit the freeze-frame work~~ done (`fc0a801e`); ~~single-command undo~~ done (`BatchCommand` + `ShiftSplitRemainderCommand`).
-2. `MediaPreview` empty-`src` guard.
-3. Optional: freeze-duration prompt, per-clip (non-composite) capture, default keybinding.
+1. ~~Commit the freeze-frame work~~ done (`fc0a801e`); ~~single-command undo~~ done (`BatchCommand` + `ShiftSplitRemainderCommand`); ~~`MediaPreview` empty-`src` guard~~ done (thumbnail/placeholder fallback).
+2. Optional: freeze-duration prompt, per-clip (non-composite) capture, default keybinding.