Pages, from a real phone: the pane gone to has the page's height; dots for a page's panes in the trail; a 140 ms glide; the map as a tree; a held pane moves; a one-row selection bar; a tap on a link only opens it

- A shared page stacks whenever a share would cut the pane looked at short (stack.ts crowds; desktop unchanged).
- Each trail step shows a dot per pane on its page, its own filled in its colour; past four, the number.
- The strip glides to a page in 140 ms easing out (rAF, snapping off on the way), at once with reduced motion; a finger takes it from a glide.
- The map draws tree lines from each parent into each child in the child's colour (pages.ts rails), crisp borders, deep forests indented less.
- A press held on a pane's tab or the band above its title picks it up (touch), drop line and ghost, edge scroll, a second finger cancels; Move this pane up/down in the pane menu (Alt+Shift+k j).
- The docked selection bar is one row: actions scroll sideways under a fade, the ⋯ and × fixed at its end.
- The hover preview is the mouse's only (pointerType), dropped on any press, click or pane change; the keyboard preview is not shown on touch.

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-17 11:55:30 -05:00
1 parent d3c2ea452a
commit 99aae86dff
14 files changed
+1163 -120

No files matched your search

+46 -2
View File
@@ -1,6 +1,6 @@
import { describe, expect, it } from "vitest";
import { close, open, plain, trace, type Forest } from "../src/ui/forks";
import { arrived, findKey, loadVisits, pageAt, paneKey, paneOfPage, visit, type Visits } from "../src/ui/pages";
import { all, close, open, plain, trace, type Forest } from "../src/ui/forks";
import { arrived, findKey, loadVisits, mapStep, pageAt, paneKey, paneOfPage, rails, visit, type Visits } from "../src/ui/pages";
const same = (a: string, b: string) => a === b;
const k = (r: string) => r;
@@ -95,4 +95,48 @@ describe("the pages layout", () => {
expect(v.keys).toHaveLength(200);
expect(v.keys[v.i]).toBe("k240");
});
it("the map's tree lines: a line into each child from its parent's, on toward a later sibling, through the rows between, and down from a parent to its first child", () => {
// top ─ a ─ b
// │ └ c
// └ d
let f: Forest<string> = plain(["top", "a", "b"]);
f = open(f, 1, "c", true, same);
f = open(f, 0, "d", true, same);
const placed = all(f);
const name = new Map(placed.map((x) => [x.node.id, x.node.ref]));
const lines = rails(placed).map((rs, i) => [placed[i].node.ref, rs.map((r) => `${r.kind}@${r.level}>${name.get(r.tid)}`).sort().join(" ")]);
expect(lines).toEqual([
["top", "dash@0>top down@0>a"],
["a", "down@1>b elbow@0>a on@0>d"],
["b", "elbow@1>b on@1>c pass@0>d"],
["c", "elbow@1>c pass@0>d"],
["d", "elbow@0>d"],
]);
});
it("an orphan has no line into it, only its mark; its own children hang from it", () => {
let f: Forest<string> = plain(["top", "a", "b", "e"]);
const a = f.trees[0].kids[0];
const b = a.kids[0];
f = { ...f, trees: f.trees.map((t) => ({ ...t, kids: t.kids.map((k) => ({ ...k, kids: k.kids.map((x) => ({ ...x, pinned: true })) })) })) };
const g = close(f, a.id, b.id).forest;
expect(g.trees).toHaveLength(2);
const placed = all(g);
const rs = rails(placed);
const orphan = placed.findIndex((x) => x.node.ref === "b");
expect(placed[orphan].col).toBe(2);
expect(rs[orphan].map((r) => `${r.kind}@${r.level}`)).toEqual(["dash@2", "down@2"]);
const e = placed.findIndex((x) => x.node.ref === "e");
expect(rs[e].map((r) => `${r.kind}@${r.level}`)).toEqual(["elbow@2"]);
// Nothing from the first tree runs into the orphan's rows.
expect(rs[orphan].some((r) => r.kind === "pass")).toBe(false);
});
it("the map indents a finger's width a level, less in a deep forest, never under 8 px", () => {
expect(mapStep(0)).toBe(16);
expect(mapStep(8)).toBe(16);
expect(mapStep(10)).toBe(14);
expect(mapStep(40)).toBe(8);
});
});