From 31a8868b869108d1f4a562f14d5e084b7d401bf7 Mon Sep 17 00:00:00 2001 From: peppa-bot Date: Fri, 20 Nov 2026 20:16:35 +0500 Subject: [PATCH] =?UTF-8?q?PEP-218:=20=D1=81=D0=BE=D0=B1=D1=8B=D1=82=D0=B8?= =?UTF-8?q?=D1=8F=20=D0=BF=D0=BE=20=D0=B2=D1=80=D0=B5=D0=BC=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8,=20=D0=B4=D0=BB=D0=B8=D0=BD=D0=BD=D1=8B=D0=B5=20=D0=B7?= =?UTF-8?q?=D0=B0=D0=B3=D0=BE=D0=BB=D0=BE=D0=B2=D0=BA=D0=B8=20=D0=B2=20?= =?UTF-8?q?=D0=B4=D0=B2=D0=B5=20=D1=81=D1=82=D1=80=D0=BE=D0=BA=D0=B8,=20?= =?UTF-8?q?=D0=BC=D0=BE=D0=BA=20=E2=80=94=20first/last=20seen=20=D0=BF?= =?UTF-8?q?=D0=BE=20=D0=B2=D1=80=D0=B5=D0=BC=D0=B5=D0=BD=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- apps/web/components/Errors.tsx | 2 +- packages/core/src/bugsink-errors.ts | 2 +- packages/testkit/src/mock-bugsink.ts | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/web/components/Errors.tsx b/apps/web/components/Errors.tsx index ae4af7a3..1dea4af3 100644 --- a/apps/web/components/Errors.tsx +++ b/apps/web/components/Errors.tsx @@ -84,7 +84,7 @@ export function ErrorRows({ rows, tech, from, t, showProject = true }: { rows: E
- {r.title} + {r.title} {r.state !== "unresolved" ? : null}
diff --git a/packages/core/src/bugsink-errors.ts b/packages/core/src/bugsink-errors.ts index c733a7e3..c2bb184f 100644 --- a/packages/core/src/bugsink-errors.ts +++ b/packages/core/src/bugsink-errors.ts @@ -376,7 +376,7 @@ export async function errorDetail(db: Db, scope: ErrorScope, issueId: string, o: level: e?.data.level ?? null, url: e?.data.request?.url ?? null, users: userValues.length ? userValues.length : null, - events: events.value.slice(0, EVENTS_MAX).map((x) => ({ id: x.id, at: new Date(x.timestamp) })), + events: events.value.map((x) => ({ id: x.id, at: new Date(x.timestamp) })).sort((a, b) => b.at.getTime() - a.at.getTime()).slice(0, EVENTS_MAX), bugsinkUrl: client.issueUrl(i.id), down: issue.down || events.down || tags.down || !!latest?.down, at: issue.at, diff --git a/packages/testkit/src/mock-bugsink.ts b/packages/testkit/src/mock-bugsink.ts index f445d4ff..60934ff3 100644 --- a/packages/testkit/src/mock-bugsink.ts +++ b/packages/testkit/src/mock-bugsink.ts @@ -153,7 +153,9 @@ export class MockBugsink { reason = "REGRESSED"; } issue.count++; - issue.lastSeen = ts; + // Events may arrive out of order (tests, stands): first/last seen are the min/max. + if (ts > issue.lastSeen) issue.lastSeen = ts; + if (ts < issue.firstSeen) issue.firstSeen = ts; if (e.release && !issue.releases.includes(e.release)) issue.releases.push(e.release); const ev: Event = { id: randomUUID(),