Relative <t:…:R> timestamps in profile bios, forum guidelines and the forum composer preview count from 1970 #1003

Open
opened 2026-11-20 06:13:11 +00:00 by charles · 0 comments
Owner

Seen while fixing #1001 (commit 90312be53 on textchat).

Three rich-text contexts build their RenderCtx with now_unix: 0 instead of the current time:

  • crates/fluxer-ui/src/screens/main/profile_popout.rs (bio)
  • crates/fluxer-ui/src/screens/main/forum/guidelines.rs (post guidelines)
  • crates/fluxer-ui/src/screens/main/forum/composer.rs (preview)

format_timestamp (widgets/rich_text/ast_to_spans.rs) renders TimestampStyle::RelativeTime as seconds - now_unix, so a <t:1763600000:R> in any of those shows "in 55 years" instead of a time relative to now.

Steps: put <t:1763600000:R> in a profile bio (or a forum channel's guidelines) and open the profile popout (or the forum).
Expected: a time relative to now, as in message content (which uses messages::State::now_unix).

Fix idea: hand those views the shell's now_unix, as the message rows get it.

Seen while fixing #1001 (commit 90312be53 on `textchat`). Three rich-text contexts build their `RenderCtx` with `now_unix: 0` instead of the current time: - `crates/fluxer-ui/src/screens/main/profile_popout.rs` (bio) - `crates/fluxer-ui/src/screens/main/forum/guidelines.rs` (post guidelines) - `crates/fluxer-ui/src/screens/main/forum/composer.rs` (preview) `format_timestamp` (`widgets/rich_text/ast_to_spans.rs`) renders `TimestampStyle::RelativeTime` as `seconds - now_unix`, so a `<t:1763600000:R>` in any of those shows "in 55 years" instead of a time relative to now. **Steps:** put `<t:1763600000:R>` in a profile bio (or a forum channel's guidelines) and open the profile popout (or the forum). **Expected:** a time relative to now, as in message content (which uses `messages::State::now_unix`). Fix idea: hand those views the shell's `now_unix`, as the message rows get it.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/fluxer-native#1003
No description provided.