Skip to content

feat: Notepad++-style split view (two editor panes)#1

Merged
codecancu merged 1 commit into
mainfrom
feat/split-view
Jul 6, 2026
Merged

feat: Notepad++-style split view (two editor panes)#1
codecancu merged 1 commit into
mainfrom
feat/split-view

Conversation

@codecancu

Copy link
Copy Markdown
Owner

Enable View → Split Horizontal / Split Vertical (previously disabled). Faithful two-view model: two independent editor panes, each with its own tab strip; documents belong to one pane (move-only, no live clone); the split persists across reload.

  • DocumentStore: per-doc view tag, per-view active tracking + focused view, listForView/activeForView/moveToView/hasView; focused-view-aware active()/activeId/setActive shims keep existing callers working.
  • DockManager: secondary editor group (addSecondaryEditorGroup / removeSecondaryEditorGroup / isSplit / onEditorFocusChange), two-phase host→mount so the CM6 view is created only after the dock panel exists.
  • editor-page: second EditorView/EditorController via a lazy factory; shared extensions parameterised per pane; Lua bridge + inspectors follow the focused pane.
  • App: view/controller getters over focused refs route every command to the focused pane with no per-call-site churn; split orchestration, Move to Other View, collapse-on-empty, session restore of the split.
  • TabBar: view-scoped rendering + Move to Other View context item.
  • StatusBar: cursor follows the focused pane (document-level, view-tagged).
  • Persistence: SessionSnapshot gains per-view active ids + split orientation (additive; no IndexedDB version bump).

Tests: +5 store multi-view, +5 dock split-group unit tests; new split-view.spec.ts e2e (create / independent edit / move + collapse / reload persistence). 640 unit + 179 e2e pass; typecheck, lint, build clean.

What & why

Checklist

  • Signed off (DCO -s flag on all commits)
  • npm run lint passes
  • npm run typecheck passes
  • npm test passes
  • Added or updated tests for behavior changes
  • New source files include // SPDX-License-Identifier: GPL-3.0-or-later

Enable View → Split Horizontal / Split Vertical (previously disabled).
Faithful two-view model: two independent editor panes, each with its own
tab strip; documents belong to one pane (move-only, no live clone); the
split persists across reload.

- DocumentStore: per-doc `view` tag, per-view active tracking + focused
  view, listForView/activeForView/moveToView/hasView; focused-view-aware
  active()/activeId/setActive shims keep existing callers working.
- DockManager: secondary editor group (addSecondaryEditorGroup /
  removeSecondaryEditorGroup / isSplit / onEditorFocusChange), two-phase
  host→mount so the CM6 view is created only after the dock panel exists.
- editor-page: second EditorView/EditorController via a lazy factory;
  shared extensions parameterised per pane; Lua bridge + inspectors follow
  the focused pane.
- App: view/controller getters over focused refs route every command to
  the focused pane with no per-call-site churn; split orchestration,
  Move to Other View, collapse-on-empty, session restore of the split.
- TabBar: view-scoped rendering + Move to Other View context item.
- StatusBar: cursor follows the focused pane (document-level, view-tagged).
- Persistence: SessionSnapshot gains per-view active ids + split
  orientation (additive; no IndexedDB version bump).

Tests: +5 store multi-view, +5 dock split-group unit tests; new
split-view.spec.ts e2e (create / independent edit / move + collapse /
reload persistence). 640 unit + 179 e2e pass; typecheck, lint, build clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@codecancu codecancu merged commit 13d43b1 into main Jul 6, 2026
1 check passed
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.

1 participant