Empty Secondary Side Bar auto-opens on startup when Agent is moved to Primary Side Bar

When moving the Agent view container from its default position in the right Secondary Side Bar to the left Primary Side Bar (Activity Bar), the IDE forces an empty “Chat” Secondary Side Bar open on every startup and displays redundant nested headers on the left.


Steps to Reproduce

  1. Drag the Agent (robot icon) from the right Secondary Side Bar over to the left Primary Side Bar.
  2. Close the Secondary Side Bar (Ctrl+Alt+B or via the X button).
  3. Restart Antigravity IDE.

Observed Behavior

  1. Ghost Panel on Startup: The right Secondary Side Bar auto-opens unconditionally on startup, displaying a hollow, empty view labeled “Chat” (workbench.panel.chat).
  2. Left Panel Stays Closed: The left Primary Side Bar (where the Agent was placed) remains collapsed on launch.
  3. Double / Nested Headers: Opening the Agent panel on the left reveals redundant nested headers (“Agent” container title directly above the inner “Agent” view title).
  4. Layout Control Icon Mismatch: The title bar layout button remains hardcoded as "Toggle Agent (Ctrl+Alt+B)" and displays an icon pointing to the right, even though the Agent and auxiliary panel have been moved.

Expected Behavior

  • The Secondary Side Bar should respect user layout persistence and stay closed across restarts when empty.
  • Moving the Agent container to the Primary Side Bar should suppress redundant container titles, just as it does in the Secondary Side Bar.

Root Cause Analysis (Code References)

Inspection of workbench.desktop.main.js reveals two hardcoded assumptions that break when relocating the Agent:

  1. Forced Startup Initialization (line 8509):

    this.stateModel.setRuntimeValue(Es.AUXILIARYBAR_HIDDEN, !1);
    this.state.initialization.views.containerToRestore.auxiliaryBar = KNe;
    

    The engine unconditionally overrides AUXILIARYBAR_HIDDEN to false on boot and attempts to restore KNe (antigravity.agentViewContainerId) into the Auxiliary Bar. When KNe is docked on the left, the right bar falls back to the default workbench.panel.chat, rendering an empty frame.

  2. Asymmetrical Title Suppression (line 5822):

    // Inside AuxiliaryBarPart:
    updateTitleVisibility() {
        const e = this.getActivePaneComposite()?.getId(),
              i = e === KNe || e === dle;
        this.setTitleVisibility(!(uyh && i));
    }
    

    updateTitleVisibility() was implemented only in AuxiliaryBarPart to hide the outer View Container title. Because SideBarPart lacks this logic, moving the Agent to the left results in the duplicate nested header.


Environment

  • IDE: Antigravity IDE 2.0.3+
  • OS: Windows 11 (High-DPI)