Make commit history easier to scan and review (#2146)

* feat(app): improve commit history and diff review

* fix(app): keep commit timestamps current

* fix(app): pause hidden commit clocks

* fix(app): reopen commit diff in persistence test
This commit is contained in:
Mohamed Boudra
2026-07-17 04:15:04 +08:00
committed by GitHub
parent 60855a0f3a
commit 737f30c339
6 changed files with 210 additions and 22 deletions
+1 -2
View File
@@ -2,8 +2,7 @@
* Format a date as a human-friendly relative time string
* Examples: "just now", "5m ago", "2h ago", "3d ago", "Jan 15"
*/
export function formatTimeAgo(date: Date): string {
const now = new Date();
export function formatTimeAgo(date: Date, now: Date = new Date()): string {
const diffMs = now.getTime() - date.getTime();
const diffSec = Math.floor(diffMs / 1000);
const diffMin = Math.floor(diffSec / 60);