Repository navigation
Say when each message in a thread was said, on the card and to the agent - #6097
Merged
Merged
Conversation
Every message head and progress face in a thread now shows the clock
time it was said, with its day unless that is today: "17:52", "Yesterday
15:35", "15 Aug 09:12". Before, a thread showed a relative age ("1d
ago") only where it changed from the message above, so a reply's moment
disappeared as soon as the age rounded: the user's thread of yesterday
read one "1d ago" over "I'm building it now" (15:35) and "Built in
#6005" (17:52), two hours apart.
Each time names its own day rather than taking it from the message
above, so a head read alone, as a card's sticky head or under a first
message scrolled away, never reads as today's. Where a head is too
narrow for both, as beside a card's Previous, Next and Next unread, the
time drops its clock whole and keeps its day ("15 Aug"), where an
ellipsis cut it to "15 Au…"; the preview still reads the full clock time
and zone.
This reverses the choice of 26 October 2026 (#4323) to say an age only
where it changes, which answered "72d ago" repeated down a thread
written at once; times differ where ages repeat. The transcript's dedupe
pass and an unread `recency` field on the thread reading are deleted, so
message readings and thread readings no longer read the clock.
Tests: `saidAt`'s formats are unit tests; the browser test that pinned
the dedupe now pins one time per message; the stale-response aging test
reads a resolved thread's age in Threads, since message heads no longer
age; the crowded-head tests check that the day stays whole; the test for
a head without a time is deleted, since every message now has one.
leaf-agent
previously approved these changes
Nov 16, 2026
leaf-agent
previously approved these changes
Nov 16, 2026
`leaf page state <page> <message>` and a delivery's thread digest now carry each message's `ts`, as the thread card now shows it. Before, a session picking up a thread read its messages in order with no moment, so "I'm building it now" read the same an hour or a day later; only the batch's own events carried their time. The digest's `ts` is optional in the delivery record, so deliveries written at the same format still read and the protocol stays where it is. Tests: the page-state paging test checks each message's `ts` (it fails with `ts` left out); the summary-suggestion delivery snapshot gains it.
# Conflicts: # build/browser/protocol-baseline.json
leaf-agent
approved these changes
Nov 16, 2026
max-sixty
added a commit
that referenced
this pull request
Nov 16, 2026
#6097 made a message head say when it was said, its clock time and its day unless today, rather than an age, and left this journey expecting "just now" and "1m ago". It runs on this branch because the branch edits the file. The head's words grow as days pass, from "22:10" to "Yesterday 22:10" to "13 Nov 22:10", so the journey advances days and still holds the thread and its controls in place while the metadata changes.
max-sixty
added a commit
that referenced
this pull request
Nov 16, 2026
Closes #5595 Every element Leaf names now takes its name from markup it opens with, as a section is named by its heading: a tab, a part, a board column, a sample, a pane, a text document, a worktree, a playground control, choice and preset, a timeline run, lane and event, and a trace with its bookmarks. The registry's `x-name` key is gone, with the `label` attributes it pointed at, the `$attributes` entry that kept `label` as a name on every widget (`NAME_ATTRIBUTE`), and the `summary` attribute of tabs and parts. ```html <lf-part id="part-readme"> <header> <strong><code>README.md</code></strong> <p><span class="added">+120</span> <span class="removed">−45</span> lines</p> </header> <article class="layout-column">…</article> </lf-part> ``` The list of parts shows `README.md` in code type over the coloured diffstat. ## The rule and where it lives An element's name is its leading title: a leading `<summary>`, heading or `<strong>`, looked for inside a leading `<header>` or `<hgroup>` too. The rule already named sections, disclosures and titled members, and now names widgets. A widget that draws, moves or hides its name takes it only where it opens the widget: the title, or the `<header>` or `<hgroup>` holding it, is the widget's first element. A quoted sample whose heading follows its first paragraph keeps the heading where it stands, and a tab whose heading follows a paragraph is unnamed, which `page check` refuses. Where a name is only read, as a section's heading after an eyebrow or an option's title after its chips, it may follow those elements, as on main: requiring it to open them too would have unnamed 41 options, 66 sections and 39 list items in the corpus. Each runtime states the rule once: - **Browser**: `leading-title.js`. Packages get one reader, `openingTitle` (`portable-api.js`, and through it `widget-api.js`), which returns the name an element opens with as `{title, holder}`, or null: the title naming it, and the holder, its first element, which is that title or the `<header>` or `<hgroup>` around it. The board, tabs, text document, worktree, playground, timeline and version diff read names through it, and a widget draws, moves or hides the holder. `leadingTitle`, which reads past an eyebrow or an option's chips, stays internal to the runtime. `addressable-names.js` reads the name's words as the author wrote them (`addressableName`) and copies a node's markup without ids or generated words for a surface that shows a name away from its element (`echoCopy`). - **Python**: `gesture_words.leading_title_node`, `leading_title` and `leading_title_holder`. `tests/name_cases.json` holds both runtimes to the same names and the same holders. - **CSS**: one selector, `:first-child:is(summary, h1, h2, h3, h4, h5, h6, strong, header, hgroup)`, the holder `openingTitle` returns. CSS can't see text, so it also matches a title that loose text precedes, as `strong:first-child` did on main. ## How each widget shows its name - **Tab strip along a row** shows only each panel's name, so the panel keeps its `<strong>` or `<header>` as the eyebrow over its first heading, in the reading theme's `.eyebrow` face, and the block under the eyebrow takes the panel's top edge as the first block would. The tab's copy is an echo (`says: "echo"`), so a comment on the name anchors in the panel. A panel named by a heading keeps the heading as it is. - **Side list and a page's parts** show the name with the summary under it, so on screen the panel hides its name and the list's copy is the page speaking (`says: true`): page search finds the name in the list and a comment on it anchors there. On paper the list is gone and each item prints under its name. A side list reserves a summary's line before upgrade from a panel's header, so a phone's row strip keeps its height when the module draws. - **Column, sample, pane, text document, worktree**: the authored name stands where the widget draws one. A text document's name heads its frame and names its figure. A worktree's `<strong>` stands in its row's room from first paint, before the module slots it into the row. A pane's region is named by its header's title unless its author gave it an `aria-label`. - **Playground control, choice and preset**: the name stays the element's first child, hidden once the playground draws, and the view draws a copy as the radio's label or on the preset's button. The playground refuses a name holding a link, a control or a widget, which the copy would nest inside that control. Its list of such tags and page check's are held together by `tests/nested_name_cases.json`, which both runtimes answer. - **Code block, chart, draft, diagram, diff**: a widget that draws its own content keeps the name it opens with over what it draws. The four light-DOM modules put the holder back first when they replace their children, and `shadowStage`, the runtime's helper for a shadow-DOM widget, keeps it in the light tree and slots it alone at the top of the stage, which covers the diff, the file tree and the file editor. - **Places that take only text** read `addressableName`: every tab's and pane's `aria-label`, a thread card's heading, the timeline's chart labels, the trace chooser and the board's announcements. Each panel is labelled by its tab. ## Checks - Under `x-content: members` and `data`, a widget may open with the element its name stands in, a title or a `<header>` holding one, before its members or its `<pre>`. A `<header>` with no title names nothing and stays a stray member. Which widgets take a name is what their modules keep: `page check --render` reports a name a module drew over (`dropped-name`), so a package's module that drops one hears it, with no per-widget key. - A revision that renames a tab, a part or a pane replaces the widget, as one that changed its `label` did: a members-patched widget's shell holds its own opening name and each member's whole. - `page check` refuses a view whose name doesn't open it (`unnamed-view`), and a link, control or widget in a view's header, which its tab, a control, copies (`interactive-name`). Another widget's name is drawn in place or read as words, so a question's heading or an option's title may link a pull request. - `x-says` is a list of attribute names, each said after the element's words. Its `before` edge served only the column and sample labels this change retires. ## Evidence - **Corpus**: all 57 pages under `examples/`, `examples/developer/`, `docs/` and `tests/fixtures/pages/` build and pass `leaf page check`. - **Tests**: `pnpm run test:runtime` 992 passed; `pnpm run check:browser` clean; the touched model tests (959) pass; 191 browser and journey tests across the tab, document, workspace, playground, sample and version-diff files, the worktree rows, the pane names, the anchors selections, and the four tests CI failed on the first head pass. - **New tests**: a comment on a side list's name anchors on the list's copy and survives a revision (fails on `says: "echo"`); an author's `aria-label` names a pane (fails when the header always wins); a quoted sample's heading after its first paragraph stays a heading (fails on the lenient selector); a tab whose heading follows a paragraph is refused; a playground refuses a link in a preset's name; a code block, a draft and a diff keep and show the name they open with; a revision that renames a tab reaches its strip and one that renames a pane its region (both failed before); the render gate reports a widget that draws over its name; a removal that empties a nameless box stands in it, the version diff's `gapIn`, which kept no test once a tab keeps its name. - **A stale journey**: `test_render_shift_watch.py`, which this branch edits and so CI runs, expected a message head to say "just now"; since #6097 a head says its clock time, so the journey now advances days ("Yesterday 22:10", "13 Nov 22:10") and still holds the thread in place. - **Probes**: a printed queue (`alert-review`) shows each item's header under its group, where main printed the group and label together; a named text document's figure reads as `figure "Reviewed"`. - **Page search** on the root parts (`root-parts`): Workbench 4, Evidence 6, Plan 7, as on main. - **Stills** (`leaf-dev stills --authored` against main; Chromium and Firefox light, Chromium dark): the side list and the root parts are pixel-identical to main. Both text documents' caption bars match main in both schemes. A worktree's first paint differs only by its name standing in the row's room, which main leaves empty, with its body where main's is (Chromium only, since Firefox can't hold the runtime). The gallery's page of parts gains the `README.md` part, in code type over +120 −45. Each horizontal tab panel shows its name as the eyebrow over its first heading, in the face of a section's eyebrow under it: the root tabs, the gallery and a boxed set. A printed queue (`printed-queue`, new) prints each item's group, then its name and summary, where main printed the group and name on one line. A quoted sample whose heading follows its first paragraph keeps the heading where main does (`leaf-dev probe` pair). - **Evals** (Claude Code, paired base): every head sample (8) wrote each name as markup and passed `page check`; base wrote `label` attributes. Rubric results, head vs base: queue 1/1 vs 1/1; presets 2/3 vs 3/3; parts 0/4 vs 3/4, every head sample choosing a `layout-sidebar` with a contents outline, which the rubric then refused and accepts since #6111. ## Calls Max may reverse - **The eyebrow takes a `<strong>` or `<header>` name only**; a heading that names a panel stays a heading. - **`x-says` became a list** rather than a map whose only value is `after`. - **A text document's caption bar keeps the figure's ground**: code's under a source capture, the page's under a preview's tabs. Dropping the ground made a source capture's caption paper where main's is white. - **A widget draws only a name that opens it, and only where a widget draws its name**; reading a name stays as lenient as main's, past an eyebrow or an option's chips. - **Only a view's name is required** (`unnamed-view`); columns, controls, choices and events may go unnamed. - **`lf-event` and `lf-trace-bookmark` declare `x-content: members` with no members** to hold only a name. ## Adds - `openingTitle` in `portable-api.js`, returning `{title, holder}`; `addressableName` and `echoCopy` in `widget-api.js`, documented in `module-reading.md`. - `tests/nested_name_cases.json`, which the validator's `nested_in` and the playground's `nestedIn` both answer. - The findings `unnamed-view` and `interactive-name`; the content-model rule that admits a leading name; the playground's refusal of a name holding a control. - `slot="lf-worktree-name"` on a worktree's authored name, and `slot="lf-name"` on the name of a widget `shadowStage` stages; the `parts-list` and `printed-queue` stills states. - The render finding `dropped-name` (`droppedNames`, `render-checks/words.js`). ## Not verified - Page search finds a worktree's name and its branch separately, but no query spanning both, which it did when both were the row's generated words. - Option labels, board card titles and the quiet word's seat still read `:scope > strong`, a lookup that predates `x-name` and agrees with the rule wherever no text precedes the title. - `tests/journeys/margin/test_card_placement.py::test_the_shipped_long_thread_keeps_the_margin_and_its_height` fails here with a 320 px card where it asks for 379: #5991, on main, made a card slim at 320 px until a message stands tall and left this assertion as it was. It fails without this branch's thread-card change too.
This was referenced Nov 16, 2026
Merged
leaf-agent
added a commit
that referenced
this pull request
Nov 16, 2026
) `test_a_walk_s_landing_previews_nothing_and_tab_reads_it` gives every element focus reaches a stand-in preview ("Placed here") from a `focusin` listener on `document`. The runtime's own `document` `focusin` capture listener (`focus.js`, registered at module load) runs first. `preview.js` reads the focused element in a microtask between the two listeners, so the Add reaction button that Tab reaches previewed its own name. The Tab stop is the same before and after #6097. The test used to pass only because a later redraw re-read the standing preview once the head's relative age ticked over, about 40 s into the 120 s `expect`. Since #6097 the head shows a clock time, which doesn't redraw within the minute, so the expectation timed out. The stand-in now installs on `window`'s capture, which runs before any `document` listener, so the runtime reads it the moment focus arrives. The test's intent is unchanged. Its landing assertions are now stronger, since the stand-in is already in place when `m` lands, so a landing preview would actually show. Verified locally with `--run-nightly`: - Before: fails on main at `f1b367375` with `Actual value: Add reaction`, matching the report. - After: passes in about 7 s. Before #6097 (at `017407524`) it took about 48 s, waiting for the age tick. Closes #6179 — automated triage Co-authored-by: leaf-agent <[email protected]>
max-sixty
added a commit
that referenced
this pull request
Nov 17, 2026
… time as the reader's browser writes it (#6226) A thread message head now says "just now" or "12m ago" while the message is under an hour old, then its time of day and day as the reader's browser writes them ("3:24 PM", "Yesterday 3:24 PM", "Nov 13 3:29 PM"). Before, every head was a hand-built 24-hour clock from the first second, so a reply seconds old read "15:24", and a US-English reader saw a form their own Mac doesn't use. The age-and-time preview, pinned to American English with a 24-hour cycle, now also takes the browser's locale ("Sat, Aug 15, 2026, 2:02 PM PT"), and the floating panel's error times call the same `timeOfDay` formatter in `presence.js`. The user chose the one-hour cut over chat apps' time of day from the start, "just now" for the first minute only, and feeds' ages until yesterday: within the hour an age is as exact as a clock to the minute, and past it an age rounds to hours, so replies minutes apart would read alike, which #6097 moved away from. This reverses the record #5618 and #6097 kept that a fixed day-month order and 24-hour clock read one way to every reader. `ago` now picks its unit by the rounded figure, so an age never reads "60m ago" or "24h ago", and a head switches to its clock at the moment its age would turn to hours. Asked for by the user on a Leaf page; a fresh reviewer read the Firefox before/after captures, and Codex reviewed the diff. Tests: `elapsed-time.test.mjs` covers the hour cut and rounding boundary (its locale cases run where the platform reads American English); the browser tests reading a head's time or preview pin `locale="en-US"`; `pnpm run test:runtime` and the type check pass. > _This was written by Claude Code on behalf of max-sixty_
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.
Every message head and progress face in a thread now shows when it was said: its clock time, with its day unless that is today ("17:52", "Yesterday 15:35", "15 Aug 09:12"). Before, a thread showed a relative age only where it changed from the message above, so a day-old thread read one "1d ago" over replies hours apart, such as "I'm building it now" at 15:35 and "Built in #6005" at 17:52. Each reply says what was true when it was sent, so the reader needs each one's moment. The agent now gets the same:
leaf page state <page> <message>and a delivery's thread digest carry each message'sts, where before only the batch's own events did.To weigh: this reverses the 26 October choice in #4323 to say an age only where it changes, which answered "72d ago" repeated down a thread; clock times differ where ages repeat, but a day-old thread now repeats its day ("Yesterday" on each message). Each time names its own day so a head read alone (a card's sticky head, or below a first message scrolled away) never reads as today's. Where a head beside a card's controls can't hold both, the clock is dropped whole and the day stays (
surfaces.css), where an ellipsis cut it to "15 Au…". The digest'stsis optional in the delivery record, so the protocol stays put.Asked for by the user on a Leaf page; a fresh reviewer read the before/after captures and Codex reviewed the diff. Tests:
saidAtunit cases; the browser tests that read a head's time; the page-state paging test checks each message'sts, and a delivery snapshot gains it.