Google AntiGravity sidebar zoom workaround Windows (v2.12.2)

I tried the other solutions I found online and none of them worked. I debugged it with Gemini for quite some time and found a solution that works. Here is its repo.

The succinct part of it:

  1. Navigate to %LOCALAPPDATA%\Programs\Antigravity\resources\.
  2. Extract the app bundle:
    asar extract app.asar app-working
    
  3. Open app-working\dist\main.js.
  4. Append the following layout structural scanner logic directly to the bottom of the file:
// Structural Layout Font Adjuster for AntiGravity 2.12.2
const { app: electronApp } = require('electron');
function injectLayoutFontSize(contents) {
  const script = `
    setInterval(() => {
      const textElements = document.querySelectorAll('p, span, code, pre, button, li, td, th');
      textElements.forEach(el => {
        if (el.closest('.antigravity-left-nav') || el.closest('[class*="sidebar"]') || el.closest('[class*="left-panel"]')) return;
        if (el.closest('.monaco-editor') || el.closest('[class*="editor"]') || el.closest('[class*="document-viewer"]')) return;
        el.style.setProperty('font-size', '16px', 'important');
        el.style.setProperty('line-height', '1.5', 'important');
        if (el.tagName === 'TD' || el.tagName === 'TH' || el.tagName === 'CODE') {
          el.style.setProperty('font-size', '14px', 'important');
        }
      });
    }, 1000);
  `;
  contents.executeJavaScript(script).catch(() => {});
}
electronApp.whenReady().then(() => {
  electronApp.on('web-contents-created', (event, contents) => {
    contents.on('did-finish-load', () => injectLayoutFontSize(contents));
    contents.on('dom-ready', () => injectLayoutFontSize(contents));
  });
});
  1. Re-bundle the application package:
    asar pack app-working app.asar
    
  2. Relaunch AntiGravity.