// Dev App Background Service // Scratch playground for testing submenu features AppServices.register('dev', { initialize() { // Test submenu with various item types AppServices.submenus.set('dev', [ { id: 'workspace', label: 'Workspace', icon: '🏠', href: '/app/dev' }, { id: 'notifications', label: 'Test Notifications', icon: '🔔', href: '/app/dev#notifications', badge: 3 }, { id: 'websocket', label: 'WebSocket Events', icon: '📡', href: '/app/dev#websocket' }, { id: 'facet-test', label: 'With Facet', icon: '🎯', href: '/app/dev#facet', facet: 'work' } ]); // Demo: Update badge dynamically every 5 seconds let badgeCount = 3; setInterval(() => { badgeCount = (badgeCount % 10) + 1; AppServices.submenus.upsert('dev', { id: 'notifications', badge: badgeCount }); }, 5000); console.log('[Dev] Background service initialized with test submenu'); } });