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: remove misleading Chief of Staff notification badge
[._.]/ Adam Eivyd5bcfa595a5f
diff --git a/client/src/components/Layout.jsx b/client/src/components/Layout.jsxindex 9d6b1899f6..f25b009fc8 100644--- a/client/src/components/Layout.jsx+++ b/client/src/components/Layout.jsx@@ -90,7 +90,7 @@ function ThemeModeToggle({ className = '' }) {const SECTION_PRESENTATION = {Brain: { icon: Brain, defaultTo: '/brain/inbox' },Calendar: { icon: CalendarDays },- 'Chief of Staff': { icon: Crown, defaultTo: '/cos/tasks', showBadge: true },+ 'Chief of Staff': { icon: Crown, defaultTo: '/cos/tasks' },Comms: { icon: MessagesSquare, defaultTo: '/messages/inbox' },Create: { icon: Sparkles, defaultTo: '/media' },'Dev Tools': { icon: Terminal },@@ -215,16 +215,13 @@ function WorkingSetRow({ entry, pinned, onTogglePin, onNavigate, isActive }) {// A top-level *single* nav row (Dashboard / Review Hub / Eidoverse / Goals). Unlike a// section, it links straight to one destination — and unlike WorkingSetRow it-// carries the heavier top-level row weight plus the optional badge (Chief of-// Staff unread count) and the collapsed-rail layout (icon-only, centered, badge-// overlaid on the icon). When expanded it also exposes the same hover/focus+// carries the heavier top-level row weight and the collapsed-rail layout+// (icon-only, centered). When expanded it also exposes the same hover/focus// pin/unpin affordance as WorkingSetRow so these destinations can be pinned too;// the pin button is omitted in the collapsed rail, mirroring the Pinned/Recent// sections which only render when the sidebar is expanded.-export function SingleNavRow({ item, collapsed, active, badgeCount, pinned, onTogglePin, onNavigate }) {+export function SingleNavRow({ item, collapsed, active, pinned, onTogglePin, onNavigate }) {const Icon = item.icon;- const showBadge = item.showBadge && badgeCount > 0;- const badgeText = badgeCount > 9 ? '9+' : badgeCount;return (<div className={`group relative min-w-0 mx-2 min-h-[44px] lg:min-h-0 ${collapsed ? 'lg:flex lg:justify-center' : ''}`}><NavLink@@ -241,25 +238,11 @@ export function SingleNavRow({ item, collapsed, active, badgeCount, pinned, onTotitle={item.label}><div className="flex items-start gap-3 min-w-0 flex-1">- <div className="relative shrink-0">- <Icon size={20} className="shrink-0" />- {/* Badge for collapsed state */}- {showBadge && collapsed && (- <span className="absolute -top-1.5 -right-1.5 min-w-[14px] h-[14px] flex items-center justify-center text-[9px] font-bold rounded-full bg-port-warning text-port-on-warning px-0.5">- {badgeText}- </span>- )}- </div>+ <Icon size={20} className="shrink-0" /><span className={`min-w-0 break-words leading-snug ${collapsed ? 'lg:hidden' : ''}`}>{item.label}</span></div>- {/* Badge for expanded state — sits left of the absolute pin */}- {showBadge && !collapsed && (- <span className="min-w-[18px] h-[18px] flex items-center justify-center text-[10px] font-bold rounded-full bg-port-warning text-port-on-warning px-1 shrink-0 mt-0.5">- {badgeText}- </span>- )}</NavLink>{!collapsed && (<div className="absolute right-0 top-0 bottom-0 flex items-center">@@ -623,7 +606,6 @@ export default function Layout() {item={item}collapsed={sidebarCollapsed}active={isActive(item.to)}- badgeCount={unreadCount}pinned={singlePinned}onTogglePin={() => (singlePinned ? unpin(item.to) : pin(item.to))}onNavigate={() => setMobileOpen(false)}@@ -674,23 +656,11 @@ export default function Layout() {aria-expanded={hasChildrenForFlyout ? flyoutSection === item.label : undefined}><div className="flex items-center gap-3 min-w-0">- <div className="relative">- <Icon size={20} className="shrink-0" />- {item.showBadge && unreadCount > 0 && sidebarCollapsed && (- <span className="absolute -top-1.5 -right-1.5 min-w-[14px] h-[14px] flex items-center justify-center text-[9px] font-bold rounded-full bg-port-warning text-port-on-warning px-0.5">- {unreadCount > 9 ? '9+' : unreadCount}- </span>- )}- </div>+ <Icon size={20} className="shrink-0" /><span className={`min-w-0 break-words leading-snug ${sidebarCollapsed ? 'lg:hidden' : ''}`}>{item.label}</span></div>- {!sidebarCollapsed && item.showBadge && unreadCount > 0 && (- <span className="min-w-[18px] h-[18px] flex items-center justify-center text-[10px] font-bold rounded-full bg-port-warning text-port-on-warning px-1 shrink-0">- {unreadCount > 9 ? '9+' : unreadCount}- </span>- )}</button>{!sidebarCollapsed && (<buttondiff --git a/client/src/components/Layout.test.jsx b/client/src/components/Layout.test.jsxindex 3364a20658..5bc661339d 100644--- a/client/src/components/Layout.test.jsx+++ b/client/src/components/Layout.test.jsx@@ -18,7 +18,7 @@ import { CMD_K_SEARCH_OPEN_EVENT } from '../hooks/useCmdKSearch.js';// so the render is deterministic and side-effect free.// --- Notification / status hooks: no-op, except useNotifications which feeds the-// dropdown + the single-row badge count. ---+// dropdown with a nonzero unread count. ---vi.mock('../hooks/useErrorNotifications', () => ({ useErrorNotifications: () => {} }));vi.mock('../hooks/useSharingNotifications', () => ({ useSharingNotifications: () => {} }));vi.mock('../hooks/useAgentFeedbackToast', () => ({ useAgentFeedbackToast: () => {} }));@@ -29,7 +29,7 @@ vi.mock('./PasswordRiskWarning.jsx', () => ({ default: () => null }));vi.mock('../hooks/useNotifications', () => ({useNotifications: () => ({notifications: [],- unreadCount: 0,+ unreadCount: 6,markAsRead: vi.fn(),markAllAsRead: vi.fn(),removeNotification: vi.fn(),@@ -125,6 +125,17 @@ const renderLayout = async (initialPath = '/brain/inbox') => {const pinnedSection = () => screen.queryByTestId('pinned-section');describe('Layout — manifest-derived sidebar structure', () => {+ it.each([false, true])('keeps global unread notifications off CoS navigation (collapsed: %s)', async (collapsed) => {+ localStorage.setItem('portos-sidebar-collapsed', String(collapsed));+ await renderLayout();++ const cos = screen.getByRole('button', { name: /^Chief of Staff/ });+ expect(cos).toHaveTextContent(/^Chief of Staff$/);+ fireEvent.click(cos);+ expect(screen.getByTestId('current-path')).toHaveTextContent('/cos/tasks');+ });++it('loads sidebar apps through the lean navigation projection', async () => {await renderLayout();diff --git a/client/src/components/SingleNavRow.test.jsx b/client/src/components/SingleNavRow.test.jsxindex 26d6dee16f..fd30be802d 100644--- a/client/src/components/SingleNavRow.test.jsx+++ b/client/src/components/SingleNavRow.test.jsx@@ -1,11 +1,10 @@import { describe, it, expect, vi } from 'vitest';import { render, screen, fireEvent } from '@testing-library/react';import { MemoryRouter } from 'react-router';-import { Home, Crown } from 'lucide-react';+import { Home } from 'lucide-react';import { SingleNavRow } from './Layout';const baseItem = { to: '/', label: 'Dashboard', icon: Home, single: true };-const badgeItem = { to: '/cos', label: 'Chief of Staff', icon: Crown, single: true, showBadge: true };const renderRow = (props = {}) => render(<MemoryRouter>@@ -13,7 +12,6 @@ const renderRow = (props = {}) => render(item={baseItem}collapsed={false}active={false}- badgeCount={0}pinned={false}onTogglePin={() => {}}onNavigate={() => {}}@@ -67,28 +65,4 @@ describe('SingleNavRow', () => {expect(onNavigate).not.toHaveBeenCalled();});- it('renders the unread badge when showBadge and badgeCount > 0', () => {- renderRow({ item: badgeItem, badgeCount: 3 });- expect(screen.getByText('3')).toBeTruthy();- });-- it('caps the badge at 9+', () => {- renderRow({ item: badgeItem, badgeCount: 42 });- expect(screen.getByText('9+')).toBeTruthy();- });-- it('omits the badge when badgeCount is 0', () => {- renderRow({ item: badgeItem, badgeCount: 0 });- expect(screen.queryByText(/^\d/)).toBeNull();- });-- it('omits the badge for items without showBadge even when badgeCount > 0', () => {- renderRow({ badgeCount: 5 });- expect(screen.queryByText('5')).toBeNull();- });-- it('still shows the badge in the collapsed rail (overlaid on the icon)', () => {- renderRow({ item: badgeItem, badgeCount: 2, collapsed: true });- expect(screen.getByText('2')).toBeTruthy();- });});