Using a page

Using a Leaf page

An agent hands the user a page about its work. The user reads it, comments on exact passages, makes the choices it asks for, and follows what the agent is doing, by keyboard, pointer or touch.

This guide is for the person working on a page: the floating panel, threads, On Me, and the keys and touch routes. How it works explains the mechanism behind it, and Extending covers writing pages and packages. Leaf is experimental software. Browser support gaps lists what is known to differ in Chrome, Edge, Firefox and Safari and their mobile versions.

In this topic

Panel, rail and thread cards

Leaf adds controls around the authored HTML. This interface is called chrome: the Leaf panel floating at the window's foot, comment and decision markers, and thread cards. At rest the panel is one row: the comment field, which shows the agent's status while it is empty; and at its end the leaf, coloured by the agent's state, counting what waits on the user, with a dot while a thread holds a reply they haven't read. The leaf opens the On view above the row, whose tabs are a menu of the page's other controls, On Me and Threads: on the menu while it holds an error the user hasn't seen, else on On Me while anything waits on the user, else on Threads while a thread has news, and otherwise on the menu. Pressing the leaf again closes the view. A folded panel shows only the leaf in the window's corner.

The On view shows one list at a time, under a tab named for its actor, with completed items under Done, and a Threads tab listing the open threads under Open, then the resolved ones under Resolved. On Me, below, says what the lists hold and how an item is answered. Opening a view preserves the page’s text wrapping and reading position.

The panel's row floats over the foot of the page and takes no room from it; press . to fold it to its leaf in the corner. A view opens above the row and overlays the page without moving its content. Escape or a press on the page closes the view. Phones and touch screens describes the panel on a touch screen.

The rail is the strip to the right of main where Leaf places comment and decision markers. It appears when the window has enough space: about 960px on a column page or about 1920px on a sidebar page. Where no rail fits, and inside a scrolling pane, a small pin appears beside the target on the page. Leaf places it clear of text and controls when space permits. The g H shortcut hides pins and passage highlights.

A thread card opens beside its marker in the margin. If the margin is narrower than the card, it overlaps the text's edge. Threads, a thread opened in the panel, the On view and All pages open as views above the panel's row, one at a time.

Rail Comment field
Panel and rail The panel's row floats over the foot of the window and takes no room from the page. On a column page, the rail sits in the margin beside the column and takes no width from it.
Threads, On or All pages Comment field
A view above the row Threads, the On view and All pages open one at a time above the panel's row. The page keeps its width underneath.
Thread card Comment field
A thread card It opens in the margin and overlaps the edge of the text only where the margin is too narrow. Nothing below it moves.

What the panel's line says

The panel's comment field, while empty, is Leaf's one line of words about the page. It says one thing at a time, the first of these that applies:

Reading Example
An error about no particular box, until the user next types Couldn't load v3
Keys pressed while the page loads, until it is ready g t run when the page is ready
Where words go, while the caret is in the field Comment…, Reply…
Words selected on the page, which a press on the field or c comments on “the queue fills”
A notice for four seconds, and then until the next input for an undo's or one answering the user's own action with a press; Go-to finding nothing, while its filter waits for a key; a walk's position for four seconds after each step Updated to v4, No visible threads, Thread 2 of 5
The page's status, after where the user stands, such as an older version running the browser suite, v1 of 2 · running the browser suite

With a thread open, the field is that thread's reply box. It says whose turn it is beside the leaf, such as Your turn, and Reply with the key that enters it at the line's end while that key enters it; a notice takes the turn's place while it stands, and a walk's position follows whose turn it is. A touchscreen shows no keys, so there the field itself says Reply…, or Reply to reopen… on a resolved thread.

In a mode, such as Draw mode, the row is the mode's: its name in a word, Draw, stands beside the ✕ at the row's end, which leaves it, as a search's does, and the field takes no words until it ends, offering neither Reply nor the microphone. esc ends a mode entered from an open thread before it closes the thread, and closes a thread opened in a mode first.

At its end the line offers the one press that matters now, with its key: in a mode Close esc, else Open latest on an older version, otherwise Next On Me m while something waits on the user, and Comment… c once nothing does. After a Resolve it offers Next thread t, and with news of changes since the version the user last saw, Show changes g V v. A press stands there only while its key would make it, so with the caret in a reply, where m types a letter, the end is empty until the caret leaves, and Close leaves it while esc would first close a thread opened in the mode. A touchscreen shows no keys, so the end offers no press there; the panel's menu and lists reach each one, and the mode's ✕ closes it.

A middle dot joins separate facts, as in v1 of 2 · Thread 2 of 5, and a dash attaches a detail to the fact before it. Only words the agent wrote, such as the line it gave its work, read in its voice; what Leaf says itself, such as Stopped 3m ago, is set in italic. Words the user is writing hide the line, while screen readers still hear notices and changes of status. The line's words read dimmer than words written in it, and a passing notice a step brighter. The leaf and the tab's icon keep the status's colour throughout. Where the field cuts its words short, pointing at it or holding a finger on it shows them whole, and the leaf's menu holds the status's full sentence. A folded panel shows notices beside the leaf.

On Me

The leaf at the end of the panel's row counts what waits on the user: each choice a widget asks them to make, each question the agent asks them in a thread, and each update of theirs that failed to send. Pressing the leaf, or o, opens the list, and ← / → turn to the agent's list, Threads and the menu beside it; m walks the items in the order the list shows them, landing on each where it is answered.

The user answers an item where it asks: with the widget's own pick, or with a reply in its thread, in words or a reaction such as 👍. Leaf adds no control of its own to end one. The tab named for the agent holds what it still owes: answers to the user's updates, and its open to-dos. Done holds each list's finished items. The On lists in How it works says exactly what belongs on each.

Notices

A notice stands in the panel's line for four seconds, and an undo's or one answering the user's own action with a press then stays until the next input. Each is announced to screen readers. Simultaneous news shares one notice, such as Not answered · New On Me. Some news is only announced, since something on the page already shows it: an agent message the user hasn't read, which the leaf's dot and its margin marker show, and the user's own gesture, which the widget draws where it was made. Opening a page announces only unread agent messages, not its existing activity. The agent starting or stopping work is no notice: the status in the same line says it.

Notice When
I shortened the lede., Edited: …, 3 replies in 2 threads Announced only: an agent message the user hasn't read arrives, or one is edited. One message speaks for itself in its opening words, including anything it asks of the user.
New On Me, 2 new On Me Something new waits on the user, such as a question a reply asks or a decision a revision adds.
Not answered The harness reports that a response failed.
Updated to v4 A new revision replaces the page in place.
Moved to Done, Undone: Moved to Done The log accepted the user's gesture, which is announced only, or its undo.
In this topic

Comments and replies

Select a passage, then use the comment control or press c to write a comment. The thread keeps that passage as its anchor. Its marker opens the conversation beside the passage, where the agent's reply and the reply box appear. To comment on a whole element, such as a table or figure, ⌥-click (Alt-click) it or press s and choose it; w starts Draw mode, for drawing on the page.

The Threads tab of Leaf's On view, which the panel's On Me mark opens, lists the threads above the panel's row. Select a thread to open it: a thread about a passage opens in its card beside the passage, and a thread about the whole page in the panel, where you read its messages and reply in the panel's comment field. A card's Open in panel (p) moves its thread into the panel, and the threads you open after it, by t, Threads or a press on their words, open there too, until the panel's Show on page (p) puts threads back beside their passages. A walk or a row of Threads brings the thread's passage into view above the panel. The choice lasts while the tab stays open. On a window too narrow for cards, every thread opens in the panel.

A reaction is a message of one emoji, put on a passage or an agent's reply. It reaches the agent as words do, and the agent acts on it, asks what you meant, or answers in a line saying how it read it. The agent can answer with an emoji too.

Try a thread

This fictional exchange shows an agent's reply after revising the importer policy. Open the marker beside the sentence to read the exchange, or open Threads in the sample's top row. Select the sentence to try a comment. The sample has its own temporary log; no agent answers its practice comments. Reset restores the fictional exchange.

What a thread shows

A thread appears in several places at once: its card in Threads, its entry in the margin, its row in the Page Map, its row in On Me, and its line in an activity feed. Each place says the same thing about it, so a thread never goes by two names or shows two statuses.

What it says Where it shows
Its name: the title, else the words of its opening message, else Drawing Threads, On Me, the margin, the Page Map, an activity feed
Its status: Your turn, On it, Still to do, what a to-do waits on (Waiting on CI), Waiting, or how far the agent has got with the latest update Threads and the floating panel, as the card's status; the margin and the Page Map, beside its name
How far the agent has got with an update: Queued for Claude, Delivered, On it, Not answered, Gone quiet the message itself; the margin and Page Map entries
How many of the agent's messages the user has not read Threads, the margin, the Page Map
An unsent reply or rewrite its box, wherever the thread is open

How a thread ends

The user usually closes a thread with Resolve thread, or r on the focused thread, once they have read the answer. Its marker and ink leave the page, and it moves from Threads' Open list to Resolved. Reopen brings it back, as does ⌘Z (Ctrl+Z off a Mac) when resolving was the user's latest action.

The agent resolves a thread only when the user asks, or when no review could change the outcome; the thread then reads “Resolved by” and the agent's name. The user's new message reopens a resolved thread, and so does the agent's in a thread the agent resolved. In a thread the user resolved, the agent's message goes in without reopening it, unless it asks them a question; the agent reopens the thread itself where it judges they would want to stop and read what it said. A progress message or a failure notice reopens nothing.

Outside a text box, ⌘Z takes back the user's latest action, a message they just sent included: a comment, reply or reaction. Pressing a reaction's emoji again, where the reactions are offered, takes it back while its thread is open. An undone message leaves the page, with any thread it started. Where something has already answered it, it stays in its place instead and reads Deleted. To delete an older message, the user rewrites it to no words.

Words typed but not sent stay with what they are about after their box closes: a comment with its passage or element, a reply with its thread. Commenting somewhere else starts that place's own draft. Each draft stands in the margin as a grey entry beside its passage or its thread, and Threads lists them all under Drafts; a press on either opens the draft in its box. While any wait and no thread has news, the On Me mark wears a faint grey dot, and a press on it opens Threads. If a new version removes the content they were about, Resume writing (g i) opens them, unsent, in Comment on the page, after any words already there. The page's server keeps drafts, so they reach every tab and device showing the page; words typed while it is out of reach stay in their tab until it answers again.

In this topic

Phones and touch screens

Touch users can read, comment and operate widgets. Leaf’s page commands have direct gestures or visible controls; authored widgets supply their own routes. Narrow windows describes how page regions stack.

The panel and its menu

The panel fits a narrow window with space at its edges. Its row holds a comment field showing agent status, and the leaf with the On Me count beside it. A temporary notice replaces the status words, and holding a finger on the field shows status words it cuts short whole.

The leaf opens the On view, whose first tab, the menu, stands beside On Me and Threads. The menu includes Search page and Page Map under Navigate, Undo, and Select mode, Draw mode, Design mode and Hide annotations under Annotations. Decisions appear in On Me and in their widgets. An active mode or search names itself in the panel and provides a ✕ exit. Search arrows appear beside the match count; tapping the marked match selects it.

Comments, threads and widgets

Select words to quote them in the panel’s field; tap the field to open a comment below the block. For a whole table, figure or other element, open the leaf’s menu → Annotations → Select mode, then tap the element: the tap opens its comment instead of pressing its controls.

Where the margin cannot hold a rail, markers appear as pins on their blocks. Tapping a pin highlights its passage and opens its thread card. Threads opens above the panel’s row. Hide annotations hides the pins.

On a touch screen, a board at most 640px wide shows a Move to row on each card, reaching offscreen columns without dragging.