You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem -- #944 creates multiple live Preview panes, but the former single-pane controls cannot remain shared. Researchers need to tell which pane receives a new file and adjust one pane's zoom without changing another. This must happen without duplicating the renderer-owned preview/edit state or recreating a moved renderer.
Approach -- Add pane-scoped presentation around the existing renderer controls. Each leaf owns only its zoom value and focus chrome. The renderer continues to own its own preview/edit mode, document state, local scroll, and control behavior. When a tab moves, its stable renderer host adopts the destination pane's zoom accessor without being recreated.
Scope -- in: independent pane zoom values, wiring existing controls to the active pane, focused-pane indication, destination-pane zoom adoption after transfer, and browser coverage for these behaviors. Out: a new editor control implementation, a duplicated preview/edit mode store, breadcrumb navigation, renderer lifecycle changes, draft storage, scroll persistence, or automatic tab eviction.
Assumptions -- #942 through #944 are green. Every leaf has a stable identity and the renderer pool can relocate a host without recreation. The existing Preview renderer already provides the zoom and preview/edit controls; this slice scopes their inputs rather than replacing their UI logic.
Acceptance Criteria
Each leaf pane has its own stored zoom value, initially inheriting the source pane's value when the leaf is created.
Changing zoom in one visible pane does not change any other pane's zoom.
Existing zoom controls, wheel/pinch zoom behavior, and category-aware effective zoom continue to run through the baseline renderer path.
A renderer host moved to another pane adopts the destination pane's zoom value without recreation, document replacement, focus loss, or scroll restoration.
Markdown preview/edit mode remains renderer-owned and file-local. This slice does not create a pane-level mode store or duplicate an existing mode value.
Hidden inactive renderer hosts do not expose interactive controls or receive pointer input.
The focused-pane indicator and controls do not move editor focus to the composer or alter renderer scroll state.
Browser tests prove two panes can hold different zoom values, a moved renderer adopts the destination value while retaining identity and content, and focused-pane chrome tracks actual pane targeting.
Key Decisions
Zoom belongs to a pane; mode belongs to a renderer. Zoom describes the viewport into a leaf pane. Preview/edit mode describes the individual file renderer currently shown there. Keeping those scopes separate avoids turning renderer-owned state into workspace data.
This is control wiring, not a control rewrite. The existing Preview renderer remains responsible for its controls' rendering, wheel behavior, and category semantics. The workspace supplies the pane-local zoom accessor and does not import or reimplement CodeMirror behavior.
Focused-pane chrome is observational. It communicates routing state but does not steal focus, mutate a document, or create a second active-editor model.
Testing Decisions
Extend the real-browser suite with a two-pane fixture that verifies:
independent zoom values remain independent after repeated tab changes;
a transfer relocates the same renderer host and applies destination-pane zoom;
Markdown edit mode remains local to the renderer across pane targeting;
clicking panes, splitting, and transferring updates visual focused-pane chrome;
controls and chrome do not move focus from a visible CodeMirror editor or reset its local scroll.
Unit tests may cover pane-zoom selection and inheritance. Browser tests remain authoritative for renderer identity, control wiring, and focus behavior.
Important
Problem -- #944 creates multiple live Preview panes, but the former single-pane controls cannot remain shared. Researchers need to tell which pane receives a new file and adjust one pane's zoom without changing another. This must happen without duplicating the renderer-owned preview/edit state or recreating a moved renderer.
Approach -- Add pane-scoped presentation around the existing renderer controls. Each leaf owns only its zoom value and focus chrome. The renderer continues to own its own preview/edit mode, document state, local scroll, and control behavior. When a tab moves, its stable renderer host adopts the destination pane's zoom accessor without being recreated.
Scope -- in: independent pane zoom values, wiring existing controls to the active pane, focused-pane indication, destination-pane zoom adoption after transfer, and browser coverage for these behaviors. Out: a new editor control implementation, a duplicated preview/edit mode store, breadcrumb navigation, renderer lifecycle changes, draft storage, scroll persistence, or automatic tab eviction.
Assumptions -- #942 through #944 are green. Every leaf has a stable identity and the renderer pool can relocate a host without recreation. The existing Preview renderer already provides the zoom and preview/edit controls; this slice scopes their inputs rather than replacing their UI logic.
Acceptance Criteria
Key Decisions
Zoom belongs to a pane; mode belongs to a renderer. Zoom describes the viewport into a leaf pane. Preview/edit mode describes the individual file renderer currently shown there. Keeping those scopes separate avoids turning renderer-owned state into workspace data.
This is control wiring, not a control rewrite. The existing Preview renderer remains responsible for its controls' rendering, wheel behavior, and category semantics. The workspace supplies the pane-local zoom accessor and does not import or reimplement CodeMirror behavior.
Focused-pane chrome is observational. It communicates routing state but does not steal focus, mutate a document, or create a second active-editor model.
Testing Decisions
Extend the real-browser suite with a two-pane fixture that verifies:
Unit tests may cover pane-zoom selection and inheritance. Browser tests remain authoritative for renderer identity, control wiring, and focus behavior.
Constraints And Invariants
PreviewFileVieworPreviewEditorunless a Preview workspace slice 1 — baseline renderer interaction contract #942 interaction regression proves the existing renderer contract cannot accept a pane-local zoom accessor.Source
Part of #940 and ADR 0013. Blocked by #942, #943, and #944. Replaces this issue's former nested-DnD implementation plan; DnD is owned by #944.