Skip to content

fix(desktop): prevent chat-pane white-screen on narrow windows#4537

Open
arccat-114 wants to merge 3 commits into
esengine:main-v2from
arccat-114:main-v2
Open

fix(desktop): prevent chat-pane white-screen on narrow windows#4537
arccat-114 wants to merge 3 commits into
esengine:main-v2from
arccat-114:main-v2

Conversation

@arccat-114

@arccat-114 arccat-114 commented Jun 15, 2026

Copy link
Copy Markdown
屏幕截图(99) 屏幕截图(98)

Problem

When the Reasonix desktop window is snapped to the left/right half of the screen (Windows Snap Assist), the right-side chat-pane area becomes completely white/blank.

Reproduction:

  1. Open Reasonix desktop client
  2. Drag window to left/right screen edge to trigger half-screen snap
  3. Observe the right-side chat-pane area

Actual result: chat-pane area is completely white. Left sidebar, top tab bar, and bottom status bar remain normal.

Expected result: chat-pane should display chat content normally.

Screenshots: (to be added — showing white chat-pane at half-screen width, and content disappearing as window narrows)

Root Cause

  1. CSS Grid uses minmax(0, 1fr) for the chat-pane column, allowing it to be compressed to 0 width
  2. Window MinWidth was set to 760px, preventing the window from being resized below half-screen
  3. At half-screen width (~960px), sidebar takes ~264px, leaving ~696px for chat-pane — but internal content needs more space, causing a rendering failure (white screen)

Fix

1. CSS Grid — enforce chat-pane minimum width (desktop/frontend/src/styles.css)

  • Lowered --chat-min-width from 760px to 320px
  • Changed all minmax(0, 1fr) to minmax(var(--chat-min-width), 1fr) in grid-template-columns, ensuring the chat column is never compressed below 320px

2. Auto-collapse sidebar on narrow viewports (desktop/frontend/src/App.tsx)

  • Added a useEffect that monitors viewportWidth
  • When viewportWidth < sidebarWidth + CHAT_MIN_WIDTH (664px), automatically collapses the sidebar
  • Ensures chat-pane always has at least 400px of width

3. Lower window minimum width (desktop/main.go)

  • Reduced MinWidth from 760 to 400
  • Allows the window to be resized to smaller dimensions

Testing

  • Window can now be resized down to 400px minimum width
  • Sidebar auto-collapses when viewport drops below ~664px
  • Chat-pane always maintains at least 320px width — no white screen
  • Half-screen snap works correctly with chat-pane visible

@github-actions github-actions Bot added v2 Go rewrite (1.x) — main-v2 branch, active development desktop Wails desktop app (desktop/**) labels Jun 15, 2026
@arccat-114 arccat-114 marked this pull request as draft June 15, 2026 15:10
@arccat-114 arccat-114 marked this pull request as ready for review June 15, 2026 15:11
@arccat-114 arccat-114 marked this pull request as draft June 15, 2026 15:11
@arccat-114 arccat-114 marked this pull request as ready for review June 15, 2026 15:14
…-pane

Prevents chat-pane white-screen on window snap (half-screen) by automatically collapsing the sidebar when viewportWidth < sidebarWidth + CHAT_MIN_WIDTH.
- Lower --chat-min-width from 760px to 320px
- Use minmax(var(--chat-min-width), 1fr) in grid-template-columns
- Reduce window MinWidth from 760px to 400px

Ensures chat-pane remains visible when window is resized to half-screen or smaller.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

desktop Wails desktop app (desktop/**) v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant