Repository navigation
Description
Important
Problem — The Work Column (Preview, Files Changed, Context, Pulse Inspector) is capped at 60% of the window width. When editing a .tex file alongside the compiled PDF in a split pane, both views are cramped. There is no discoverable way to give the Preview full-screen width for focused editing.
Approach — Make Chat and the Work Column fully flexible peers: remove the 60% width cap, add a Chat-collapse threshold, a maximize toggle button with tooltip-shown hotkey, and double-click-on-divider snap gestures. The Preview stays in the same webview (no cross-webview state transfer); it just gets more room.
Approaches considered — (A) Preview as a promoted session tab in the Amicode tab strip — better long-term UX but requires new routing, a new tab type, and state relocation (~1 week). (B) Cross-webview detach into its own VS Code editor tab (JJ's ADR-0014 / #977) — full isolation but requires write-ahead journaling, lease protocol, and state codec (~months). (C) Flexible split with cap removal and discoverable toggle — delivers 80% of the value with 20% of the effort (~1 day). Chosen: C.
Scope — In: remove 60% width cap, Chat minimum width + collapse, maximize toggle button in Work Column header with tooltip hotkey, Cmd+Shift+M keyboard shortcut, double-click-on-divider snap gestures, restore chevron on collapsed Chat edge. Out: cross-webview detach (#977), new tab type in the tab strip, Preview as a session-level route, multi-monitor support.
Assumptions — The Work Column stays in the same webview as Chat (no state serialization needed). The retained-pool renderer architecture is unchanged. The resize handle already exists and works; this extends its range.
Acceptance Criteria
Cap removal + Chat collapse
- The Work Column can be resized to fill the full window width (no 60% cap)
- The Chat panel has a minimum width (200px); dragging the divider past it collapses the Chat entirely
- A collapsed Chat shows a restore chevron on the left edge of the Work Column
- Clicking the restore chevron (or pressing Cmd+Shift+M) restores the Chat to its previous width
Maximize toggle button
- A maximize/restore button appears in the Work Column header (expand icon when Chat is visible, collapse icon when Chat is hidden)
- Clicking it toggles between full-width Preview and the previous split layout
- Hovering the button shows a tooltip: "Maximize Preview (⌘⇧M)" / "Show Chat (⌘⇧M)"
- The button is always visible when the Work Column is open
Keyboard shortcut
- Cmd+Shift+M (Ctrl+Shift+M on Linux/Windows) toggles between full-width Preview and the previous split
- The shortcut works regardless of focus (Chat, editor, PDF)
Double-click snap (power user)
- Double-clicking the resize handle cycles: 50/50 split → full Preview → default width (330px)
- The cycle is predictable and repeatable
State preservation
- The maximized/collapsed state does NOT persist across session switches or window reloads (transient UI state)
- The user's custom split width (before maximize) is restored on toggle-back
- All Work Column surfaces (Preview, Files Changed, Context, Pulse Inspector) benefit from the expanded width
Key Decisions
- No new tab type — the Work Column stays in the side panel, just gets more room. A promoted-tab architecture (Approach A) is a valid follow-up but not needed for this.
- Chat collapse, not hide — the Chat element gets
display: none+ a restore affordance, not permanent removal. The session's chat state is unaffected. - Tooltip-first discoverability — the hotkey is shown in the button tooltip, not memorized. The button is the primary interaction; the hotkey is secondary; double-click is tertiary.
- Benefits all Work Column surfaces — not just Preview. Files Changed and the Pulse Inspector also benefit from wider layouts.
Implementation
| File | Change |
|---|---|
session-panel-width.ts |
Remove 0.6 cap in workColumnWidthMax; add CHAT_MIN_WIDTH constant (200px) |
session.tsx |
Add Chat collapse logic (when width < min, set display: none); add restore chevron; wire Cmd+Shift+M |
session-side-panel.tsx |
Add maximize toggle button in the Work Column header; tooltip with hotkey |
session-panel-width.ts |
Add double-click handler on ResizeHandle for snap cycle |
Prior Art
session-panel-width.ts:29-31— the 60% cap (workColumnWidthMax)session.tsx:2819-2831— the resize handlesession-side-panel.tsx:663-677— the side panel resize handlelayout.tsx:740-744— the persisted column width signal- Make the Work Column dockable and transactionally detachable #977 / ADR-0014 — the cross-webview detach design (follow-up if same-webview flexibility proves insufficient)
- Auto-split: open .tex and companion .pdf side by side #1255 — auto-split .tex + .pdf (complementary — the split layout inside the maximized column)
Source
Supersedes the original #1434 scope. Part of #1430 (Overleaf parity phase 2). Part of #1252. Complementary to #977 (the cross-webview detach is a valid follow-up).
Activity
jacktrnr commentedon Sep 24, 2026
Design revised — Approach C: Flexible split (same-webview, no cap)
The original issue proposed a maximize toggle with a hidden Cmd+Shift+M shortcut. After brainstorming three approaches:
We chose C. It delivers full-width .tex + .pdf editing with minimal effort. The toggle button with tooltip-shown hotkey replaces the hidden-shortcut approach — discoverability first.
This supersedes the original #1434 scope. #977 remains a valid follow-up if same-webview flexibility proves insufficient.
Approach A (promoted tab) is the next step if researchers want Preview as a peer of Chat in the tab strip rather than an expanded side panel.
fix(app): remove Icon import that caused circular dep crash (#1434)
fix(app): move chatCollapsed signal above workColumnWidth memo (#1434)
jacktrnr commentedon Sep 28, 2026
Sub-issues: UX polish for the flexible split
The initial implementation (PR #1548) delivers the mechanics but needs UX refinement. Five sub-issues, in priority order:
Ship order: #1609 → #1610 + #1611 (parallel) → #1613 → #1612.
jacktrnr commentedon Sep 28, 2026
Additional sub-issue: scroll loop on restore
width: 0; overflow: hiddeninstead. Related to fix: eliminate scroll jank — competing scroll-to-bottom mechanisms and janky resume button #1510 (the deeper competing-scroll-mechanisms fix).Updated priority order:
fix(app): Work Column maximize does not fill the full window width (#1434) #1609(full-width bug — fixed in8e59da31)feat(app): 'Wide' toggle pill for full-width Work Column (#1434)
fix(app): remove row padding and gap in wide mode for true full-width (…
fix(app): use position:absolute to fully remove Chat from flex flow i…