Skip to content

feat(app): Fullscreen / maximized Preview for .tex + .pdf side-by-side editing #1434

Closed

Description

@jacktrnr

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

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

  1. self-assigned this
    on Sep 22, 2026
  2. jacktrnr commented on Sep 24, 2026

    @jacktrnr
    ContributorAuthor

    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.

  3. jacktrnr commented on Sep 28, 2026

    @jacktrnr
    ContributorAuthor

    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:

    # What Effort Priority
    #1609 Full-width bug — Work Column doesn't fill 100% when Chat collapses ~1 hr P0 — blocks everything
    #1610 Smooth animation — animated width transition for collapse/restore ~2 hr P1 — the biggest feel improvement
    #1611 Discoverable restore — VS Code-style strip on the left edge ~1 hr P1 — users get stuck without it
    #1613 Button in tab strip — move the maximize button from absolute to the header ~1 hr P2 — visual polish
    #1612 Magnetic snap zones — snap feedback during drag ~2 hr P3 — power-user delight

    Ship order: #1609 → #1610 + #1611 (parallel) → #1613 → #1612.

  4. jacktrnr commented on Sep 28, 2026

    @jacktrnr
    ContributorAuthor

    Additional sub-issue: scroll loop on restore

    Updated priority order:

    1. fix(app): Work Column maximize does not fill the full window width (#1434) #1609 (full-width bug — fixed in 8e59da31)
    2. fix(app): Chat restore from collapse triggers infinite scroll loop (#1434) #1614 (scroll loop — P0 blocker, the feature is unusable until this is fixed)
    3. feat(app): smooth animated transitions for Work Column collapse/restore (#1434) #1610 (smooth animation)
    4. feat(app): discoverable restore affordance when Chat is collapsed (#1434) #1611 (discoverable restore)
    5. feat(app): maximize button in the Work Column tab strip header (#1434) #1613 (button in tab strip)
    6. feat(app): magnetic snap zones and visual feedback on resize handle drag (#1434) #1612 (magnetic snap zones)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions