You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
With Comfortable chat width, keep the chat centered in the window when the left sidebar or thread details card opens
#34108
Set Settings → Appearance → Chat width to Comfortable (the default).
Open a thread in a window wide enough that the 46rem chat column has empty space on both sides.
Toggle the left sidebar open and closed.
Toggle the thread details card open and closed.
Expected behavior
With Chat width set to Comfortable, the chat column (the 46rem timeline and composer) stays centered in the window whether the left sidebar or the thread details card is open or closed. Opening or closing a panel never moves the chat while there's room for both. Comfortable is where this matters most, because its narrow column leaves empty space on both sides that should stay balanced. Full fills the canvas, so it has nothing to center and is unaffected.
Actual behavior
Left sidebar: opening it moves the timeline and composer right by half the sidebar's width, even when there's plenty of room. Its sidebar-gap spacer narrows the canvas, and the column re-centers in the smaller canvas.
Thread details card: today the chat stays centered unless it would overlap the card. Open PR feat(web): add opt-in chat centering beside thread details #29214 changes this so the chat moves left to center in the space beside the card. Once that merges, both panels move the chat.
Cause
In apps/web/src/components/chat/chatCanvasLayout.ts, resolveChatCanvasLayout centers the column on the canvas, not the window:
container starts at the sidebar's right edge, so the center point moves whenever the sidebar opens or closes. #29214 also makes it depend on detailsCard.left.
Proposed fix
Add an opt-in setting next to Chat width, for example Chat position: Centered in window / Centered in free space. It applies to Comfortable and Wide, and does nothing in Full. #29214 and #29081 want the free-space behavior, and this request wants the opposite. With "Centered in window" selected:
Center the column on the window: centerLeft = (container.width - startOffset - normalWidth) / 2. startOffset is the canvas's left edge relative to the window, measured where the store already reads the container's size.
Don't let the details card affect where the chat is centered. When the card would overlap the chat, switch it to its existing popover placement instead of moving the chat.
Keep the Math.max(padding, …) clamp. When the window is too narrow for the sidebar and a centered column (46rem in Comfortable), the chat shifts only far enough to clear the sidebar.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Area
apps/web
Steps to reproduce
Expected behavior
With Chat width set to Comfortable, the chat column (the 46rem timeline and composer) stays centered in the window whether the left sidebar or the thread details card is open or closed. Opening or closing a panel never moves the chat while there's room for both. Comfortable is where this matters most, because its narrow column leaves empty space on both sides that should stay balanced. Full fills the canvas, so it has nothing to center and is unaffected.
Actual behavior
sidebar-gapspacer narrows the canvas, and the column re-centers in the smaller canvas.Cause
In
apps/web/src/components/chat/chatCanvasLayout.ts,resolveChatCanvasLayoutcenters the column on the canvas, not the window:containerstarts at the sidebar's right edge, so the center point moves whenever the sidebar opens or closes. #29214 also makes it depend ondetailsCard.left.Proposed fix
Add an opt-in setting next to Chat width, for example Chat position: Centered in window / Centered in free space. It applies to Comfortable and Wide, and does nothing in Full. #29214 and #29081 want the free-space behavior, and this request wants the opposite. With "Centered in window" selected:
centerLeft = (container.width - startOffset - normalWidth) / 2.startOffsetis the canvas's left edge relative to the window, measured where the store already reads the container's size.Math.max(padding, …)clamp. When the window is too narrow for the sidebar and a centered column (46rem in Comfortable), the chat shifts only far enough to clear the sidebar.Related
Impact
Cosmetic issue
Version or commit
0.1.9-nightly.20261110.4491 (macOS desktop); source read at main @ d91915d
All reactions