PEP-218: события по времени, длинные заголовки в две строки, мок — first/last seen по времени
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
29388820bf
commit
31a8868b86
@ -84,7 +84,7 @@ export function ErrorRows({ rows, tech, from, t, showProject = true }: { rows: E
|
||||
<Card key={r.id} className="gap-1 py-2.5">
|
||||
<div className="flex min-w-0 items-start gap-2">
|
||||
<Bug className={`mt-0.5 size-4 shrink-0 ${r.state === "unresolved" ? "text-destructive" : "text-muted-foreground"}`} />
|
||||
<Link href={`/errors/${encodeURIComponent(r.id)}?from=${encodeURIComponent(from)}`} className="min-w-0 flex-1 font-medium break-words hover:underline">{r.title}</Link>
|
||||
<Link href={`/errors/${encodeURIComponent(r.id)}?from=${encodeURIComponent(from)}`} className="line-clamp-2 min-w-0 flex-1 font-medium break-all hover:underline" title={r.title}>{r.title}</Link>
|
||||
{r.state !== "unresolved" ? <ErrorStateBadge state={r.state} t={t} /> : null}
|
||||
</div>
|
||||
<div className="flex flex-wrap items-center gap-x-3 gap-y-1 pl-6 text-xs text-muted-foreground">
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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(),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user