From 5cb2da9028bc4c0e960ca7f05cc3575ba5b850d6 Mon Sep 17 00:00:00 2001 From: Alan Silva Date: Thu, 5 Nov 2026 22:14:48 +0000 Subject: [PATCH] Use day-first written dates and 24-hour chat timestamps --- .../ui/transcript/chat_message_timestamp.dart | 17 +++++------------ app/notes/chat-message-timestamps.md | 2 ++ .../ui/transcript/chat_message_view_test.dart | 2 +- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/app/lib/features/chat/ui/transcript/chat_message_timestamp.dart b/app/lib/features/chat/ui/transcript/chat_message_timestamp.dart index fec7d466..fb94c504 100644 --- a/app/lib/features/chat/ui/transcript/chat_message_timestamp.dart +++ b/app/lib/features/chat/ui/transcript/chat_message_timestamp.dart @@ -31,23 +31,16 @@ class ChatMessageTimestamp extends StatelessWidget { if (material != null) { time = material.formatTimeOfDay( TimeOfDay.fromDateTime(instant), - alwaysUse24HourFormat: MediaQuery.alwaysUse24HourFormatOf(context), + alwaysUse24HourFormat: true, ); - date = material.formatCompactDate(instant); - full = '${material.formatFullDate(instant)}, $time'; + date = '${instant.day} ${material.formatMonthYear(instant)}'; + full = '$date, $time'; } else { final local = CupertinoLocalizations.of(context); - final use24 = MediaQuery.alwaysUse24HourFormatOf(context); - final hour = use24 - ? instant.hour - : (instant.hour % 12 == 0 ? 12 : instant.hour % 12); - final period = use24 - ? '' - : ' ${instant.hour < 12 ? local.anteMeridiemAbbreviation : local.postMeridiemAbbreviation}'; time = - '${local.datePickerHour(hour)}:${local.datePickerMinute(instant.minute)}$period'; + '${local.datePickerHour(instant.hour).padLeft(2, '0')}:${local.datePickerMinute(instant.minute)}'; date = - '${local.datePickerMediumDate(instant)} ${local.datePickerYear(instant.year)}'; + '${local.datePickerDayOfMonth(instant.day)} ${local.datePickerMonth(instant.month)} ${local.datePickerYear(instant.year)}'; full = '$date, $time'; } final style = diff --git a/app/notes/chat-message-timestamps.md b/app/notes/chat-message-timestamps.md index ceb28276..0405fbad 100644 --- a/app/notes/chat-message-timestamps.md +++ b/app/notes/chat-message-timestamps.md @@ -11,3 +11,5 @@ Checks: bounded analysis clean; 586 transcript/conversation tests passed through Real Chrome full-app fixture screenshots inspected: `/private/tmp/timestamps-wide-final/01-timestamp.png` (1100x1000 light), `/private/tmp/timestamps-narrow-final/01-timestamp.png` (560x1000 dark), and `/private/tmp/timestamps-cupertino-final/01-timestamp.png` (560x1000 Cupertino light). Fixture uses opt-in `timestamps=1`; no production sessions touched. Capture tools exited normally. No physical device or Safari verification. Published web and Android from source commit `9180e841`. APK build `29898600`, matching previous release signing certificate. Web JS SHA256 `49681884de1be41e59bc1c47d9f174bfc8f9e5b3a88d7545ee7dc11c5a2b374a`; APK SHA256 `b998322320394e506126dc409192ac51e35d160e2f6d751a1fcc70f44889906f`. Authenticated local HTTP downloads of JS/feed/APK matched; public HTTPS JS/feed verified. Web rollback: `app-web.before-web-update-1793916032086548000`; APK rollback: `app-updates.before-client-update-1793916075676166000`, both under the installation lib directory. No backend restart or device installation. + +Date format follow-up: use day-first written months and 24-hour time (`5 November 2026 · 09:18`) on Material and Cupertino, including tooltip/semantics. Focused 25 tests pass and analysis is clean. Inspected narrow dark Material and light Cupertino screenshots at `/private/tmp/dayfirst-material/01-dates.png` and `/private/tmp/dayfirst-cupertino/01-dates.png`; no overflow. diff --git a/app/test/features/chat/ui/transcript/chat_message_view_test.dart b/app/test/features/chat/ui/transcript/chat_message_view_test.dart index 70d459ed..c2b89d9b 100644 --- a/app/test/features/chat/ui/transcript/chat_message_view_test.dart +++ b/app/test/features/chat/ui/transcript/chat_message_view_test.dart @@ -165,7 +165,7 @@ void main() { final local = DateTime.utc(2026, 10, 20, 8, 12).toLocal(); final l10n = MaterialLocalizations.of(context); final expected = - '${l10n.formatCompactDate(local)} · ${l10n.formatTimeOfDay(TimeOfDay.fromDateTime(local), alwaysUse24HourFormat: MediaQuery.alwaysUse24HourFormatOf(context))}'; + '${local.day} ${l10n.formatMonthYear(local)} · ${l10n.formatTimeOfDay(TimeOfDay.fromDateTime(local), alwaysUse24HourFormat: true)}'; expect(find.text(expected), findsOneWidget); final copy = tester.widget(find.byType(ChatCopyButton));