Repository navigation
Add Chapter Marker and Camera Background actions - #19
Merged
Merged
Conversation
Actions without a native Meld toggle call had to re-read the session snapshot to pick the value to write, but that snapshot still predates any press made within Meld's autosave debounce, so a quick second press rewrote the first value instead of undoing it. The base class already derives the correct target from the pending optimistic press; hand it to toggle(settings, next) so subclasses never guess. Also adds the optional camera-only `backgroundEffectEnabled` field to LayerItem and to the test SessionBuilder's layer options. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Chapter Marker sends `meld.insertRecordingChapterMarker` through sendCommand. The key lights while Meld is recording; presses are always forwarded because Meld's own CommandAction is disabled outside a recording and drops them itself, so the plugin never second-guesses a flag that can lag the real state. Camera Background toggles (or forces on / off) a camera layer's `backgroundEffectEnabled`, the per-layer "Background" switch in Meld. There is no toggle command for it, so the action writes the value through setProperty. Enable and Disable work against every Meld build that accepts the property; Toggle, live key state and camera-only filtering in the inspector light up once Meld's StreamDeckMapper publishes the field in the layer snapshot. Until then the inspector lists every layer and shows a caution explaining which modes work. Both actions ship key and action icons in the existing style, en / de / pt_BR strings, and node:test coverage against the Meld mock including a Meld restart mid-session. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
WebChannelAPI.md gains the `backgroundEffectEnabled` layer field, the chapter marker commands and a setProperty example. The plugin README's What's New and Change History cover the release; package-lock.json is aligned with package.json (it had been left at 0.6.4.1 by the previous bump). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Replaces the placeholder key and action icons with the designer's set from the Stream Deck Update drop: cameraBg / cameraBg-off and chapterMarker / chapterMarker-off key images at 72 and 144 px, and the matching 20 / 40 px action SVGs. Manifest paths follow. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Pending presses were keyed by the Stream Deck context, so a second key on the same layer, effect or track reasoned from the stale snapshot inside Meld's autosave debounce. For native toggles that only misled the key's paint; for an action that writes an absolute value it lost a press. The pending value is now keyed by the migrated target id, every key on that target repaints when it changes, and retarget / disappear no longer need to clear it. A force press whose current value is unknown is forwarded without painting or remembering the desired state, since no snapshot will ever confirm it. A new canAct() hook lets an action ignore presses outright when the connected Meld cannot carry them out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Once Meld publishes backgroundEffectEnabled, a layer without it is not a camera, so Enable / Disable no longer write to an image or text layer chosen while an older build listed every layer. - Ignore presses when Meld has no setProperty instead of painting a state nothing will confirm. - List vertical scenes in the inspector; the switch belongs to the camera wherever it sits, as with Toggle Layer. - State that writing the property needs Meld Studio 0.10.7.5 or later. - Test legacy behaviour against a snapshot where no layer carries the field, and cover two keys on one camera and mixed Toggle / Enable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
It is kept in the Change History below the main body. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two new actions, plus a base-class fix they surfaced.
meld.insertRecordingChapterMarkerviasendCommand. The key lights while Meld is recording. Presses are always forwarded: Meld's own command is disabled outside a recording and drops them itself, so the plugin does not second-guess a flag that can lag.backgroundEffectEnabled(the per-layer "Background" switch in Meld) throughsetProperty. Blur vs removal stays a device-level setting chosen in Meld.SessionToggleAction.toggle()now receives the resolvednextvalue. Actions without a native Meld toggle were re-reading the snapshot, which still predates a press made inside Meld's autosave debounce, so a quick second press rewrote the first value instead of undoing it. Caught by the new double-press test.Both actions come with key and action icons in the existing style, en / de / pt_BR strings, inspector pages, WebChannelAPI.md updates, README changelog, and a bump to 0.6.5.0 (package-lock.json aligned; it had been left at 0.6.4.1).
Meld-side dependency
Meld's
StreamDeckMapper.cpplayerToMapdoes not yet publishbackgroundEffectEnabled. On Meld Studio 0.10.7.5 and later, Enable and Disable work without it (the property write is accepted; earlier builds have no such property), but Toggle, live key state and camera-only filtering in the inspector need the field. Once Meld publishes it, keys pointing at a non-camera layer (possible when configured against an older build) are never written to. The plugin is forward-compatible: the inspector lists every layer and shows a caution until Meld publishes it, and Toggle logs a warning instead of guessing. The Meld change is one line, adding"backgroundEffectEnabled"tokProperties: MeldStudio/MeldStudio#6985. The chapter marker command currently ignores args, so no marker title can be passed yet.Test plan
npm run typechecknpm test(185 passing, including newtest/chapter-marker.test.tsandtest/background-effect.test.tswith Meld-restart scenarios)npm run buildnpx streamdeck validate co.meldstudio.streamdeck.sdPluginscripts/install.shand try both keys against a running Meld (Camera Background Toggle needs MeldStudio/MeldStudio#6985)Note: the local-only
npm run coveragegate reports functions at 74.96% against a 75% threshold. The shortfall is the never-calledaccepthelper in each@action-decorated file's compiled decorator boilerplate, not uncovered plugin code. CI does not run coverage; threshold left as is for a separate decision.🤖 Generated with Claude Code