Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
fix(media): keep compact lane controls reachable (#5426)
[._.]/ Adam Eivy777be362b28b
diff --git a/client/src/components/media/VideoTimelineLanes.jsx b/client/src/components/media/VideoTimelineLanes.jsxindex 3c229a36fc..bf9ef4f9b6 100644--- a/client/src/components/media/VideoTimelineLanes.jsx+++ b/client/src/components/media/VideoTimelineLanes.jsx@@ -110,9 +110,11 @@ export const LaneBlock = memo(function LaneBlock({entry, label, tone, isSelected, isMissing, pxPerSec, onSelect, onRemove,}) {const dur = Math.max(0.05, entry.durationSec || 0);+ const width = Math.max(28, dur * pxPerSec);+ const showRemove = isSelected || width >= 56;const style = {left: `${(entry.startSec || 0) * pxPerSec}px`,- width: `${Math.max(56, dur * pxPerSec)}px`,+ width: `${width}px`,};return (<div@@ -121,25 +123,27 @@ export const LaneBlock = memo(function LaneBlock({isMissing? 'bg-port-error/20 border-port-error': isSelected- ? 'border-port-accent bg-port-accent/20'+ ? 'z-10 border-port-accent bg-port-accent/20': `${tone} hover:border-port-accent/50`}`}onClick={() => onSelect(entry._key)}{...clickableProps(() => onSelect(entry._key))}>- <span className="absolute left-1 right-7 top-0.5 text-[9px] text-white truncate pointer-events-none">+ <span className={`absolute top-0.5 text-[9px] text-white truncate pointer-events-none ${showRemove ? 'left-1 right-7' : 'inset-x-1'}`}>{isMissing ? '(missing)' : label}</span>- <button- type="button"- onClick={(e) => { e.stopPropagation(); onRemove(entry._key); }}- onPointerDown={(e) => e.stopPropagation()}- className="absolute top-1/2 right-0 -translate-y-1/2 inline-flex min-w-[28px] min-h-[28px] items-center justify-center p-1 text-white/70 hover:text-port-error"- title="Remove"- aria-label={`Remove ${label} from timeline`}- >- <X className="w-3 h-3" aria-hidden="true" />- </button>+ {showRemove && (+ <button+ type="button"+ onClick={(e) => { e.stopPropagation(); onRemove(entry._key); }}+ onPointerDown={(e) => e.stopPropagation()}+ className="absolute top-1/2 right-0 -translate-y-1/2 inline-flex min-w-[28px] min-h-[28px] items-center justify-center p-1 text-white/70 hover:text-port-error"+ title="Remove"+ aria-label={`Remove ${label} from timeline`}+ >+ <X className="w-3 h-3" aria-hidden="true" />+ </button>+ )}</div>);});diff --git a/client/src/components/media/VideoTimelineLanes.test.jsx b/client/src/components/media/VideoTimelineLanes.test.jsxindex ca10c8e232..e647d0a335 100644--- a/client/src/components/media/VideoTimelineLanes.test.jsx+++ b/client/src/components/media/VideoTimelineLanes.test.jsx@@ -161,17 +161,14 @@ describe('LaneBlock — free-floating overlay/bed placement', () => {expect(screen.queryByText('gone.png')).not.toBeInTheDocument();});- it('reserves separate 28px hit targets for selection and removal', () => {+ it('provides a 28px remove target without selecting a normal-width block', () => {const onSelect = vi.fn();const onRemove = vi.fn();render(- <LaneBlock entry={{ ...entry, durationSec: 0 }} label="logo.png" tone="" isSelected={false} isMissing={false} pxPerSec={40} onSelect={onSelect} onRemove={onRemove} />,+ <LaneBlock entry={entry} label="logo.png" tone="" isSelected={false} isMissing={false} pxPerSec={40} onSelect={onSelect} onRemove={onRemove} />,);const remove = screen.getByRole('button', { name: 'Remove logo.png from timeline' });- const block = remove.parentElement;- expect(block).toHaveStyle({ width: '56px' });- expect(block.className).not.toContain('overflow-hidden');expect(remove.className).toContain('min-w-[28px]');expect(remove.className).toContain('min-h-[28px]');expect(remove.className).toContain('-translate-y-1/2');@@ -183,6 +180,39 @@ describe('LaneBlock — free-floating overlay/bed placement', () => {expect(onRemove).toHaveBeenCalledOnce();expect(onRemove).toHaveBeenCalledWith('ov-1');});++ it('keeps compact entries at their temporal width and reveals removal after selection', () => {+ const compactEntry = { ...entry, durationSec: 0 };+ const onSelect = vi.fn();+ const onRemove = vi.fn();+ const { rerender } = render(+ <LaneBlock entry={compactEntry} label="logo.png" tone="" isSelected={false} isMissing={false} pxPerSec={40} onSelect={onSelect} onRemove={onRemove} />,+ );++ const block = screen.getByText('logo.png').closest('div');+ expect(block).toHaveStyle({ width: '28px' });+ expect(screen.queryByRole('button', { name: 'Remove logo.png from timeline' })).not.toBeInTheDocument();++ fireEvent.click(block);+ expect(onSelect).toHaveBeenCalledWith('ov-1');++ rerender(+ <LaneBlock entry={compactEntry} label="logo.png" tone="" isSelected isMissing={false} pxPerSec={40} onSelect={onSelect} onRemove={onRemove} />,+ );+ expect(block.className).toContain('z-10');++ const remove = screen.getByRole('button', { name: 'Remove logo.png from timeline' });+ expect(remove.className).toContain('min-w-[28px]');+ expect(remove.className).toContain('min-h-[28px]');++ onSelect.mockClear();+ fireEvent.pointerDown(remove);+ fireEvent.click(remove);++ expect(onSelect).not.toHaveBeenCalled();+ expect(onRemove).toHaveBeenCalledOnce();+ expect(onRemove).toHaveBeenCalledWith('ov-1');+ });});describe('FloatingLane', () => {