Skip to content

graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs

Python

GUI: fix the "2028y" chat timestamps (#15)

Rach48595e6bfe83
diff --git a/gui/src/utils/time.ts b/gui/src/utils/time.ts
index b28c36fe..08240b57 100644
--- a/gui/src/utils/time.ts
+++ b/gui/src/utils/time.ts
@@ -13,7 +13,11 @@ export function formatRelativeTimestamp(value: string | null): string | null {
return null
}
- const timestamp = new Date(value)
+ const trimmed = value.trim()
+ // Accept epoch-millis strings (what the runtime sends) as well as ISO dates.
+ const timestamp = /^\d+$/.test(trimmed)
+ ? new Date(Number(trimmed))
+ : new Date(trimmed)
if (Number.isNaN(timestamp.getTime())) {
return null
}