Skip to content

feat(appearance): add a time-only option for message times - #4168

Open
abhiroopb wants to merge 2 commits into
block:mainfrom
abhiroopb:abhiroopb/message-time-only
Open

abhiroopb wants to merge 2 commits into
block:mainfrom
abhiroopb:abhiroopb/message-time-only

Conversation

@abhiroopb

Copy link
Copy Markdown

Summary

robot-angel Adds an opt-in "Message times" choice under Settings, Appearance, Message timestamps: "Date and time" (the default, unchanged) or "Time only".

A byline today reads "Mon, Oct 26 at 9:39 AM" or "Yesterday at 08:36", even though the day divider just above the row already names the day. People coming from Slack expect the byline to show only the clock time ("09:39"). With "Time only", a byline shows the clock time alone, in the 12- or 24-hour format already chosen under Clock.

Behavior

  • Opt-in. Nothing changes until someone picks "Time only". The choice is device-local, stored with the other clock settings in buzz-clock.v1.
  • Full date kept. The tooltip and the screen-reader text still give the full date and time.
  • Follows the clock. 24-hour shows "09:39". 12-hour shows "9:39 AM", so the day period stays (unlike the grouped-row time, which drops it).
  • Hidden with timestamps. The row only appears while Message timestamps is not "Hide".
  • Unknown values. Any stored value other than "time" reads as "Date and time".

Changes

  • shared/clock-preference.ts: add messageTimeFormat: "date-time" | "time" to ClockPreference, parse it, and include it in the change key so bylines re-render.
  • features/messages/MessageTimestamp.tsx: with "time", render formatTime instead of formatItemTimestamp.
  • app/AppearanceSettings.tsx: add the "Message times" select under Message timestamps.

Testing

  • MessageTimestamp.test.tsx: a byline shows 09:05 with "Time only" on a 24-hour clock, keeps the full date for screen readers, and goes back to the dated form with "Date and time".
  • clock-preference.test.tsx: an unknown stored value reads as "date-time". The saved shape includes the new field.
  • AppearanceSettings.test.tsx: choosing "Time only" saves it with the other clock settings.
  • Ran vitest run src/shared src/features/messages/MessageRow.test.tsx src/features/messages/MessageTimestamp.test.tsx src/app/AppearanceSettings.test.tsx src/app/shell/SearchPreview.test.tsx (43 files, 715 tests pass), biome check on the changed files, and tsc --noEmit.

🤖 Generated with Claude Code

Message bylines show a day and a time, such as "Mon, Oct 26 at 9:39 AM",
even though the day divider above the row already names the day. Add an
opt-in "Message times" choice under Message timestamps: "Date and time"
(the default, unchanged) or "Time only". With "Time only", a byline shows
just the clock time in the chosen 12- or 24-hour format. The tooltip and
the screen-reader text keep the full date.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Abhiroop Basu <787045+abhiroopb@users.noreply.github.com>
@abhiroopb
abhiroopb requested a review from a team as a code owner November 21, 2026 02:26
…amps

The subtitle no longer assumes a day divider sits above every message.
A new test checks the choice disappears when message timestamps are hidden.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant