experiments in a post-browser web
10
fork

Configure Feed

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

feat: add pageWidth/pageHeight to core prefs, wire up to backend and pagestream

Backend window creation now uses pageWidth/pageHeight from core prefs as
fallback defaults. Pagestream reads core prefs at init for ghost animation
sizing instead of hardcoding dimensions.

+38 -7
+13 -1
app/config.js
··· 83 83 "type": "integer", 84 84 "default": 5 85 85 }, 86 + "pageWidth": { 87 + "description": "Default width for new page windows", 88 + "type": "integer", 89 + "default": 800 90 + }, 91 + "pageHeight": { 92 + "description": "Default height for new page windows", 93 + "type": "integer", 94 + "default": 600 95 + }, 86 96 }, 87 97 "required": [ "shortcutKey", "startupFeature", "enableTrayIcon", "showInDockAndSwitcher", "quitShortcut" ] 88 98 }; ··· 156 166 hideTitleBar: true, 157 167 persistWindowState: true, 158 168 restoreSession: true, 159 - sessionAutosaveInterval: 5 169 + sessionAutosaveInterval: 5, 170 + pageWidth: 800, 171 + pageHeight: 600 160 172 }, 161 173 items: [ 162 174 { id: '82de735f-a4b7-4fe6-a458-ec29939ae00d',
+2 -2
backend/electron/ipc.ts
··· 2082 2082 const winOptions: Electron.BrowserWindowConstructorOptions = { 2083 2083 frame: isWebPage ? false : frameDefault, // Web pages are always frameless 2084 2084 ...options, 2085 - width: parseInt(options.width) || APP_DEF_WIDTH, 2086 - height: parseInt(options.height) || APP_DEF_HEIGHT, 2085 + width: parseInt(options.width) || (getPrefs().pageWidth as number) || APP_DEF_WIDTH, 2086 + height: parseInt(options.height) || (getPrefs().pageHeight as number) || APP_DEF_HEIGHT, 2087 2087 show: isHeadless() ? false : options.show !== false, 2088 2088 // Canvas pages: transparent minimal window, no shadow, no OS resize (we handle it via setBounds) 2089 2089 transparent: useCanvas ? true : (options.transparent || false),
+23 -4
extensions/pagestream/home.js
··· 49 49 50 50 // ===== State ===== 51 51 52 - const ANIM_DURATION = '0.5s'; 52 + const ANIM_DURATION = '0.33s'; 53 53 const ANIM_EASE = 'cubic-bezier(0.4, 0, 0.2, 1)'; 54 54 55 55 let state = { ··· 230 230 231 231 // ===== Open URL in Page Host (with animation) ===== 232 232 233 - // Default page host size — capped so it doesn't go full screen 234 - const PAGE_HOST_WIDTH = 800; 235 - const PAGE_HOST_HEIGHT = 600; 233 + // Default page host size — loaded from core prefs, with fallback 234 + let PAGE_HOST_WIDTH = 800; 235 + let PAGE_HOST_HEIGHT = 600; 236 + 237 + const CORE_SETTINGS_ID = '8aadaae5-2594-4968-aba0-707f0d371cfb'; 238 + 239 + const loadPageHostDefaults = async () => { 240 + try { 241 + if (api?.settings?.getExtKey) { 242 + const result = await api.settings.getExtKey(CORE_SETTINGS_ID, 'prefs'); 243 + if (result.success && result.data) { 244 + if (result.data.pageWidth) PAGE_HOST_WIDTH = result.data.pageWidth; 245 + if (result.data.pageHeight) PAGE_HOST_HEIGHT = result.data.pageHeight; 246 + debug && console.log('[pagestream] Loaded page defaults from core:', PAGE_HOST_WIDTH, 'x', PAGE_HOST_HEIGHT); 247 + } 248 + } 249 + } catch (err) { 250 + debug && console.log('[pagestream] Could not load core prefs, using defaults:', err); 251 + } 252 + }; 236 253 237 254 /** 238 255 * @param {object} from - Start rect {top, left, width, height, borderRadius} ··· 587 604 588 605 const init = async () => { 589 606 debug && console.log('[pagestream] init'); 607 + 608 + await loadPageHostDefaults(); 590 609 591 610 api.escape.onEscape(handleEscape); 592 611