Skip to content

fix(tauri): stop Windows recall panel from resizing window and leaving a phantom column#351

Merged
silverstein merged 1 commit into
silverstein:mainfrom
maosuarez:fix/recall-panel-layout
Jun 25, 2026
Merged

fix(tauri): stop Windows recall panel from resizing window and leaving a phantom column#351
silverstein merged 1 commit into
silverstein:mainfrom
maosuarez:fix/recall-panel-layout

Conversation

@maosuarez

Copy link
Copy Markdown
Contributor

Problem

On Windows, the embedded AI-assistant (Recall) panel caused two layout issues on the home view that don't occur on macOS (I am a win user):

  1. Window resizes when toggling the panel. Opening/closing the panel drives an OS-level window resize (expand → 960px, collapse → 520px) through cmd_apply_recall_window_layout. On macOS this "grow to fit, snap back" is intentional, but on Windows it snaps the window to a fixed 520px on close regardless of the size the user chose, and the timing leaves transient whitespace.

  2. Phantom empty column when the panel is collapsed. The top-level .recall-panel { padding: 16px } rule, combined with width: 0 and the global box-sizing: border-box, forces the collapsed panel to render ~32px wide — a permanent empty column on the right edge of the home view. macOS never shows it because the window shrinks below the panel's footprint on collapse.

Fix

Both changes are platform-gated; macOS behavior is byte-for-byte unchanged.

  1. Skip the OS window resize on Windows (IS_WINDOWS guard, early-return in applyRecallWindowLayout). The CSS flex layout (.recall-panel width: 0expanded, .app-left { flex: 1 }) reflows on its own, so the window stays at whatever size the user set.

  2. Zero the padding on the collapsed panel for non-macOS only:

    html:not([data-platform="macos"]) .recall-panel:not(.expanded) { padding: 0; }

    The expanded panel keeps its 16px padding (the terminal needs it).

Linux also benefits from fix #2 (it had the same phantom column); the rule is gated away from macOS, not toward a single platform, and removes a gap that shouldn't exist anywhere.

Scope

  • 1 file changed: tauri/src/index.html (+21 lines)
  • No Rust changes
  • No macOS/Linux regressions — all changes guarded by platform detection

Testing

Verified visually on Windows 11 with cargo tauri dev:

  • Toggling the AI assistant panel no longer resizes/snaps the window
  • Collapsed panel no longer leaves an empty column on the right
  • Expanded panel still renders with correct internal padding

…g a phantom column

On Windows the embedded AI-assistant (Recall) panel produced two layout
problems that don't occur on macOS:

1. Opening/closing the panel resized the OS window (expand→960, collapse→520)
   via cmd_apply_recall_window_layout. On macOS this "grow to fit, snap back"
   is intentional, but on Windows it snapped the window to a fixed 520px on
   close regardless of the user's size, and the timing left transient
   whitespace. Skip the OS resize on Windows (IS_WINDOWS guard in
   applyRecallWindowLayout) — the CSS flex layout reflows on its own, so the
   window stays at whatever size the user set.

2. The top-level `.recall-panel { padding: 16px }` rule, combined with
   `width: 0` and `box-sizing: border-box`, forced the collapsed panel to
   render ~32px wide — a permanent empty column on the right of the home view.
   macOS never showed it because the window shrinks below the panel's footprint
   on collapse. Zero the padding for the collapsed panel on non-macOS only.

Both changes are platform-gated; macOS behavior is unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 25, 2026

Copy link
Copy Markdown

@maosuarez is attempting to deploy a commit to the evil genius laboratory Team on Vercel.

A member of the Team first needs to authorize it.

@silverstein silverstein merged commit 7538a6b into silverstein:main Jun 25, 2026
14 of 15 checks passed
@silverstein

Copy link
Copy Markdown
Owner

Merged, thank you. This is exactly the kind of Windows coverage the project needs most, and the platform gating is clean. I especially appreciate the comments explaining why the macOS resize is intentional and why the collapsed padding only matters off-mac. That context makes this easy to maintain later. Hope to see more from you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants