Skip to content

Commit ee5d467

Browse files
author
ci-bot
committed
try again
1 parent f34aea8 commit ee5d467

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

apps/remixdesktop/src/main.ts

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,29 @@ export const createWindow = async (dir?: string): Promise<void> => {
4949

5050
// Create the browser window.
5151
const mainWindow = new BrowserWindow({
52-
width: (isE2E ? 2560 : width),
53-
height: (isE2E ? 1140 : height),
52+
width: 1024,
53+
height: 652,
5454
frame: true,
5555
webPreferences: {
5656
preload: path.join(__dirname, 'preload.js'),
57+
// Hint an initial zoom; Electron applies this at creation time
58+
zoomFactor: (isE2E ? 0.5 : 1.0),
5759
},
5860
});
5961

60-
// For E2E tests on low-resolution CI machines, zoom out to fit more content
62+
// Ensure zoom is applied after content loads (some pages reset it on load)
6163
if (isE2E) {
62-
mainWindow.webContents.setZoomFactor(0.5); // 50% zoom for E2E
64+
const applyZoom = () => {
65+
try { mainWindow.webContents.setZoomFactor(0.5); } catch (_) {}
66+
};
67+
// Apply once the first load finishes
68+
mainWindow.webContents.once('did-finish-load', applyZoom);
69+
// Re-apply on any navigation within the window (SPA route changes, reloads)
70+
mainWindow.webContents.on('did-navigate-in-page', applyZoom);
71+
mainWindow.webContents.on('did-navigate', applyZoom);
6372
}
6473

74+
6575
mainWindow.webContents.setWindowOpenHandler((details) => {
6676
shell.openExternal(details.url); // Open URL in user's browser.
6777
return { action: "deny" }; // Prevent the app from opening the URL.

apps/remixdesktop/src/plugins/fsPlugin.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,9 @@ class FSPluginClient extends ElectronBasePluginClient {
138138
this.setupErrorHandlers()
139139

140140
this.onload(() => {
141-
if (!isPackaged) {
142-
this.window.webContents.openDevTools()
143-
}
141+
// if (!isPackaged) {
142+
// this.window.webContents.openDevTools()
143+
// }
144144
this.window.on('close', async () => {
145145
await this.removeFromOpenedFolders(this.workingDir)
146146
await this.closeWatch()

0 commit comments

Comments
 (0)