Notation set and Annotations (#43) #93

Merged
crowmaki merged 2 commits from issue-43-notation into main 2026-10-08 08:05:17 +00:00
Owner

Closes #43. Part of #24.

What

  • Notation set. Each Project has its own set, copied from the app defaults when the Project is made. A new notation field in defaults.json defaults to the built-in set. Older Projects get the built-in set in migration V15.
    • Each entry is drawn with one glyph from a fixed library of 12: push in, pull out, pan, tilt, dolly, truck, crane, handheld, move, turn, enter, exit.
    • Name, colour, category, key and meaning are editable on Project settings → Notation.
    • Removing an entry that a Board uses retires it. Old Boards keep it and its read-back, but it cannot be placed anew. A retired entry can be restored, and it frees its name and key.
  • Annotations. Each Panel has a separate Annotation layer, stored as JSON with positions normalized to the Panel's canvas. There are two kinds of mark:
    • A Notation symbol. It has a subject (a Character the Setup frames, or someone) and, for directional glyphs, a direction.
    • A freehand arrow.
  • Read-back is computed in the core. Examples: "MARK moves right", "the camera pans left", "MARK enters frame from the left".
    • Direction is judged on the canvas in pixels.
    • Pans and trucks read left or right. Tilts and cranes read up or down.
    • Moves and dollies along the depth axis read as away/toward and in/out.
    • Enters frame names the side the subject comes in from.
    • A freehand arrow reads as meaningless.
  • Board editor.
    • A Sketch/Annotate switch (Tab) swaps the toolbar.
    • In Annotate mode there are Select and Freehand arrow tools, a symbol palette (entry keys pick symbols) and subject chips.
    • A read-back list under the stage flags freehand arrows ("No meaning"). Each one can be converted to a symbol.
    • Timeline thumbnails show the marks.
  • Guards on save. A save checks annotations: the entry must exist, the direction must match the glyph, positions must be inside the canvas, and the subject must be in the Setup. Entries and subjects that the Board already used are carried over, even if they have since been retired or left the Setup. A Character that an annotation names cannot be deleted.

Not in this PR

  • Compositing the Annotation layer into the image sent to H3, and the clean-sketch toggle, belong to #47 (slot budget). board_images still sends the Sketch only.
  • Turning read-backs into prompt directions with <Subject N> belongs to #48. It can call the same sentence function with its own subject names.

Testing

  • cargo test --workspace --all-features
    • tests/notation.rs has 27 tests: seeding, edits, retirement and restore, annotation save rules, read-back sentences, migration of an older file, and merges.
    • The smoke test covers the RPCs.
  • bun test src: 88 tests, including the new annotations.test.ts.
  • bun run check is clean.
  • Checked in the running app: the Tab switch, placing symbols, the read-back list, converting a freehand arrow, saving, and retiring an entry from settings while the Board keeps its read-back.
Closes #43. Part of #24. ## What - **Notation set.** Each Project has its own set, copied from the app defaults when the Project is made. A new `notation` field in `defaults.json` defaults to the built-in set. Older Projects get the built-in set in migration V15. - Each entry is drawn with one glyph from a fixed library of 12: push in, pull out, pan, tilt, dolly, truck, crane, handheld, move, turn, enter, exit. - Name, colour, category, key and meaning are editable on **Project settings → Notation**. - Removing an entry that a Board uses **retires** it. Old Boards keep it and its read-back, but it cannot be placed anew. A retired entry can be restored, and it frees its name and key. - **Annotations.** Each Panel has a separate Annotation layer, stored as JSON with positions normalized to the Panel's canvas. There are two kinds of mark: - A Notation symbol. It has a subject (a Character the Setup frames, or someone) and, for directional glyphs, a direction. - A freehand arrow. - **Read-back** is computed in the core. Examples: "MARK moves right", "the camera pans left", "MARK enters frame from the left". - Direction is judged on the canvas in pixels. - Pans and trucks read left or right. Tilts and cranes read up or down. - Moves and dollies along the depth axis read as away/toward and in/out. - Enters frame names the side the subject comes in from. - A freehand arrow reads as meaningless. - **Board editor.** - A Sketch/Annotate switch (Tab) swaps the toolbar. - In Annotate mode there are Select and Freehand arrow tools, a symbol palette (entry keys pick symbols) and subject chips. - A read-back list under the stage flags freehand arrows ("No meaning"). Each one can be converted to a symbol. - Timeline thumbnails show the marks. - **Guards on save.** A save checks annotations: the entry must exist, the direction must match the glyph, positions must be inside the canvas, and the subject must be in the Setup. Entries and subjects that the Board already used are carried over, even if they have since been retired or left the Setup. A Character that an annotation names cannot be deleted. ## Not in this PR - Compositing the Annotation layer into the image sent to H3, and the clean-sketch toggle, belong to #47 (slot budget). `board_images` still sends the Sketch only. - Turning read-backs into prompt directions with `<Subject N>` belongs to #48. It can call the same `sentence` function with its own subject names. ## Testing - `cargo test --workspace --all-features` - `tests/notation.rs` has 27 tests: seeding, edits, retirement and restore, annotation save rules, read-back sentences, migration of an older file, and merges. - The smoke test covers the RPCs. - `bun test src`: 88 tests, including the new `annotations.test.ts`. - `bun run check` is clean. - Checked in the running app: the Tab switch, placing symbols, the read-back list, converting a freehand arrow, saving, and retiring an entry from settings while the Board keeps its read-back.
The Project has a Notation set, copied from the app defaults when it is
created (a Project from before gets the built-in set when it migrates).
Each entry is drawn with a glyph from a fixed library of twelve and has
an editable name, colour, category, key and meaning. Removing an entry
that a Board uses retires it: old Boards keep it and its meaning, but it
cannot be placed anew, and it can be restored. The set is edited on the
Notation page of Project settings.

Each Panel has an Annotation layer, stored as JSON with positions
normalized to the Panel's canvas: Notation symbols with a subject (a
Character the Setup frames, or someone) and, for directional glyphs, a
direction; and freehand arrows, which mean nothing until converted. The
core reads each symbol back as a sentence such as "MARK moves right",
judging direction on the canvas; enters frame names the side it comes
from. A save checks the annotations, keeping entries and subjects the
Board already used. A Character an annotation names cannot be deleted.

The Board view gets a Sketch/Annotate switch (Tab) that swaps the
toolbar, symbol keys, subject chips, and a read-back list under the
stage that flags freehand arrows and converts them to symbols.
Pans and trucks read left or right, and tilts and cranes up or down,
however the arrow leans. The subject picked for new character symbols
only counts while the Shot's Setup frames them, so moving to another
Setup falls back to someone instead of a subject the save refuses. A
subject's name takes one hop to the merge survivor, the toolbar keys
and chips use the design tokens, and a missing entry draws in red.
crowmaki deleted branch issue-43-notation 2026-10-08 08:05:17 +00:00
Sign in to join this conversation.
No description provided.