Problem/Context
In the desktop app, when the session changes panel is expanded in side-by-side (pane) mode, the session tab loses its left padding between the session content and the sidebar/message rail. The padding is correctly restored when the session changes are viewed in their own dedicated tab.
This creates a visual inconsistency where the session content appears flush against the left edge when in split-pane view, but has proper spacing in tab view.
Root Cause
The issue is in packages/desktop/src/pages/session.tsx around lines 653-659 where the SessionTurn component's container classes are conditionally applied:
classes={{
root: "pb-20 flex-1 min-w-0 overflow-x-hidden",
content: "pb-20",
container: "w-full max-w-full " +
(wide()
? "max-w-146 mx-auto px-4 sm:px-6" // ← Full padding when wide
: "pr-4 sm:pr-6" // ← RIGHT padding only when not wide (BUG)
),
}}
The wide() memo returns true when:
- Review state is
"tab" (session changes in its own tab), OR
- There are no diffs to display
When wide() is false (session changes panel expanded side-by-side), only right padding (pr-4 sm:pr-6) is applied, and the left padding is removed entirely.
Acceptance Criteria
Suggested Fix
Update the conditional class in session.tsx to include left padding in the non-wide case:
container: "w-full max-w-full " +
(wide()
? "max-w-146 mx-auto px-4 sm:px-6"
: "pl-4 sm:pl-6 pr-4 sm:pr-6" // ← Add left padding
),
Or equivalently:
container: "w-full max-w-full " +
(wide()
? "max-w-146 mx-auto px-4 sm:px-6"
: "px-4 sm:px-6" // ← Use horizontal padding
),
Note: The current approach likely removed left padding to prevent a double-padding effect with the message rail. Verify that the message rail's own padding (pl-0.5) doesn't create excessive spacing when combined with the session content's left padding.
Relevant Files
packages/desktop/src/pages/session.tsx:653-659 - SessionTurn container classes
packages/desktop/src/context/layout.tsx:183-191 - Review layout state management
packages/ui/src/components/session-turn.tsx - SessionTurn component
packages/ui/src/components/session-message-rail.css:6-12 - Message rail padding
Tasks
Problem/Context
In the desktop app, when the session changes panel is expanded in side-by-side (pane) mode, the session tab loses its left padding between the session content and the sidebar/message rail. The padding is correctly restored when the session changes are viewed in their own dedicated tab.
This creates a visual inconsistency where the session content appears flush against the left edge when in split-pane view, but has proper spacing in tab view.
Root Cause
The issue is in
packages/desktop/src/pages/session.tsxaround lines 653-659 where theSessionTurncomponent's container classes are conditionally applied:The
wide()memo returnstruewhen:"tab"(session changes in its own tab), ORWhen
wide()isfalse(session changes panel expanded side-by-side), only right padding (pr-4 sm:pr-6) is applied, and the left padding is removed entirely.Acceptance Criteria
Suggested Fix
Update the conditional class in session.tsx to include left padding in the non-wide case:
Or equivalently:
Note: The current approach likely removed left padding to prevent a double-padding effect with the message rail. Verify that the message rail's own padding (
pl-0.5) doesn't create excessive spacing when combined with the session content's left padding.Relevant Files
packages/desktop/src/pages/session.tsx:653-659- SessionTurn container classespackages/desktop/src/context/layout.tsx:183-191- Review layout state managementpackages/ui/src/components/session-turn.tsx- SessionTurn componentpackages/ui/src/components/session-message-rail.css:6-12- Message rail paddingTasks
session.tsx