web: show how long a line has been out of contact
ci/woodpecker/push/web-build Pipeline was successful
ci/woodpecker/push/verify Pipeline was successful
ci/woodpecker/push/e2e Pipeline failed

The Backend now keeps the time since a link's control layer was last up, because retries move the control state in and out of backoff and its own timestamp keeps resetting. The overview exposes it as control_down_since and the card shows it next to the lost-contact notice.
This commit is contained in:
justme committed 2026-10-21 17:16:09 +08:00
1 parent 5245f03a78
commit 57acecdb86
7 files changed
+41 -8

No files matched your search

+2 -2
View File
@@ -2,7 +2,7 @@ import { useEffect, useMemo, useRef, useState } from 'react'
import { Link, useSearchParams } from 'react-router-dom'
import { api } from '@shared/api/client'
import type { AgentIpv6Dto, NodeInfoDto, OverviewDto, OverviewLineDto, Page } from '@shared/api/types'
import { fmtAgo } from '@shared/format'
import { fmtAgo, fmtDuration } from '@shared/format'
import { useQuery } from '@shared/hooks'
import { Chip, Dot, Empty, Segmented, Spinner } from '@shared/ui'
import { fmtBytes, fmtSpeed, fmtUptime, pct, useHosts, type HostItem } from '../live'
@@ -196,7 +196,7 @@ function LineCard({ l, range, infos }: { l: OverviewLineDto; range: OverviewRang
const connectionIssue = !l.online
? 'Agent 离线'
: l.quic_health?.control_state === 'backoff'
? '与 Agent 失联'
? `与 Agent 失联${l.quic_health.control_down_since ? ` ${fmtDuration(Math.max(0, Date.now() - new Date(l.quic_health.control_down_since).getTime()))}` : ''}`
: l.quic_health?.state === 'retry_wait'
? 'QUIC 拨号失败'
: !l.dialer_connected
+1
View File
@@ -2120,6 +2120,7 @@ export interface components {
retry_in_ms?: null | number | string;
/** @default dialing */
control_state: string;
control_down_since?: unknown;
};
RawChunkMetaDto: {
chunk_id: string;