Repository navigation
Show several maps at once in a split window - #1
Merged
Merged
Conversation
⇧⌘D, or View › Split View, opens a second pane beside the first, or below it when there is more room that way. Each pane has its own map, view, back and forward; the one last clicked, or reached with ⌃Tab, is the one the keys, the header and the notes work on. ⌥-click a map in the sidebar or the breadcrumbs, or ⌥-double-click a portal, to open it in the other pane, and drag a node across to move it to that map. Both panes, the split and the divider are kept in the session. The panes share the one vault, saver and undo. What belongs to one view is kept on its pane (pane.svelte.ts) or the view's own instance, never in module state, a page-wide id or a page-wide query. Undo selects in the pane that shows what it touched, tidying spares every pane's nodes, and a pane lets go of nodes that have gone. A drag across lands with placeAcross, which refuses a map dropped into a map inside it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
⇧⌘D now splits the pane you are in, the long way of that pane, so a wide screen first goes side by side and a half then goes one above the other, as far as there is room. ⇧⌘W, or a pane's ×, closes the pane you are in; the pane used before it becomes active. ⌃Tab goes round the panes left to right and top to bottom, and "the other pane" for ⌥-click is the one used last. How the panes share the room is a tree (tiling.ts), tested under Node and kept in the session; two panes saved before come back as one split. Each pane is drawn in its own rectangle in one keyed list, so its view is never made again as the tree changes. ⌘Z straight after a split, with nothing changed in the vault since, closes it rather than undoing an earlier edit. A pane too small for the minimap has none. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The window can now be split into panes, each showing a map of its own over the one vault.
Why
To have two or more maps, or two parts of a large map, on screen at once, and to move branches between maps by dragging. One window with panes rather than several windows: each window would hold its own copy of the vault and its own undo, which would drift apart; panes share the one vault, saver, undo and agent door. The design and the steps are in PLAN.md, "Maps side by side".
How
src/ui/pane.svelte.ts: a pane's state (open map, selection, editing, view, back and forward), moved out ofApp.svelte.src/ui/tiling.ts: how the panes share the room, a tree of splits; pure and tested. Panes are drawn in their own rectangles in one keyed list, so a view is never remade as the tree changes.MapViewandOutlineViewtakeactive, and only the active one answers the window's keys and clipboard or takes the focus. Per-view state is no longer module-level or page-wide: cameras are keyed by pane, the link arrow's id is the view's own, the outline finds rows within itself.repairlook at every pane.placeAcrossinmoves.tsdoes a drag between maps, refusing a map dropped into a map inside it.Testing
npm run checkclean;npm run test:core241 passing, new tests for the session, the tiling, cross-map drops and undo's sparing of other panes' nodes. No Rust changes.npm run devin the built-in browser: splitting and closing, ⌃Tab order, the undo guard both ways, keys and clicks reaching only the active pane, ⌃Tab from outline rows, title edits and dialogs, ⌥-open from all three places, divider drags, drags across with one and two nodes, copy and paste across, undo landing in another pane, deleting the map another pane shows, the session after reload.Not tried yet
The desktop app (
npm start, WebKit): ⌃Tab reaching the page, a pinch making a pane active, the new menu items, and ⇧⌘D / ⇧⌘W acting once each (key and menu echo).🤖 Generated with Claude Code