KC test uses shared LiveStreamManager, tree-nav dropdown, KC card badge fix

- KC test WS now acquires from LiveStreamManager instead of creating its
  own DXGI duplicator, eliminating capture contention with running LED targets
- Tree-nav refactored to compact dropdown on click with outside-click dismiss
  (closes on click outside the trigger+panel, not just outside the container)
- KC target card badge (e.g. "Daylight Cycle") no longer wastes empty space

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-18 14:50:33 +03:00
parent 6a31814900
commit 1f047d6561
4 changed files with 346 additions and 365 deletions
@@ -36,6 +36,7 @@
.stream-card-props {
display: flex;
flex-wrap: wrap;
align-items: flex-start;
gap: 6px;
margin-bottom: 8px;
}
@@ -59,7 +60,7 @@
}
.stream-card-prop-full {
flex: 1 1 100%;
max-width: 100%;
min-width: 0;
white-space: nowrap;
overflow: hidden;
+186 -224
View File
@@ -1,22 +1,20 @@
/* ===========================
Tree Sidebar Navigation
Tree Dropdown Navigation
=========================== */
.tree-layout {
display: flex;
gap: 20px;
align-items: flex-start;
flex-direction: column;
gap: 0;
}
.tree-sidebar {
width: 210px;
min-width: 210px;
flex-shrink: 0;
position: sticky;
top: calc(var(--sticky-top, 90px) + 8px);
max-height: calc(100vh - var(--sticky-top, 90px) - 24px);
overflow-y: auto;
padding: 4px 0;
top: var(--sticky-top, 90px);
z-index: 20;
padding: 8px 0 4px;
/* dropdown panel positions against this */
/* sticky already establishes containing block, but be explicit */
}
.tree-content {
@@ -24,62 +22,144 @@
min-width: 0;
}
/* ── Group ── */
/* ── Trigger bar ── */
.tree-group {
margin-bottom: 2px;
}
.tree-group:first-child > .tree-group-header {
margin-top: 0;
}
.tree-group-header {
display: flex;
.tree-dd-trigger {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 6px 10px;
padding: 5px 10px;
cursor: pointer;
user-select: none;
font-size: 0.72rem;
font-weight: 700;
color: var(--text-muted);
border-radius: 6px;
transition: color 0.15s, background 0.15s;
text-transform: uppercase;
letter-spacing: 0.05em;
margin-top: 6px;
}
.tree-group-header:hover {
color: var(--text-color);
border: 1px solid var(--border-color);
border-radius: 8px;
background: var(--bg-secondary);
user-select: none;
font-size: 0.82rem;
color: var(--text-color);
transition: border-color 0.15s, background 0.15s;
}
.tree-chevron {
font-size: 0.5rem;
width: 10px;
display: inline-block;
flex-shrink: 0;
transition: transform 0.2s ease;
color: var(--text-secondary);
.tree-dd-trigger:hover {
border-color: var(--primary-color);
background: color-mix(in srgb, var(--primary-color) 6%, var(--bg-secondary));
}
.tree-chevron.open {
transform: rotate(90deg);
.tree-dd-trigger.open {
border-color: var(--primary-color);
}
.tree-node-icon {
.tree-dd-trigger-icon {
flex-shrink: 0;
line-height: 1;
}
.tree-node-icon .icon {
.tree-dd-trigger-icon .icon {
width: 14px;
height: 14px;
}
.tree-node-title {
.tree-dd-trigger-title {
font-weight: 600;
white-space: nowrap;
}
.tree-dd-trigger-count {
background: var(--primary-color);
color: var(--primary-contrast);
font-size: 0.6rem;
font-weight: 600;
padding: 0 5px;
border-radius: 8px;
min-width: 16px;
text-align: center;
}
.tree-dd-chevron {
font-size: 0.65rem;
color: var(--text-muted);
transition: transform 0.2s ease;
margin-left: 2px;
}
.tree-dd-trigger.open .tree-dd-chevron {
transform: rotate(180deg);
}
.tree-dd-extra {
display: inline-flex;
align-items: center;
gap: 4px;
margin-left: 6px;
border-left: 1px solid var(--border-color);
padding-left: 8px;
}
/* ── Dropdown panel ── */
.tree-dd-panel {
display: none;
position: absolute;
top: 100%;
left: 0;
min-width: 240px;
max-width: 340px;
max-height: 70vh;
overflow-y: auto;
background: var(--bg-color);
border: 1px solid var(--border-color);
border-radius: 8px;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
z-index: 100;
padding: 4px 0;
margin-top: 4px;
}
.tree-dd-panel.open {
display: block;
}
/* ── Group header (non-clickable category label) ── */
.tree-dd-group-header {
display: flex;
align-items: center;
gap: 6px;
padding: 6px 12px 3px;
font-size: 0.68rem;
font-weight: 700;
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: 0.04em;
user-select: none;
}
.tree-dd-group-header.tree-dd-depth-1 {
padding-left: 24px;
font-size: 0.72rem;
font-weight: 600;
text-transform: none;
letter-spacing: normal;
}
.tree-dd-group-header.tree-dd-depth-2 {
padding-left: 36px;
font-size: 0.72rem;
font-weight: 600;
text-transform: none;
letter-spacing: normal;
}
.tree-dd-group-header .tree-node-icon {
flex-shrink: 0;
line-height: 1;
}
.tree-dd-group-header .tree-node-icon .icon {
width: 13px;
height: 13px;
}
.tree-dd-group-title {
flex: 1;
min-width: 0;
overflow: hidden;
@@ -87,108 +167,76 @@
white-space: nowrap;
}
.tree-group-count {
.tree-dd-group-count {
background: var(--border-color);
color: var(--text-secondary);
font-size: 0.6rem;
font-size: 0.58rem;
font-weight: 600;
padding: 0 5px;
padding: 0 4px;
border-radius: 8px;
flex-shrink: 0;
min-width: 16px;
min-width: 14px;
text-align: center;
flex-shrink: 0;
}
/* ── Nested sub-group (group inside a group) ── */
/* ── Leaf (clickable item) ── */
.tree-group-nested > .tree-group-header {
font-size: 0.75rem;
text-transform: none;
letter-spacing: normal;
.tree-dd-leaf {
display: flex;
align-items: center;
gap: 6px;
padding: 5px 12px 5px 20px;
cursor: pointer;
font-size: 0.8rem;
color: var(--text-secondary);
transition: color 0.1s, background 0.1s;
}
/* Indent leaves inside nested groups */
.tree-dd-group-header.tree-dd-depth-1 ~ .tree-dd-children > .tree-dd-leaf,
.tree-dd-group .tree-dd-group .tree-dd-leaf {
padding-left: 32px;
}
.tree-dd-group .tree-dd-group .tree-dd-group .tree-dd-leaf {
padding-left: 44px;
}
.tree-dd-leaf:hover {
color: var(--text-color);
background: var(--bg-secondary);
}
.tree-dd-leaf.active {
color: var(--primary-text-color);
background: color-mix(in srgb, var(--primary-color) 12%, transparent);
font-weight: 600;
margin-top: 2px;
padding: 4px 10px 4px 12px;
}
/* ── Children (leaves) ── */
.tree-dd-leaf.active .tree-count {
background: var(--primary-color);
color: var(--primary-contrast);
}
.tree-children {
.tree-dd-leaf .tree-node-icon {
flex-shrink: 0;
line-height: 1;
}
.tree-dd-leaf .tree-node-icon .icon {
width: 14px;
height: 14px;
}
.tree-dd-leaf .tree-node-title {
flex: 1;
min-width: 0;
overflow: hidden;
margin-left: 14px;
border-left: 1px solid var(--border-color);
padding-left: 0;
max-height: 500px;
opacity: 1;
transition: max-height 0.25s ease, opacity 0.2s ease;
text-overflow: ellipsis;
white-space: nowrap;
}
.tree-children.collapsed {
max-height: 0;
opacity: 0;
}
.tree-leaf {
display: flex;
align-items: center;
gap: 6px;
padding: 5px 10px 5px 12px;
cursor: pointer;
font-size: 0.8rem;
color: var(--text-secondary);
border-radius: 0 6px 6px 0;
margin: 1px 0;
transition: color 0.15s, background 0.15s;
}
.tree-leaf:hover {
color: var(--text-color);
background: var(--bg-secondary);
}
.tree-leaf.active {
color: var(--primary-text-color);
background: color-mix(in srgb, var(--primary-color) 12%, transparent);
font-weight: 600;
}
.tree-leaf.active .tree-count {
background: var(--primary-color);
color: var(--primary-contrast);
}
/* ── Standalone leaf (top-level, no group) ── */
.tree-standalone {
display: flex;
align-items: center;
gap: 6px;
padding: 6px 10px;
cursor: pointer;
font-size: 0.8rem;
font-weight: 500;
color: var(--text-secondary);
border-radius: 6px;
margin: 1px 0;
transition: color 0.15s, background 0.15s;
}
.tree-standalone:hover {
color: var(--text-color);
background: var(--bg-secondary);
}
.tree-standalone.active {
color: var(--primary-text-color);
background: color-mix(in srgb, var(--primary-color) 12%, transparent);
font-weight: 600;
}
.tree-standalone.active .tree-count {
background: var(--primary-color);
color: var(--primary-contrast);
}
/* ── Count badge ── */
/* ── Count badge (shared) ── */
.tree-count {
background: var(--border-color);
@@ -202,96 +250,10 @@
text-align: center;
}
/* ── Extra (expand/collapse, tutorial buttons) ── */
/* ── Group separator ── */
.tree-extra {
padding: 8px 10px;
margin-top: 4px;
.tree-dd-group + .tree-dd-group {
border-top: 1px solid var(--border-color);
display: flex;
gap: 4px;
align-items: center;
}
/* ── Sidebar eats into card space — allow 2-col with smaller minmax ── */
.tree-content .displays-grid,
.tree-content .devices-grid {
grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.tree-content .templates-grid {
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
/* ── Responsive: stack on narrow screens ── */
@media (max-width: 900px) {
.tree-layout {
flex-direction: column;
align-items: stretch;
gap: 0;
}
.tree-sidebar {
width: 100%;
min-width: unset;
position: static;
max-height: none;
overflow-y: visible;
padding: 0 0 8px 0;
margin-bottom: 8px;
border-bottom: 1px solid var(--border-color);
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 2px;
}
.tree-group {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 2px;
margin-bottom: 0;
}
.tree-group-header {
padding: 4px 8px;
text-transform: none;
letter-spacing: normal;
}
.tree-children {
display: flex;
flex-wrap: wrap;
gap: 2px;
margin-left: 0;
border-left: none;
padding-left: 0;
max-height: none;
opacity: 1;
transition: none;
}
.tree-children.collapsed {
display: none;
}
.tree-leaf {
padding: 4px 10px;
margin: 0;
}
.tree-standalone {
padding: 4px 10px;
}
.tree-extra {
margin-top: 0;
border-top: none;
padding: 4px;
margin-left: auto;
}
margin-top: 2px;
padding-top: 2px;
}