Repository navigation
Say how long ago a thread message was said within the hour, and every time as the reader's browser writes it - #6226
Conversation
… time as the reader's browser writes it
A message head said a hand-built 24-hour clock from its first second, so a reply
seconds old read "15:24" like any other, and a reader whose clock reads "3:24 PM"
saw a form their own Mac doesn't use. Its preview was pinned to American English
with a 24-hour cycle ("Sat 15 Aug 2026, 14:02 PT").
Now a head says "just now" or "12m ago" while the message is under an hour old,
then its time of day and day as the browser's locale writes them ("3:24 PM",
"Yesterday 3:24 PM", "Nov 13 3:29 PM"), and its preview reads
"Sat, Aug 15, 2026, 2:02 PM PT". The cut sits where an age would start rounding
to hours, so replies hours apart still each read their own time, which #6097
introduced. This reverses the record #5618 and #6097 kept that a fixed day-month order and
24-hour clock read one way to every reader; `presence.js` and the transcript
header now say so.
`timeOfDay` in `presence.js` is the one formatter for a time of day; the
floating panel's error times, which formatted their own "03:24 PM", call it.
An age now picks its unit by the rounded figure, so 59m40s reads "1h", where it
read "60m ago" for the half minute before a head switches to its clock.
Tests: `elapsed-time.test.mjs` covers the hour cut and the rounding boundary,
and its locale cases run where the platform reads American English; the
browser tests that read a head's time or a preview pin `locale="en-US"`.
`skills/leaf/references/module-state.md`'s preview example follows.
Asked for by the user on a Leaf page. A fresh reviewer read the before/after
captures and Codex reviewed the diff.
> _This was written by Claude Code on behalf of max-sixty_
leaf-agent
left a comment
There was a problem hiding this comment.
Two tests the PR doesn't edit still assert the old formats, and both fail at this head. PR CI runs only the browser and journey tests whose own files the PR edits, so neither will go red here. The first will fail ci on main after merge, and the second will fail the nightly run.
tests/browser/test_render_floating_panel.py,test_on_claude_lists_its_work_in_hand_queued_and_done_or_says_itchecks the summary's age preview withre.fullmatch(r"\w{3} \d{1,2} \w{3} \d{4}, \d{2}:\d{2} .+", ...). The preview now readsMon, Nov 16, 2026, 11:52 PM GMT+0, so the match returnsNone.tests/journeys/test_render_shift_watch.py,test_message_age_may_shift_metadata_but_leaves_the_thread_in_place(bothcardandinline) expects a just-written comment's head to read^\d\d:\d\d$and captures it asclock. The head now readsjust now, then1m ago, then2m ago, so the wait times out. Thetimedelta(days=3)case also expects the old day-first date (rf"^\d{{1,2}} \w+ {clock}$"). One fix: expectjust nowfirst, then deriveclockfrom the head'sdatetimewithtoLocaleTimeString(undefined, {timeStyle: "short"})in the page. Then expectYesterday {clock}andrf"^\w+ \d{{1,2}} {re.escape(clock)}$".
Since the head now opens on an age, this journey covers one more transition, from just now to Yesterday 3:24 PM. Its layout assertions already allow the metadata to change width.
I ran both locally at 761bceed, and both failed as described. elapsed-time.test.mjs and test_every_message_says_when_it_was_said pass. If you'd like, I can push the two test updates.
…atch tests The panel summary's age preview is now checked for its weekday, year, time of day and zone rather than the old day-first 24-hour form. The shift watch's age journey starts from "just now" and takes the clock it expects later from the browser's short time for the message's `datetime`, with the month-first date. > _This was written by Claude Code on behalf of max-sixty_
|
Both fixed in 01a0295: the panel summary's preview check now reads the weekday, year, time of day and zone in the browser's own form, and the shift-watch age journey starts from "just now" and takes its later clock from the browser's short time for the message's
|
|
Confirmed at 01a0295: |
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
timeOfDayformatter inpresence.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.
agonow 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.mjscovers 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 pinlocale="en-US";pnpm run test:runtimeand the type check pass.