oficina / slides Public

Slides: clip review fixes: disk cache, poster limit, description, steps

A video from a store that cannot seek is read once into a 1 GiB LRU
cache on disk (clipcache.go), its hash checked against its ref, and
every range is served from that file; nothing holds a whole video in
memory. Presenting windows warm clips one at a time, streaming and
dropping each body, and stop at 300 MiB; no slide waits for them.

A poster is at most 4 MiB at registration (poster_too_large), drawn as
WebP at 0.85 and checked before upload (clip-poster.mjs). A clip block
takes the image's description control, and its poster's text in HTML
and the PDF is the block's, as a picture's is. Play-through hides a
loop or once clip until its step; only a press clip keeps its poster.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev ca5f92b43b05c90bdca4c43c069d40152f368ed6 parent 4b9620a
23 files changed, +816 −146
  • docs/api.md +10 −8
  • fixtures/clip-poster.mjs +62 −0
  • fixtures/play-through.mjs +3 −2
  • fixtures/play-through.test.mjs +35 −0
  • fixtures/talk-store.mjs +40 −10
  • fixtures/talk-store.test.mjs +73 −0
  • fixtures/uploads.mjs +5 −50
  • fixtures/uploads.test.mjs +13 −0
  • internal/slides/assets.go +43 −9
  • internal/slides/clipcache.go +195 −0
  • internal/slides/clipcache_test.go +79 −0
  • internal/slides/clips.go +51 −36
  • internal/slides/config.go +5 −0
  • internal/slides/credits/assets.json +2 −2
  • internal/slides/handlers.go +6 −0
  • internal/slides/layout/blocks.go +8 −2
  • internal/slides/render/render.go +9 −3
  • internal/slides/static/{editor.0ab3dbd199db90f3.js => editor.b888c75c114f9ea3.js} +18 −18
  • internal/slides/static/presenter.2ea1ee79c6346122.js +0 −5
  • internal/slides/static/presenter.e325871d9ceea5a4.js +5 −0
  • internal/slides/templates/editor.html +2 −1
  • internal/slidestest/clips_browser_test.go +8 −0
  • internal/slidestest/clips_test.go +144 −0
docs/api.md

Loading diff…

fixtures/clip-poster.mjs

Loading diff…

fixtures/play-through.mjs

Loading diff…

fixtures/play-through.test.mjs

Loading diff…

fixtures/talk-store.mjs

Loading diff…

fixtures/talk-store.test.mjs

Loading diff…

fixtures/uploads.mjs

Loading diff…

fixtures/uploads.test.mjs

Loading diff…

internal/slides/assets.go

Loading diff…

internal/slides/clipcache.go

Loading diff…

internal/slides/clipcache_test.go

Loading diff…

internal/slides/clips.go

Loading diff…

internal/slides/config.go

Loading diff…

internal/slides/credits/assets.json

Loading diff…

internal/slides/handlers.go

Loading diff…

internal/slides/layout/blocks.go

Loading diff…

internal/slides/render/render.go

Loading diff…

internal/slides/static/{editor.0ab3dbd199db90f3.js => editor.b888c75c114f9ea3.js}

Loading diff…

internal/slides/static/presenter.2ea1ee79c6346122.js

Loading diff…

internal/slides/static/presenter.e325871d9ceea5a4.js

Loading diff…

internal/slides/templates/editor.html

Loading diff…

internal/slidestest/clips_browser_test.go

Loading diff…

internal/slidestest/clips_test.go

Loading diff…