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: expose selected media backend to assistive technology
Adam Eivy0626caf9dcd0
diff --git a/client/src/components/media/BackendChipStrip.jsx b/client/src/components/media/BackendChipStrip.jsxindex dbcf5aafd2..dd1909595f 100644--- a/client/src/components/media/BackendChipStrip.jsx+++ b/client/src/components/media/BackendChipStrip.jsx@@ -33,6 +33,7 @@ export default function BackendChipStrip({onClick={() => onChange?.(id)}disabled={disabled}aria-busy={isLoading || undefined}+ aria-pressed={isSelected}className={`inline-flex items-center gap-1 rounded-full transition-colors disabled:opacity-50 ${sizeCls} ${isSelected ? 'bg-port-accent text-white' : 'text-gray-400 hover:text-white hover:bg-port-border/40'}`}title={isLoading ? `Checking ${label}…` : `${titlePrefix} ${label}`}>diff --git a/client/src/components/media/BackendChipStrip.test.jsx b/client/src/components/media/BackendChipStrip.test.jsxnew file mode 100644index 0000000000..f29a599acd--- /dev/null+++ b/client/src/components/media/BackendChipStrip.test.jsx@@ -0,0 +1,33 @@+import { useState } from 'react';+import { render, screen } from '@testing-library/react';+import userEvent from '@testing-library/user-event';+import { expect, it } from 'vitest';+import { Cpu, Cloud } from 'lucide-react';+import BackendChipStrip from './BackendChipStrip';++const availableBackends = [+ { id: 'local', label: 'Local', icon: Cpu },+ { id: 'cloud', label: 'Cloud', icon: Cloud },+];++function Picker({ disabled = false }) {+ const [value, setValue] = useState('local');+ return <BackendChipStrip availableBackends={availableBackends} value={value} onChange={setValue} disabled={disabled} />;+}++it('exposes the current choice through keyboard selection and preserves it while disabled', async () => {+ const user = userEvent.setup();+ const view = render(<Picker />);+ expect(screen.getByRole('button', { name: 'Local', pressed: true })).toBeInTheDocument();+ const cloud = screen.getByRole('button', { name: 'Cloud', pressed: false });+ cloud.focus();+ await user.keyboard('{Enter}');+ expect(screen.getByRole('button', { name: 'Cloud', pressed: true })).toHaveFocus();+ expect(screen.getByRole('button', { name: 'Local', pressed: false })).toBeInTheDocument();++ view.rerender(<Picker disabled />);+ const local = screen.getByRole('button', { name: 'Local', pressed: false });+ expect(local).toBeDisabled();+ await user.click(local);+ expect(screen.getByRole('button', { name: 'Cloud', pressed: true })).toBeDisabled();+});