Skip to content

[Bug] Session chat flow reflows when right panel is opened #277

@Astro-Han

Description

@Astro-Han

When the right utility panel (status / review / files / terminal) is toggled open, the session chat flow immediately switches from a fixed 800px centered layout to full-width, causing all messages to reflow. The layout should stay at 800px as long as there is enough horizontal space, and only shrink or reflow when the available width actually drops below the threshold.

Steps to reproduce

  1. Open PawWork and start or open a session with enough messages to see the chat flow.
  2. Ensure the window is wide enough that the chat is centered at 800px.
  3. Click the right-panel toggle button (the sidebar icon in the session header) to open the utility panel.
  4. Observe the chat flow instantly expanding to fill the remaining space instead of staying at 800px.

What did you expect to happen?

The chat flow should remain at its 800px centered width. Opening the right panel should only reduce the available space on the right side — the chat should not reflow unless the remaining space is genuinely too narrow to fit 800px.

PawWork version

v0.2.14

OS version

macOS

Can you reproduce it again?

Yes, every time

Root cause

Identified in packages/app/src/pages/session.tsx:

const desktopReviewOpen = createMemo(() => isDesktop() && view().sidePanel.opened())
const centered = createMemo(() => isDesktop() && !desktopReviewOpen())

The centered memo is false whenever the right panel is open, which removes the md:max-w-200 md:mx-auto classes from the message timeline. The fix should base centered on actual available width rather than panel open state.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium prioritybugSomething isn't workinguiDesign system and user interface

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions