Remove target segments, use single color strip source per target

Segments are redundant now that the "mapped" CSS type handles spatial
multiplexing internally. Each target now references one color_strip_source_id
instead of an array of segments with start/end/reverse ranges.

Backward compat: existing targets with old segments format are migrated
on load by extracting the first segment's CSS source ID.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-24 00:00:26 +03:00
parent 9efb08acb6
commit 808037775f
14 changed files with 171 additions and 513 deletions

View File

@@ -447,14 +447,11 @@ function renderDashboardTarget(target, isRunning, devicesMap = {}, cssSourceMap
if (device) {
subtitleParts.push((device.device_type || '').toUpperCase());
}
const segments = target.segments || [];
if (segments.length > 0) {
const firstCss = cssSourceMap[segments[0].color_strip_source_id];
if (firstCss) {
subtitleParts.push(t(`color_strip.type.${firstCss.source_type}`) || firstCss.source_type);
}
if (segments.length > 1) {
subtitleParts.push(`${segments.length} seg`);
const cssId = target.color_strip_source_id || '';
if (cssId) {
const css = cssSourceMap[cssId];
if (css) {
subtitleParts.push(t(`color_strip.type.${css.source_type}`) || css.source_type);
}
}
}