Skip to content

feat(core): a light show's sequences, and their cues, as operations that take themselves back - #825

Merged
mdwn merged 1 commit into
mainfrom
sequence-ops
Nov 29, 2026
Merged

mdwn merged 1 commit into
mainfrom
sequence-ops

Conversation

@mdwn

@mdwn mdwn commented Nov 29, 2026

Copy link
Copy Markdown
Owner

What changed. edit::light_show gets four operations on the sequences a .light file defines. The cue operations now also work on a sequence's own cues.

  • define_sequence / undefine_sequence: a sequence added (a file's first goes just before its first show) or taken out with its cues and comments. The inverse puts it back between the items it was between. Taking out a sequence that something still plays is checked's to refuse, not the operation's.
  • rename_sequence: renames the sequence and every reference to it, in shows and in other sequences. It refuses a name that can't be written, a name the file defines or refers to already, and a sequence whose name another sequence also has (which references meant which isn't the operation's to say). Those refusals are what make its inverse always apply.
  • set_sequence_head: sets its parameters and length:.
  • The ten cue operations name what they work on by Timeline: on: 0 for a show, on: {"sequence": 0} for a sequence. show: 0, as written before, still reads (serde alias). Moved's cue variants carry on too, and there are new SequenceDefined / SequenceUndefined variants.
  • Sequence::named / new_sequence.

Verified.

  • cargo test -p mtrack-core -p mtrack-rules-wasm: all pass. The examples round trip now covers every sequence too (define at the start and end, undefine, rename, set head, and every cue operation on its cues). New tests cover rename and its refusals, cue edits in a sequence, where a first sequence goes, taking out a sequence that is still played, and the old show wire form.
  • cargo fmt --check is clean. make lint-rust shows only the existing mvr_corpus warning.

Why. The Nonchord mtrack hub edits through these operations. This lets it edit a sequence on a timeline of its own.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VEZZN4nU1eVZwV4ekT2St9

…hat take themselves back

define_sequence, undefine_sequence, rename_sequence (every reference with
it) and set_sequence_head, and the cue operations on a sequence's cues as on
a show's, named by Timeline. A cue operation written with `show` still reads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VEZZN4nU1eVZwV4ekT2St9
@mdwn
mdwn merged commit a62845b into main Nov 29, 2026
24 checks passed
@mdwn
mdwn deleted the sequence-ops branch November 29, 2026 19:27
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.

1 participant