experiments in a post-browser web
10
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(groups): use 'group' mode instead of 'space' mode (undo incomplete rename)

+49 -20
+11 -11
features/groups/background.js
··· 97 97 } 98 98 99 99 try { 100 - await api.context.setMode('space', { 100 + await api.context.setMode('group', { 101 101 windowId, 102 102 metadata: { 103 - spaceId: groupId, 104 - spaceName: groupName, 103 + groupId, 104 + groupName, 105 105 color 106 106 } 107 107 }); 108 - debug && console.log(`[ext:groups] Set space mode for window ${windowId}: ${groupName}`); 108 + debug && console.log(`[ext:groups] Set group mode for window ${windowId}: ${groupName}`); 109 109 } catch (err) { 110 110 console.error('[ext:groups] Failed to set group mode:', err); 111 111 } ··· 151 151 const targetWindowId = await api.window.getFocusedVisibleWindowId(); 152 152 if (targetWindowId) { 153 153 const modeResult = await api.context.get('mode', targetWindowId); 154 - if (modeResult.success && modeResult.data?.value === 'space' && modeResult.data.metadata?.spaceId) { 154 + if (modeResult.success && modeResult.data?.value === 'group' && modeResult.data.metadata?.groupId) { 155 155 return { 156 - groupId: modeResult.data.metadata.spaceId, 157 - groupName: modeResult.data.metadata.spaceName || '' 156 + groupId: modeResult.data.metadata.groupId, 157 + groupName: modeResult.data.metadata.groupName || '' 158 158 }; 159 159 } 160 160 } ··· 639 639 role: 'content', 640 640 trackingSource: 'cmd', 641 641 trackingSourceId: `group:${groupName}`, 642 - // Pass space context for mode inheritance 643 - spaceMode: { 644 - spaceId: tag.id, 645 - spaceName: tag.name, 642 + // Pass group context for mode inheritance 643 + groupMode: { 644 + groupId: tag.id, 645 + groupName: tag.name, 646 646 color: tag.color 647 647 }, 648 648 ...boundsOpts
+17
features/groups/home.js
··· 794 794 state.currentTag = tag; 795 795 state.searchQuery = ''; 796 796 797 + // Set group mode context for this window when viewing a real group 798 + // (not the special untagged pseudo-group). Mode persists per-window and 799 + // is used by HUD, child page inheritance, and other consumers. 800 + if (api.context && tag && !tag.isSpecial) { 801 + try { 802 + await api.context.setMode('group', { 803 + metadata: { 804 + groupId: tag.id, 805 + groupName: tag.name, 806 + color: tag.color 807 + } 808 + }); 809 + debug && console.log('[groups] Set group mode for:', tag.name); 810 + } catch (err) { 811 + console.error('[groups] Failed to set group mode:', err); 812 + } 813 + } 797 814 798 815 // Load URL items - handle special untagged group (only http/https URLs) 799 816 if (tag.isSpecial && tag.id === '__untagged__') {
+18 -7
features/hud/widgets/mode.js
··· 18 18 if (!modeValue) return; 19 19 20 20 // Remove old mode classes 21 - modeValue.classList.remove('mode-default', 'mode-page', 'mode-space', 'mode-settings'); 21 + modeValue.classList.remove('mode-default', 'mode-page', 'mode-group', 'mode-space', 'mode-settings'); 22 + 23 + // Resolve container-style mode metadata (groups + spaces share visual treatment) 24 + let containerName = null; 25 + let containerColor = null; 26 + if (currentMode === 'group' && currentModeMetadata.groupName) { 27 + containerName = currentModeMetadata.groupName; 28 + containerColor = currentModeMetadata.color; 29 + } else if (currentMode === 'space' && currentModeMetadata.spaceName) { 30 + containerName = currentModeMetadata.spaceName; 31 + containerColor = currentModeMetadata.color; 32 + } 22 33 23 34 // Format mode display 24 35 let displayText = currentMode; 25 - if (currentMode === 'space' && currentModeMetadata.spaceName) { 26 - displayText = `space: ${currentModeMetadata.spaceName}`; 36 + if (containerName) { 37 + displayText = `${currentMode}: ${containerName}`; 27 38 } 28 39 29 40 modeValue.textContent = displayText; 30 41 modeValue.classList.add(`mode-${currentMode}`); 31 42 32 - // Update group visual treatment 33 - if (currentMode === 'space' && currentModeMetadata.spaceName) { 34 - const color = currentModeMetadata.color || '#999'; 43 + // Update accent/banner visual treatment for container modes 44 + if (containerName) { 45 + const color = containerColor || '#999'; 35 46 groupAccent.style.background = color; 36 47 groupAccent.style.display = ''; 37 - groupName.textContent = currentModeMetadata.spaceName; 48 + groupName.textContent = containerName; 38 49 groupBanner.style.display = ''; 39 50 if (widget) widget.style.setProperty('--group-color', color + '40'); 40 51 } else {
+3 -2
features/hud/widgets/widget.css
··· 57 57 line-height: 1.5; 58 58 } 59 59 60 - /* Group mode — elevated visual treatment */ 61 - .mode-group { 60 + /* Group / space modes — elevated visual treatment */ 61 + .mode-group, 62 + .mode-space { 62 63 color: var(--theme-text, #333); 63 64 font-weight: 500; 64 65 }