Forks in the panes view: Shift+Enter or a modified click opens beside, not instead

The store's trail becomes the focused branch of the tree of forks. Shift+Enter,
Shift-, Ctrl-, Cmd- or middle-click opens a pane as a new fork; a plain open
replaces the focused fork, or focuses a fork already open. Right of a pane with
forks the space divides into rows that share the height down to a third each
and then scroll, the pane they came from staying at the top; the strip still
scrolls sideways as one. The parent marks each fork's row, link or words, the
focused one as before. [ and ] move between forks, back where the reader was;
q closes a whole fork at its end. A click in another fork focuses it. Too short
or narrow a window draws only the focused branch and says which fork it is.
A plain trail renders exactly as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014yB6q4BHMwptTX3YFtkRab
This commit is contained in:
thalladaandClaude Opus 5.5 committed 2026-11-15 22:48:10 -05:00
1 parent e733e131bb
commit 207002410b
9 files changed
+863 -143

No files matched your search

+3 -1
View File
@@ -6,7 +6,7 @@ import type { Ref } from "../core/ref";
import { clip, overlaps, paragraphs, plain, type Form, type Range } from "../core/text";
import { streamView } from "../core/marks";
import { ownerSection } from "../core/links";
import { ChoiceRows, LinkMark, LinkPreview, NodeBacklinks, NodeRelated, SuggestionCard, TargetRow, articleChoice, sectionChoice, useWikiSuggest, type Choice } from "./Links";
import { ChoiceRows, LinkMark, useForkMark, LinkPreview, NodeBacklinks, NodeRelated, SuggestionCard, TargetRow, articleChoice, sectionChoice, useWikiSuggest, type Choice } from "./Links";
import { store, type Pending } from "./store";
// ---- inline text ----
@@ -47,6 +47,7 @@ const MARK = /\*([^*\n]+)\*|`([^`\n]+)`/g;
function Para(props: { id: NodeId; range: Range; notes: VNote[]; inline: boolean; inNote: boolean; first: boolean }) {
const { id, range, notes, inline } = props;
const snap = store.snap;
const forkMark = useForkMark();
const body = snap.nodes[id].body;
const [ps, pe] = range;
const cuts = new Set<number>([ps, pe]);
@@ -104,6 +105,7 @@ function Para(props: { id: NodeId; range: Range; notes: VNote[]; inline: boolean
note?.open && "on",
note?.pending && "writing",
link?.link && !note && `lnk l-${link.ref!.kind}${link.open ? " on" : ""}`,
forkMark && (note ?? link)?.id && forkMark(`n:${(note ?? link)!.id}`, link?.ref && store.targetKey(link.ref)),
sel && sel[0] <= a && sel[1] >= b && `sel ${f.grain}`,
within(srcRanges, a, b) && "src",
sugg && `sugg${sugg.tier === "auto" ? " sure" : ""}`,