Skip to content

Commit a00dd36

Browse files
Improve: timestamp formatting in logs and adjust column width in dashboard (#209)
- Updated the timestamp format in logs to display in 12-hour format with AM/PM using `date-fns` locale support. - Increased the column width for the timestamp in the dashboard logs for better readability. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Switch logs to 12-hour timestamp with AM/PM and widen the timestamp column for readability. > > - **Dashboard Logs**: > - **Timestamp formatting**: Switch to 12-hour format `hh:mm:ss.SS a` using `date-fns` with `enUS` locale in `src/features/dashboard/build/logs-cells.tsx`. > - **Layout**: Increase `timestamp` column width from `164px` to `192px` in `src/features/dashboard/build/logs.tsx`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 54fa708. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent b2659f1 commit a00dd36

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/features/dashboard/build/logs-cells.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { BuildLogDTO } from '@/server/api/models/builds.models'
33
import CopyButtonInline from '@/ui/copy-button-inline'
44
import { Badge, BadgeProps } from '@/ui/primitives/badge'
55
import { format } from 'date-fns'
6+
import { enUS } from 'date-fns/locale/en-US'
67

78
interface LogLevelProps {
89
level: BuildLogDTO['level']
@@ -49,7 +50,9 @@ export const Timestamp = ({
4950
>
5051
{formatDurationCompact(millisAfterStart, true)}{' '}
5152
<span className="group-hover:text-current transition-colors text-fg-tertiary">
52-
{format(date, 'HH:mm:ss.SS')}
53+
{format(date, 'hh:mm:ss.SS a', {
54+
locale: enUS,
55+
})}
5356
</span>
5457
</CopyButtonInline>
5558
)

src/features/dashboard/build/logs.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ import { type LogLevelFilter } from './logs-filter-params'
4242
import { useBuildLogs } from './use-build-logs'
4343
import useLogFilters from './use-log-filters'
4444

45-
const COLUMN_WIDTHS_PX = { timestamp: 164, level: 92 } as const
45+
const COLUMN_WIDTHS_PX = { timestamp: 192, level: 92 } as const
4646
const ROW_HEIGHT_PX = 26
4747
const VIRTUAL_OVERSCAN = 16
4848
const SCROLL_LOAD_THRESHOLD_PX = 200

0 commit comments

Comments
 (0)