Add a since-you-last-looked summary, 30-day uptime ribbons, a maintenance timeline and hover timestamps

- Dashboard card on what changed since the user pressed Got it (users.last_looked_at,
  migration 0021), folding each problem and its recovery into one line.
- Uptime ribbons on servers and integrations, built from the audit log; integrations'
  failing/working-again moments are now recorded.
- Timeline of running and scheduled maintenance windows on the Maintenance page.
- TimeAgo component: relative times with the exact time in the chosen format on hover.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
bobbanandClaude Sonnet 5.5 committed 2026-10-16 21:55:04 +02:00
1 parent 3945c60681
commit 906220040e
32 files changed
+3380 -15

No files matched your search

+2 -1
View File
@@ -1,4 +1,5 @@
import { useEffect, useMemo, useState } from "react";
import TimeAgo from "../components/TimeAgo";
import { Link } from "react-router-dom";
import { api, type ConsistencyFinding, type ConsistencyKind, type ConsistencyReport, type ConsistencySeverity, type CurrentUser } from "../api/client";
import { downloadCsv } from "../utils/csv";
@@ -182,7 +183,7 @@ export default function Consistency({ user }: { user: CurrentUser }) {
<>
{" "}
from {dns.syncedZones} of {dns.zones} synced zone{dns.zones === 1 ? "" : "s"}
{dns.oldestSyncedAt && <> (oldest sync {formatAgo(dns.oldestSyncedAt)})</>}
{dns.oldestSyncedAt && <> (oldest sync <TimeAgo value={dns.oldestSyncedAt} />)</>}
</>
)}
.
+4 -1
View File
@@ -1,4 +1,6 @@
import { useEffect, useState, type ReactNode } from "react";
import TimeAgo from "../components/TimeAgo";
import WhatChanged from "../components/WhatChanged";
import { Link } from "react-router-dom";
import {
api,
@@ -594,6 +596,7 @@ export default function Dashboard({ user }: { user: CurrentUser }) {
Welcome back, {user.name ?? user.email ?? user.sub}.
</p>
<StatusStrip />
<WhatChanged role={user.role} />
{isAdmin && integrations !== null && dnsStats !== null && serverSummary !== null && secrets !== null && notifyConfigured !== null && (
<SetupGuide steps={setupSteps} />
)}
@@ -752,7 +755,7 @@ export default function Dashboard({ user }: { user: CurrentUser }) {
{i > 0 && ", "}
<Link to={`/servers/${s.id}`}>{s.name}</Link>{" "}
<span className="text-secondary">
({formatAgo(s.lastSeenAt)}
(<TimeAgo value={s.lastSeenAt} empty="never seen" />
{s.inMaintenance ? ", in maintenance" : ""})
</span>
</span>
+2 -1
View File
@@ -1,4 +1,5 @@
import { useEffect, useState, type CSSProperties } from "react";
import TimeAgo from "../components/TimeAgo";
import { useSearchParams } from "react-router-dom";
import {
api,
@@ -440,7 +441,7 @@ export default function Dns({ user }: { user: CurrentUser }) {
<td>{z.name}</td>
<td>{z.recordCount}</td>
<td className="text-secondary">
{z.syncedAt ? formatDateTime(new Date(z.syncedAt)) : "never"}
{z.syncedAt ? <TimeAgo value={z.syncedAt} /> : "never"}
</td>
</tr>
))}
+6
View File
@@ -9,6 +9,7 @@ import { downloadCsv } from "../utils/csv";
import { confirmDialog } from "../utils/dialogs";
import { ErrorNotice } from "../components/Notice";
import { toast } from "../utils/toast";
import UptimeRibbon from "../components/UptimeRibbon";
const TYPE_LABELS: Record<IntegrationType, string> = {
tailscale: "Tailscale",
@@ -223,6 +224,11 @@ export default function Integrations({ user }: { user: CurrentUser }) {
</span>
)}
</div>
{i.enabled && (
<div className="mb-3">
<UptimeRibbon kind="integrations" id={i.id} name={i.name} />
</div>
)}
{result && !result.ok && testingId !== i.id && <div className="text-red small mb-3">{result.error}</div>}
<div className="btn-list mt-auto">
{i.enabled && (
+3
View File
@@ -17,6 +17,7 @@ import { readableError } from "../utils/errors";
import { ErrorNotice } from "../components/Notice";
import { toast } from "../utils/toast";
import { confirmDialog } from "../utils/dialogs";
import MaintenanceTimeline from "../components/MaintenanceTimeline";
const DURATIONS: { minutes: number; label: string }[] = [
{ minutes: 30, label: "30 minutes" },
@@ -323,6 +324,8 @@ export default function Maintenance({ user }: { user: CurrentUser }) {
</div>
)}
{((windows?.length ?? 0) > 0 || upcoming.length > 0) && <MaintenanceTimeline windows={[...(windows ?? []), ...upcoming]} now={now} />}
{canEdit && kumaIntegrations && kumaIntegrations.length > 0 && (
<div className="card mb-3">
<div className="card-header">
+2 -1
View File
@@ -1,4 +1,5 @@
import { useEffect, useState, type FormEvent } from "react";
import TimeAgo from "../components/TimeAgo";
import { Link } from "react-router-dom";
import {
api,
@@ -225,7 +226,7 @@ export default function Ports({ user }: { user: CurrentUser }) {
{p.localOnly && <span className="badge bg-secondary-lt text-secondary ms-2">local only</span>}
</td>
<td className="text-secondary">{p.process ?? "—"}</td>
<td className="text-secondary">{p.lastSeenAt ? formatAgo(p.lastSeenAt) : "—"}</td>
<td className="text-secondary"><TimeAgo value={p.lastSeenAt} /></td>
</tr>
))}
{agentPorts !== null && agentPorts.length === 0 && (
+2 -1
View File
@@ -1,4 +1,5 @@
import { useEffect, useState } from "react";
import TimeAgo from "../components/TimeAgo";
import { Link } from "react-router-dom";
import { api, type PrivacyOverview } from "../api/client";
import { formatDateTime } from "../utils/date";
@@ -114,7 +115,7 @@ export default function Privacy() {
{s.ip ?? "—"} {s.current && <span className="badge bg-green-lt text-green ms-1">this browser</span>}
</td>
<td className="text-secondary text-break">{s.userAgent ?? "—"}</td>
<td className="text-secondary">{formatAgo(s.lastAccess)}</td>
<td className="text-secondary"><TimeAgo value={s.lastAccess} /></td>
<td className="text-secondary">{s.expiresAt ? formatDateTime(new Date(s.expiresAt)) : "—"}</td>
</tr>
))}
+2 -1
View File
@@ -1,4 +1,5 @@
import { useEffect, useState } from "react";
import TimeAgo from "../components/TimeAgo";
import { Link } from "react-router-dom";
import {
api,
@@ -461,7 +462,7 @@ export default function Proxmox({ user }: { user: CurrentUser }) {
<td className="text-secondary">{t.node}</td>
<td>{t.guestId ?? "—"}</td>
<td>{backupStatusBadge(t)}</td>
<td className="text-secondary">{formatDateTime(new Date(t.startTime))}</td>
<td className="text-secondary"><TimeAgo value={t.startTime} /></td>
<td className="text-secondary">{formatDuration(t.startTime, t.endTime)}</td>
</tr>
))}
+2 -3
View File
@@ -1,4 +1,5 @@
import { useEffect, useState } from "react";
import TimeAgo from "../components/TimeAgo";
import { Link } from "react-router-dom";
import {
api,
@@ -208,9 +209,7 @@ export default function Semaphore({ user }: { user: CurrentUser }) {
<td>{t.name}</td>
<td className="text-secondary">{t.projectName}</td>
<td className="text-secondary">
{t.lastTask
? formatDateTime(new Date(t.lastTask.end ?? t.lastTask.start ?? t.lastTask.created ?? ""))
: "—"}
{t.lastTask ? <TimeAgo value={t.lastTask.end ?? t.lastTask.start ?? t.lastTask.created} /> : "—"}
</td>
<td>{semaphoreStatusBadge(t)}</td>
{canEdit && (
+7 -1
View File
@@ -15,6 +15,8 @@ import {
import ServerPorts from "../components/ServerPorts";
import ServerTrends from "../components/ServerTrends";
import ServerActivity from "../components/ServerActivity";
import TimeAgo from "../components/TimeAgo";
import UptimeRibbon from "../components/UptimeRibbon";
import ServerTags from "../components/ServerTags";
import ServerTaskTable, { SCHEDULE_TYPE_LABELS } from "../components/ServerTaskTable";
import { formatDateTime } from "../utils/date";
@@ -748,7 +750,11 @@ export default function ServerDetail({ user }: { user: CurrentUser }) {
<dt className="col-5">Created</dt>
<dd className="col-7">{formatDateTime(new Date(server.createdAt))}</dd>
<dt className="col-5">Last seen</dt>
<dd className="col-7">{server.lastSeenAt ? formatDateTime(new Date(server.lastSeenAt)) : "never"}</dd>
<dd className="col-7">{server.lastSeenAt ? <TimeAgo value={server.lastSeenAt} /> : "never"}</dd>
<dt className="col-5">Last 30 days</dt>
<dd className="col-7">
<UptimeRibbon kind="servers" id={server.id} name={server.name} />
</dd>
</dl>
</div>
</div>
+12 -3
View File
@@ -3,6 +3,8 @@ import { Link, useSearchParams } from "react-router-dom";
import { api, type CurrentUser, type ServerRecord } from "../api/client";
import CopyButton from "../components/CopyButton";
import { formatDateTime } from "../utils/date";
import TimeAgo from "../components/TimeAgo";
import UptimeRibbon from "../components/UptimeRibbon";
import { useSortable } from "../hooks/useSortable";
import SortableTh from "../components/SortableTh";
import { usePagination } from "../hooks/usePagination";
@@ -291,6 +293,7 @@ export default function Servers({ user }: { user: CurrentUser }) {
direction={sortDir}
onSort={requestSort}
/>
<th>Last 30 days</th>
<th className="w-1">Actions</th>
</tr>
</thead>
@@ -307,7 +310,10 @@ export default function Servers({ user }: { user: CurrentUser }) {
</div>
</td>
<td className="text-secondary">{s.apiTokenPrefix}…</td>
<td>{s.lastSeenAt ? formatDateTime(new Date(s.lastSeenAt)) : "never"}</td>
<td>{s.lastSeenAt ? <TimeAgo value={s.lastSeenAt} /> : "never"}</td>
<td>
<UptimeRibbon kind="servers" id={s.id} name={s.name} />
</td>
<td>
<div className="btn-list flex-nowrap">
<button className="btn btn-sm" onClick={() => rotateToken(s.id)}>
@@ -325,7 +331,7 @@ export default function Servers({ user }: { user: CurrentUser }) {
))}
{sortedServers?.length === 0 && (
<tr>
<td colSpan={6} className="text-secondary text-center">
<td colSpan={7} className="text-secondary text-center">
No servers registered yet.
</td>
</tr>
@@ -410,7 +416,10 @@ export default function Servers({ user }: { user: CurrentUser }) {
</div>
)}
<div className="text-secondary small mt-2">
{s.lastSeenAt ? `Last seen ${formatDateTime(new Date(s.lastSeenAt))}` : "Never reported"}
{s.lastSeenAt ? <>Last seen <TimeAgo value={s.lastSeenAt} /></> : "Never reported"}
</div>
<div className="mt-2">
<UptimeRibbon kind="servers" id={s.id} name={s.name} />
</div>
</div>
</Link>
+2 -1
View File
@@ -1,4 +1,5 @@
import { useEffect, useState } from "react";
import TimeAgo from "../components/TimeAgo";
import { api, type SessionSummary } from "../api/client";
import { formatDateTime } from "../utils/date";
import { useSortable } from "../hooks/useSortable";
@@ -148,7 +149,7 @@ export default function Sessions() {
<td>{s.role ?? <span className="text-secondary">unknown user</span>}</td>
<td>{s.ip ?? "—"}</td>
<td className="text-secondary">{friendlyUserAgent(s.userAgent)}</td>
<td>{formatDateTime(new Date(s.lastAccess))}</td>
<td><TimeAgo value={s.lastAccess} /></td>
<td>{s.expiresAt ? formatDateTime(new Date(s.expiresAt)) : "—"}</td>
<td>
<button