Relative timestamps overflow the time column and never update #278

Closed
opened 2026-10-07 20:42:58 -04:00 by Salastil · 1 comment
Owner

With relative timestamps on, labels like "Yesterday at 2:02 PM" (lib/util.ts:315-316) go into a fixed 42px time column (app.css:1575) and overflow it. Rows are memoised (MessageRow.tsx:1278) and nothing re-renders them over time, so "just now" never changes.

Fix: size the column (or move the time onto the name line, see the Comfy layout issue) for the longest label, and re-render relative labels on a timer (e.g. every 30s).

Part of the v1.0 UI pass.

With relative timestamps on, labels like "Yesterday at 2:02 PM" (`lib/util.ts:315-316`) go into a fixed 42px time column (app.css:1575) and overflow it. Rows are memoised (MessageRow.tsx:1278) and nothing re-renders them over time, so "just now" never changes. **Fix:** size the column (or move the time onto the name line, see the Comfy layout issue) for the longest label, and re-render relative labels on a timer (e.g. every 30s). _Part of the v1.0 UI pass._
Salastil added this to the v1.0 milestone 2026-10-07 20:42:58 -04:00
Salastil added the bug label 2026-10-07 20:42:58 -04:00
Author
Owner

Finished: 6a82c32.

With relative timestamps on, the column now shows now, 8m, 3h, Yest, Mar 3 (never more than six characters; the exact time is in the tooltip) instead of "Yesterday at 2:02 PM", which overflowed the 42px column into the avatar. They age on one shared 30-second timer - one interval for every row, none when relative times are off - so "now" becomes "1m" without the list being redrawn. Unit tests cover the labels (formatRelativeShort). The Comfy-layout redesign (#295) will move the time beside the name; this keeps the setting working until then.

Finished: [6a82c32](https://git.salastil.com/Salastil/moho/commit/6a82c3261c4c925e17f4a1f57999c96e7ab91c3e). With relative timestamps on, the column now shows **now, 8m, 3h, Yest, Mar 3** (never more than six characters; the exact time is in the tooltip) instead of "Yesterday at 2:02 PM", which overflowed the 42px column into the avatar. They **age on one shared 30-second timer** - one interval for every row, none when relative times are off - so "now" becomes "1m" without the list being redrawn. Unit tests cover the labels (`formatRelativeShort`). The Comfy-layout redesign (#295) will move the time beside the name; this keeps the setting working until then.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Salastil/moho#278