Skip to content

feat(app): Wide mode — full-width Work Column toggle (pill + ⌘⇧M) - #1548

Merged
jacktrnr merged 9 commits into
mainfrom
feat/flexible-split-preview
Nov 7, 2026
Merged

jacktrnr merged 9 commits into
mainfrom
feat/flexible-split-preview

Conversation

@jacktrnr

@jacktrnr jacktrnr commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1434. Part of #1430 (Overleaf parity phase 2). Part of #1252.

What

Editing .tex beside its compiled PDF was cramped: the Work Column is capped at 60% of the window. This adds a Wide mode that takes the Work Column full-width on demand.

  • Wide pill in the Work Column header toggles Wide mode; its tooltip shows the hotkey.
  • ⌘⇧M (Ctrl+Shift+M off macOS) toggles it from anywhere.
  • In Wide mode Chat is taken out of flow with position: absolute; visibility: hidden (not display: none, which caused the fix: eliminate scroll jank — competing scroll-to-bottom mechanisms and janky resume button #1510 scroll cascade), the row's padding and gap drop, and the resize handle is hidden.
  • Leaving Wide mode restores the column width you had before.
  • The resize handle itself keeps the 60% cap: only the toggle goes full-width.

The original plan (remove the cap, collapse Chat below 200 px, double-click snap positions, drag-to-collapse) was dropped during the branch's fixes (#1609, #1614) in favour of the explicit toggle.

Files

File Change
session.tsx wideMode signal, toggleWide, ⌘⇧M handler, Chat out of flow in Wide mode
session-side-panel.tsx isWide / onToggleWide props, the Wide pill
manifest.json hashes refreshed with scripts/refresh_manifest.mjs

Testing

Merged with main (918 commits; only manifest.json conflicted, regenerated, drift gate PASS locally). CI green on the merged head, including app-bundle-gate, engine-tests, fast, vsix-gate and boot-smoke on Linux x64/arm and macOS.

…ize toggle (#1434)

The Work Column was capped at 60% of the window width, cramping the
Preview editor when editing .tex alongside a compiled PDF. This removes
the cap and makes Chat and the Work Column fully flexible peers:

- Remove the 60% width cap in workColumnWidthMax (now 100%)
- Chat collapses when squeezed below 200px (CHAT_COLLAPSE_THRESHOLD)
- Maximize toggle button (expand/collapse icon) at top-right of the
  Work Column, with tooltip showing the hotkey
- Cmd+Shift+M (Ctrl+Shift+M) keyboard shortcut to toggle
- Double-click on the resize handle cycles: 50/50 → full → default
- Restore chevron on the collapsed Chat edge
- Drag-to-collapse: dragging the handle past the Chat threshold
  auto-collapses; dragging back restores

All Work Column surfaces benefit (Preview, Files Changed, Context,
Pulse Inspector), not just .tex editing.
@jacktrnr jacktrnr self-assigned this Sep 24, 2026
@coderabbitai

coderabbitai Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9de10dc3-fdce-4675-a3d6-520b256c3a74
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Tip

🎯 Customize your risk assessments

Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.

✅ Automatic approvals, with your rules

Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Jackson Turner and others added 2 commits September 24, 2026 16:34
The Icon import from @opencode-ai/ui/icon created a circular dependency
in the Vite bundle, causing 'Cannot access Se before initialization' at
runtime. Replace with inline SVG chevrons — same visual, no import.
The minified Vite bundle respects declaration order — workColumnWidth
was reading chatCollapsed() before the signal was declared, causing
'Cannot access Se before initialization' at runtime. Move the signal
declarations above the memo that reads them.
Jackson Turner added 5 commits September 28, 2026 10:54
Three fixes for the full-width bug:

1. When Chat is collapsed, the Work Column uses flex:1 instead of a
   fixed pixel width — it naturally fills the entire flex row regardless
   of gaps, padding, or sibling spacing.

2. The restore chevron moves inside the Work Column (absolute-positioned
   on its left edge) instead of being a sibling flex item that stole
   space from the available width.

3. The maximize button only renders when Chat is visible; the restore
   strip only renders when Chat is collapsed — clean state separation.

Also reduces the maximize button opacity from 60% to 40% at rest for
less visual noise.
…l loop (#1614)

When the Chat panel used `display: none` (Tailwind `!hidden`) while
collapsed, restoring it caused every element to regain geometry at once,
triggering a cascade of ResizeObserver callbacks across three competing
scroll-to-bottom mechanisms (createAutoScroll, anchorResizedBottom,
maybeAnchorBottom). The instant and animated scrolls fought each other
against a still-settling scrollHeight, producing an infinite oscillation.

Fix: collapse the Chat with `width: 0; overflow: hidden; opacity: 0;
pointer-events: none; flex-basis: 0` instead of `display: none`. The
DOM stays alive with its scroll geometry intact — no ResizeObserver
burst, no virtualizer re-measure storm, no scroll fight. On restore,
only the width and opacity change, which the scroll container handles
gracefully.

Related to #1510 (the deeper competing-scroll-mechanisms fix).
Revised approach: keep the 60% resize cap untouched, add a dedicated
fullscreen toggle that overrides it.

- 'Wide' / 'Exit Wide' pill in the Work Column tab strip header, next
  to PanelMenu. Visible, labeled, self-documenting — no hidden icons.
- Cmd+Shift+M (Ctrl+Shift+M) keyboard shortcut toggles wide mode.
- When wide: Chat collapses to width:0 + overflow:hidden (not
  display:none — preserves scroll geometry, avoids the #1510 cascade).
  Work Column fills the row via flex:1.
- When exiting wide: Chat restores to previous width, resize handle
  resumes normal bounded operation.
- Tooltip shows the hotkey on hover.
- Pill appears in both rendering paths (standard and v2 file browser).

The 60% drag cap, resize handle, and all existing layout behavior are
completely unchanged — wide mode is a separate boolean override.

Reverts the cap removal and drag-to-collapse from earlier commits.
…#1434)

The flex row has gap-1.5 (6px) and px-1.5 (6px each side) padding when
the new layout is active. In wide mode, these eat 18px from the Work
Column's available width, preventing a true full-width fill. Remove the
horizontal gap and padding when wideMode is on (vertical padding stays).

The Chat div's flex: 0 0 0px + overflow: hidden already makes it take
zero space, but the gap between the zero-width Chat item and the Work
Column was still rendered by the browser.
…n wide mode (#1434)

The previous width:0 + flex:0 approach still left the Chat div as a
flex item — its @container registration, rounded border, and zero-width
box could still consume layout space and interact with flex gap. Using
position:absolute + visibility:hidden takes the Chat completely out of
normal flow while preserving its DOM and scroll geometry (unlike
display:none which triggers the #1510 scroll cascade). The Work Column
with flex:1 now gets 100% of the flex row with no gap, padding, or
sibling interference.
# Conflicts:
#	packages/app-bundle/manifest.json
@jacktrnr jacktrnr changed the title feat(app): flexible split — remove 60% cap, add Chat collapse + maximize toggle feat(app): Wide mode — full-width Work Column toggle (pill + ⌘⇧M) Nov 7, 2026
@jacktrnr
jacktrnr merged commit a8874f6 into main Nov 7, 2026
12 checks passed
@jacktrnr
jacktrnr deleted the feat/flexible-split-preview branch November 7, 2026 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant