Fixture power budget is editable: Power slot editor + tappable readout - #273
Merged
Merged
Conversation
The power slot shipped with ValueEditorHint::Plain, and struct-shaped
values render read-only in the generic slot editor — so a fixture's lamp
type and budget could not be edited anywhere in Studio, breaking the
power ADR's own correction story ('a budget set too low ... is corrected
in seconds'). The plan assumed the generic editor would provide this for
free; it never handled structs.
Add a Power variant to both hint enums (the Dim2u/Dimensions precedent),
set it on FixturePower's shapes, teach lp-cli's debug formatter the new
variant, and regenerate the schema dumps. Also correct the stale
FixtureDef doc that still claimed absent-means-unlimited.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
PowerSlotField renders a Power-hinted FixturePower struct as a lamp-type picker (LampType::ALL was built 'for building pickers' and never used) plus a budget mA input, read-modify-writing the whole struct through one SetValue exactly like DimensionsSlotField. Zero stays enterable — it is the documented unlimited opt-out — and the read-only form says 'unlimited' rather than '0 mA'. The option-presence cell reserves the ExtraWide tier so presence flips stay geometry-stable. Stories cover the editable and read-only states. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The readout is where limiting announces itself ('limiting to 62%'); the
editor now lives in the advanced drawer's power row. Tapping the readout
dispatches the existing core-owned SetDrawer op so the person the
readout just warned can reach the editor from it. No new chrome — the
line keeps its quiet form, gains a pointer cursor, a hover lift, and a
title hint. Stories pass no node path, so the readout stays inert there.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Covers the whole previously-broken path: the absent power option gains the server default via EnsurePresent, the present value carries the Power editor hint, and a whole-struct SetValue composed the way PowerSlotField composes it lands in fixture.json on save. Also corrects UiFixturePower's stale module doc (default-guarded fixtures do get the readout; only the zero opt-out hides it). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…limit-edit-6ed049 # Conflicts: # lp-app/lpa-studio-core/src/lib.rs
Captured in the pinned CI environment by run: https://github.com/light-player/lightplayer/actions/runs/30738310977
Contributor
CI refreshed the story baselines on this branchThe Review every PNG in the PR's Files changed view (swipe / onion-skin). |
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Yona-Appletree
marked this pull request as ready for review
August 2, 2026 18:41
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.






Problem
The power-limiting slice shipped with no way to edit `FixturePower` anywhere in Studio. The slot renders as an opaque struct in the advanced drawer (the generic slot editor has no struct editing), and the fixture face's readout is display-only — so every fixture is stuck at the 1000 mA default guard unless its project JSON is hand-edited. This breaks the power ADR's own correction story ("a budget set too low dims the show, says so on the fixture card, and is corrected in seconds") and the plan's phase-4 assumption that the budget editor came free with the generic slot editor.
Fix
Follows the `Dim2u`/`Dimensions` precedent exactly:
Validation
🤖 Generated with Claude Code