experiments in a post-browser web
10
fork

Configure Feed

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

fix: preserve group mode during navigation (not just space mode)

+9 -6
+6 -3
backend/electron/datastore.ts
··· 2552 2552 const detectedMode = detectModeFromUrl(url); 2553 2553 const currentEntry = getContextEntry('mode', windowId); 2554 2554 2555 - // Don't override group mode with page mode (group mode persists) 2556 - if (currentEntry?.value === 'space' && detectedMode === 'page') { 2557 - DEBUG && console.log('main', `Preserving space mode for window ${windowId} during navigation`); 2555 + // Don't override space/group mode with page mode — they persist through navigation 2556 + if ( 2557 + (currentEntry?.value === 'space' || currentEntry?.value === 'group') && 2558 + detectedMode === 'page' 2559 + ) { 2560 + DEBUG && console.log('main', `Preserving ${currentEntry.value} mode for window ${windowId} during navigation`); 2558 2561 return; 2559 2562 } 2560 2563
+3 -3
tests/unit/cmd-state-machine.test.js
··· 227 227 assert.equal(machine.getState(), States.PARAM_MODE); 228 228 }); 229 229 230 - it('TYPING + Tab with params but partial text -> TYPING (complete name first)', () => { 230 + it('TYPING + Tab with params on partial text -> PARAM_MODE (complete name and enter params)', () => { 231 231 machine.getMutableData().matches = ['kagi']; 232 232 machine.getMutableData().typed = 'ka'; 233 233 machine.getMutableData().commands = { ··· 237 237 commandName: 'kagi', 238 238 hasParams: true 239 239 }); 240 - // Should stay in TYPING — complete the name, don't enter param mode yet 241 - assert.equal(machine.getState(), States.TYPING); 240 + // Should enter PARAM_MODE — Tab both completes the name AND enters param mode in one action 241 + assert.equal(machine.getState(), States.PARAM_MODE); 242 242 assert.equal(result.handled, true); 243 243 }); 244 244