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
feat: open command search from mobile header
[._.]/ Adam Eivy6ad678683489
diff --git a/client/src/components/Layout.jsx b/client/src/components/Layout.jsxindex c9c6311e88..d68461cc30 100644--- a/client/src/components/Layout.jsx+++ b/client/src/components/Layout.jsx@@ -18,7 +18,6 @@ import {Sparkles,CalendarDays,Settings,- Monitor,LayoutDashboard,Zap,MessagesSquare,@@ -1087,17 +1086,15 @@ export default function Layout() {<span className="font-bold text-sm text-port-accent">PortOS</span></div><div className="flex items-center gap-0.5">- <NavLink- to="/ambient"- className={`inline-flex items-center justify-center min-w-[44px] min-h-[44px] rounded-lg transition-colors ${- isActive('/ambient')- ? 'text-port-accent'- : 'text-gray-500 hover:text-white'- }`}- aria-label="Ambient display"+ <button+ type="button"+ onClick={openCmdKSearch}+ className="inline-flex items-center justify-center min-w-[44px] min-h-[44px] rounded-lg transition-colors text-gray-500 hover:text-white"+ title="Search"+ aria-label="Open command palette">- <Monitor size={18} />- </NavLink>+ <Search size={18} />+ </button><ThemeModeToggle /><ThemeSwitcher position="below" /><VoiceToggleButton />diff --git a/client/src/components/Layout.test.jsx b/client/src/components/Layout.test.jsxindex f8185c6bf4..8c9478ec55 100644--- a/client/src/components/Layout.test.jsx+++ b/client/src/components/Layout.test.jsx@@ -418,8 +418,10 @@ describe('Layout — persistent mobile touch targets', () => {expect(closeMenu.className).toContain('lg:hidden');const searchButtons = screen.getAllByRole('button', { name: 'Open command palette' });- expect(searchButtons).toHaveLength(1);+ expect(searchButtons).toHaveLength(2);searchButtons.forEach(expectAtLeast44px);+ expect(within(screen.getByRole('banner')).getByRole('button', { name: 'Open command palette' })).toBeInTheDocument();+ expect(screen.queryByRole('link', { name: 'Ambient display' })).not.toBeInTheDocument();const themeToggles = screen.getAllByRole('button', { name: 'Toggle day/night mode' });expect(themeToggles).toHaveLength(2);@@ -432,6 +434,16 @@ describe('Layout — persistent mobile touch targets', () => {});});+ it('opens the command palette from the mobile header search button', async () => {+ await renderLayout();+ const dispatchSpy = vi.spyOn(document, 'dispatchEvent');++ fireEvent.click(within(screen.getByRole('banner')).getByRole('button', { name: 'Open command palette' }));++ expect(dispatchSpy).toHaveBeenCalledWith(expect.objectContaining({ type: CMD_K_SEARCH_OPEN_EVENT }));+ dispatchSpy.mockRestore();+ });+it('expands section children when the mobile sidebar opens from a collapsed desktop preference', async () => {localStorage.setItem('portos-sidebar-collapsed', 'true');await renderLayout('/');@@ -447,8 +459,9 @@ describe('Layout — nav footer', () => {it('opens the command palette from the footer search button', async () => {await renderLayout();const dispatchSpy = vi.spyOn(document, 'dispatchEvent');+ const footer = screen.getByText(/^vtest$/).closest('.border-t');- const searchButton = screen.getByRole('button', { name: 'Open command palette' });+ const searchButton = within(footer).getByRole('button', { name: 'Open command palette' });fireEvent.click(searchButton);expect(dispatchSpy).toHaveBeenCalledWith(expect.objectContaining({ type: CMD_K_SEARCH_OPEN_EVENT }));