ADR 0151: Keep the work panel inside the fixed application window
- Status: Accepted
- Date: 2026-09-03
- Related: 01-ui-ia · 08-component-spec §5 · 09-interaction-patterns §8 · 01-ipc-protocol · E2E-056 · E2E-167
- Supersedes: ADR 0122 and the work-panel boundary clauses of ADR 0146
- Restores the internal-dock direction from ADR 0033
Context
The work panel is already rendered as an in-flow flex sibling, but ADR 0122 made the renderer request a matching native reservation. Electron consequently grew and later shrank the whole application window whenever the panel opened or collapsed. The panel should behave like the left sidebar: its width is taken from the existing client area and MainChat reflows beside it.
The native Browser WebContentsView does not require a larger window. It is positioned from the renderer-measured panel rectangle, which remains valid when the panel is inside the existing client area.
Decision
- The work panel remains a fixed-width, right-side in-flow flex column. Opening and collapsing animate its flex allocation between zero and the committed
244..720pxwidth without changing native BrowserWindow bounds. (Amended by ADR 0238: the committed width is bounded by the live three-column budget instead of a fixed244..720pxrange, and the expanded sidebar yields when MainChat reaches its 360px floor; every other clause here stands.) - The renderer keeps the
window/setWorkPanelReservationseam at zero. Main normalizes every valid request to{ requested: 0, reserved: 0 }and never applies panel width or x-offset geometry. - The panel's inner left-edge separator is renderer-owned. Moving it left grows the panel into MainChat's internal space; moving it right returns space to MainChat. Pointer preview is frame-coalesced, release commits the preferred width, and Escape/cancellation/lost capture restores the press-time width.
- Native window edges and corners continue to resize the application window, but never resize or reserve the work panel. The preferred panel width remains renderer-local and persists independently of native window bounds.
- The Browser view continues to use the renderer-measured panel rectangle and is detached before the panel exit animation, because a native view cannot follow renderer CSS animation.
Consequences
- Opening and collapsing no longer move the window edge or change the user's application bounds; the panel visibly occupies internal space like the left sidebar.
- MainChat's minimum-width trade-off is amended by ADR 0226: the renderer preserves a 515px chat reservation for the composer, even when the fixed client area cannot show every side dock at its preferred width.
- Native reservation and chat-width IPC shapes remain as compatibility seams, but the current renderer does not use them for panel presentation or resize.
- Native window bounds persistence no longer needs to remove temporary panel geometry.
Alternatives rejected
Keep the native reservation from ADR 0122
Rejected because expanding the whole application window is the outward behavior this change removes.
Overlay the panel without flex allocation
Rejected because it would cover chat content and break the measured Browser surface, keyboard order, and continuous reflow.
References
docs/adr/0033-internal-dock-work-panel.mddocs/adr/0122-reserve-native-width-while-work-panel-visible.mddocs/adr/0146-separate-work-panel-and-chat-resize-ownership.mdapps/desktop/src/App.tsxapps/desktop/src/components/workpanel/WorkPanel.tsxapps/desktop/electron/main/index.ts