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

+21 -1
View File
@@ -28,6 +28,9 @@ const top = (more: Partial<TopCtx> = {}): TopCtx => ({ view: "auto", autolink: "
/** Every key the page's handler takes, read from keys.ts: an item's key must be one of them. */
const handled = new Set([...readFileSync(new URL("../src/ui/keys.ts", import.meta.url), "utf8").matchAll(/case "([^"]+)":/g)].map((m) => m[1]));
/** The Alt keys the page's handler takes (by the key's place: KeyH, ArrowUp…), written as the menus press them ("A-h"). */
const altKeys = new Set([...readFileSync(new URL("../src/ui/keys.ts", import.meta.url), "utf8").matchAll(/^\s+(Key[A-Z]|Arrow\w+): \(\) =>/gm)].map((m) => `A-${m[1].startsWith("Key") ? m[1].slice(3).toLowerCase() : m[1]}`));
describe("actions", () => {
it("every item with a key runs by pressing exactly that key, which the key handler takes", () => {
const { act, calls } = recorder();
@@ -38,6 +41,7 @@ describe("actions", () => {
...items(nodeEntries(node({ library: true }), act)),
...items(paneEntries({ node: node(), pinned: false }, act)),
...items(paneEntries({ article: "Octopus", pinned: true }, act)),
...items(paneEntries({ node: node(), pinned: false, above: true, below: true }, act)),
...items(articleRowEntries("Octopus", true, act)),
...items(topEntries(top({ canRedo: true }), act)),
...items(libraryEntries({ title: "Work", current: false, last: false }, act)),
@@ -48,7 +52,7 @@ describe("actions", () => {
calls.length = 0;
it.run();
expect(calls).toEqual([`press ${it.shift ? "S-" : ""}${it.key}`]);
expect(handled.has(it.key!) || it.key === "Escape", `${it.label}: ${it.key}`).toBe(true);
expect(handled.has(it.key!) || it.key === "Escape" || altKeys.has(it.key!), `${it.label}: ${it.key}`).toBe(true);
}
});
@@ -191,6 +195,22 @@ describe("actions", () => {
});
});
describe("moving a pane in its column", () => {
it("the pane menu offers Move this pane up and down (Alt+Shift+k j) only where its column has another pane, greyed where it cannot go", () => {
const { act, calls } = recorder();
expect(labels(paneEntries({ node: node(), pinned: false }, act))).not.toContain("Move this pane up");
const es = paneEntries({ node: node(), pinned: false, above: false, below: true }, act);
const up = find(es, "Move this pane up");
const down = find(es, "Move this pane down");
expect(up.disabled).toBe(true);
expect(down.disabled).toBe(false);
expect([up.keyText, down.keyText]).toEqual(["Alt+⇧k", "Alt+⇧j"]);
down.run();
expect(calls).toEqual(["press S-A-j"]);
expect(labels(paneEntries({ article: "Octopus", pinned: false, above: true, below: false }, act))).toContain("Move this pane up");
});
});
describe("the libraries panel's state", () => {
const lib = (id: string, title = id): LibraryInfo => ({ id, title, created: "", nodes: 0, branches: ["main"] });
const list = [lib("a"), lib("b"), lib("c")];