oficina / slides Public

Slides: a clip box is named Clip; AGENTS.md says what clips are

The editor gave the bundle a type label for every block type and the
scene, but none for a clip, so the outline and stage focus called one
by its raw type, "clip". editor.html now has data-type-clip from the
already approved block.clip ("Clip"). TestEveryNewBlockTypeIsNamed
checks the scene's, the clip's and the follow-along code's.

AGENTS.md said video was not built. It now describes clips: the block
and its plays, MP4 or WebM up to 50 MiB with a PNG or WebP poster,
muted, where the poster shows instead, the 1 GiB range cache, the
presenting window's 300 MiB of warming, and the staged route.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev a95147ef5cd7b29fc1dc8ab0d9c987d0bb129c3b parent c40808c
3 files changed, +34 −3
  • AGENTS.md +18 −2
  • internal/slides/templates/editor.html +2 −1
  • internal/slidestest/scenes_editor_test.go +14 −0
diff --git a/AGENTS.md b/AGENTS.md
index 50cde45..131fe6b 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -259,8 +259,24 @@ seeded on first sign-in — and comes back out as a PDF.
outside development). Nothing about a deck is logged.
Not built, and don't write around their absence: charts from Sheets,
-video and embeds, an MCP adapter, aspect ratios other than 16:9,
-comments, and version history. Those are the triggers in spec §9.
+embeds, an MCP adapter, aspect ratios other than 16:9, comments, and
+version history. Those are the triggers in spec §9.
+
+**Clips** are built (`internal/slides/clips.go`, `clipcache.go`,
+`fixtures/clip*.mjs`): a `clip` block plays a video asset, `play` being
+`press`, `loop` or `once`. The video is an MP4 or WebM of 50 MiB at
+most, its kind read from the bytes, uploaded and registered like a
+picture with two more fields: `poster`, the ref of a PNG or WebP of its
+first frame (4 MiB, drawn by the uploader's browser), and `duration`.
+Clips play muted, inline and without controls; wherever a video does
+not play (scripts off, thumbnails, the PDF, the presenter's Next, the
+remote, the editor's stage, and for a reader who asked for less motion
+a loop, a once or a press not yet made) the poster shows. Videos are
+served in ranges from an on-disk, content-addressed cache of 1 GiB,
+read from the store once; a presenting window warms clips one at a
+time, up to 300 MiB; and a staged video goes back only to whoever
+staged it (`GET /d/{sqid}/uploads/{ref}`). There is no sound, no
+trimming and no embed from another site.
`docs/api.md` is the reference for the API, written for a person and an
agent both.
diff --git a/internal/slides/templates/editor.html b/internal/slides/templates/editor.html
index 512e201..8fdd768 100644
--- a/internal/slides/templates/editor.html
+++ b/internal/slides/templates/editor.html
@@ -86,7 +86,8 @@
{{- range .BlockTypes}}
data-type-{{.}}="{{$.L (printf "type.%s" .)}}"
{{- end}}
- data-type-scene="{{.L "block.scene"}}">
+ data-type-scene="{{.L "block.scene"}}"
+ data-type-clip="{{.L "block.clip"}}">
<noscript>
<div rst-callout rst-tone="warning">
<div rst-callout-body>
diff --git a/internal/slidestest/scenes_editor_test.go b/internal/slidestest/scenes_editor_test.go
index fda8d6e..a61b617 100644
--- a/internal/slidestest/scenes_editor_test.go
+++ b/internal/slidestest/scenes_editor_test.go
@@ -234,3 +234,17 @@ func readFixture(t *testing.T, name string) string {
}
return string(b)
}
+
+// TestEveryNewBlockTypeIsNamed: the outline and stage focus name a box
+// by its type's label, read from the editor's data-type-*: a scene, a
+// clip and a follow-along code each have theirs, never the raw type.
+func TestEveryNewBlockTypeIsNamed(t *testing.T) {
+ a := newApp(t)
+ cookies := signedIn(t, a, allowedAddress)
+ page := mustGet(t, a, deckWithSlides(t, a, cookies, 1), http.StatusOK, cookies).Body.String()
+ for _, want := range []string{`data-type-scene="Scene"`, `data-type-clip="Clip"`, `data-type-qr="Follow-along code"`} {
+ if !strings.Contains(page, want) {
+ t.Errorf("the editor has no %s", want)
+ }
+ }
+}