Skip to content

Composition: layers, bakes and steps on a shot (#275) - #276

Merged
bubulux merged 4 commits into
mainfrom
feat/275-composition
Oct 27, 2026
Merged

bubulux merged 4 commits into
mainfrom
feat/275-composition

Conversation

@bubulux

@bubulux bubulux commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator

Closes #275

What changed

A shot is now a composition: steps (a photo plus an optional framing) and a stack of layers over and under the footage.

  • Model (migration 0030, additive): layers (drawing or adjustment, position relative to the footage, a range of stored steps or every step, frame or photo space) and step_bakes. Timeline clips point at a step (step_id). Overlays are copied into layers; the overlays table stays, unread.
  • Worker: layer routes (strict upserts, 50 per shot), bake upload and image per step, shots embed layers and bakes, timelines embed their clips' own layers. Merge, extract, promote and the bin carry layers along.
  • Studio: the Compose stage replaces Compose and Sequence. It has a layers panel, range control, drawing on the selected layer and the step strip. The Photo stage, cards, timeline stage and clip panel compose live. A background bakery in the shell renders one JPEG per step when the hash changes.
  • Phone: shows the fresh bake of each step, offline too; otherwise the photo with a "Layers not baked yet" tag.
  • Docs: new docs/features/composition.md (replaces sequences.md), compose, timeline, api, data model and known issues updated.

Decisions

As posted on #275: frame-space layers stretch to each step's frame; per-shape masks only; old overlay renders are not reused as bakes; clips can't hide shot layers. One PR with a commit per phase, since phase PRs couldn't each pass CI.

Checked

  • make check green (lint, typecheck, vocab, route and tenancy tests, a unit test running 0030 on SQLite, build dry runs).
  • Migration 0030 applied on a local D1 seeded with overlays, steps and timeline clips, then the API and the Studio clicked through in headless Chrome: Compose stage, layer selection, live composition, bakes created by the bakery, Photo stage, timeline.

Not clicked through

  • Drawing new shapes, range chips, the adjustment slider and Make a sequence with clip layers in the browser.
  • The phone app: bakes, offline copies and the "not baked yet" tag need a phone test.

🤖 Generated with Claude Code

bubulux and others added 4 commits October 27, 2026 12:56
A shot is a composition: drawing and adjustment layers with an order
(below or above the footage), a range of steps and a space (frame or
photo). The Studio bakes one image per step; the phone shows bakes.

- vocab layers.ts: types, strict validation, layersAt, bakeHash; steps
  no longer reference overlays
- migration 0030: layers, step_bakes, timeline_clips.step_id; copies
  overlays into layers, gives overlay-only shots stored steps, points
  clips at steps (tested on a real SQLite)
- Worker: layer routes, bakes, shots embed layers and bakes, clips show
  a step, promotion of clip layers, extract and merge carry layers;
  overlay routes removed
- route tests, tenancy map, API and data-model docs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Compose stage merges the old Compose and Sequence stages: the steps in
  the foot, the selected step composed live on the stage, the layer
  stack top to bottom with the footage in it, drawing on the selected
  layer, ranges (every step, this step, chosen steps), frame or photo
  anchoring, adjustment looks; sketches autosave like everything else
- live composition: adjustment layers as backdrop-filter, drawing
  layers as SVG in photo or frame space; strips and cards show a step's
  bake, with a mark while it is stale
- the bakery bakes stale steps in the background from the shell
- timeline: clips show a step (its layers) plus their own layers,
  edited inline with the same layer editor; Make a sequence keeps the
  steps it can and moves clip layers onto the new steps

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A step with layers shows its fresh bake (the offline copy first), else
the photo with a "Layers not baked yet" tag. Offline days and projects
download the fresh bakes; the compose strip and viewer keep sketches
only (the layers travel in the bakes).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bubulux
bubulux merged commit 33d839a into main Oct 27, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Epic: a shot is a composition (layers with order, range and space; baked per step)

1 participant