diff --git a/docs/demo/dashboard-host.png b/docs/demo/dashboard-host.png
index 62fe1c0..3195b32 100644
Binary files a/docs/demo/dashboard-host.png and b/docs/demo/dashboard-host.png differ
diff --git a/docs/fleet.ko.md b/docs/fleet.ko.md
index 5fde820..f9e2e57 100644
--- a/docs/fleet.ko.md
+++ b/docs/fleet.ko.md
@@ -1,4 +1,4 @@
-
+
# 서버로 모아 보기
> 설계는 [ADR 0010](adr/0010-fleet-server-and-dashboard.md)에 있습니다. 호스트가 결과를 보내고, 서버가 저장해 두었다가 조회
@@ -15,15 +15,16 @@
설치한 바이너리에는 API만 있고, `/`에 접속하면 그렇게 안내합니다. 조회 토큰(`vmsctl server token create
--scope api`)으로 로그인하면 다음을 볼 수 있습니다.
-- **전체 현황**: 통과율, 7·30·90일간의 통과율 추이, 실패한 점검 항목이 있는 호스트, 보고를 멈춘 호스트, 가장 많이
- 실패하는 점검 항목, 최근에 나빠진 항목
+- **전체 현황**: 통과율, 7·30·90일간의 통과율 추이, 실패한 점검 항목이 있는 호스트, 보고를 멈춘 호스트, 먼저 고칠
+ 점검 항목과 고치면 오르는 통과율, 최근에 악화되거나 해결된 항목과 보고가 끊긴 호스트
- **호스트 목록**: 검색, 필터, 정렬, CSV 내보내기. 호스트·점검 항목·이미지 목록은 필터가 주소에 들어가므로 걸러 놓은 목록을
링크로 공유할 수 있고, 항목을 열었다가 브라우저의 뒤로 가기나 상세 페이지의 "← 호스트"·"← 점검 항목"·"← 이미지" 링크로 돌아가도
같은 목록이 나옵니다. 호스트마다 운영체제, 레이블, 최근 스캔의 추이선, 에이전트
연결 여부가 함께 나옵니다.
- **점검 항목 목록**: 점검 항목마다 무엇을 점검하는지, 왜 중요한지, 어떻게 고치는지, 실패한 호스트가 어디인지
- **매트릭스**: 모든 호스트의 모든 점검 항목을 한 표로
-- **호스트 상세**: 점검 항목별 점검 근거, 스캔 이력, 어떤 스캔이든 직전 스캔과의 비교
+- **호스트 상세**: 직전 스캔 이후 악화되거나 해결된 점검 항목(누르면 그 항목이 열림), 점검 항목별 점검 근거, 스캔 이력,
+ 어떤 스캔이든 직전 스캔과의 비교
한국어와 영어로 볼 수 있고 시스템의 라이트/다크 테마를 따릅니다. 호스트가 보낸 내용은 모두 텍스트로만
표시합니다.
diff --git a/docs/fleet.md b/docs/fleet.md
index d04f3fe..353e65d 100644
--- a/docs/fleet.md
+++ b/docs/fleet.md
@@ -13,9 +13,9 @@ it cannot make one scan, run anything or read anything there.
release binaries are, and a source build uses `make build-web` (Node 22). A binary from `go install`
has the API only and says so at `/`. Sign in with a read token (`vmsctl server token create --scope
api`): the dashboard shows the fleet overview (pass rate, the pass rate over time for 7, 30 or 90 days, hosts with a failing control, hosts that
-stopped reporting, the controls that fail most, recent regressions), the host list (search, filters,
+stopped reporting, what to fix first with what each fix adds to the pass rate, and what just got worse, was fixed or went silent), the host list (search, filters,
sorting, CSV export, and for each host its operating system, labels, a trend line of its latest scans and whether
-its agent is connected), a list of controls (and for each one what it checks, why it matters, how to fix it and the hosts that fail it), a matrix of every control on every host, and for each host its controls with the evidence of every check, its history and a
+its agent is connected), a list of controls (and for each one what it checks, why it matters, how to fix it and the hosts that fail it), a matrix of every control on every host, and for each host what got worse or was fixed since its previous scan (a click opens the control), its controls with the evidence of every check, its history and a
comparison of any scan with the one before. It is available in English and Korean and follows the
system's light or dark theme. Everything a host sent is shown as text. The filters of the host, control and
image lists are in the address: a link shares a filtered list, and both the browser's back button and the back link of a
diff --git a/site/img/dashboard-host.png b/site/img/dashboard-host.png
index 62fe1c0..3195b32 100644
Binary files a/site/img/dashboard-host.png and b/site/img/dashboard-host.png differ
diff --git a/site/img/ko/dashboard-host.png b/site/img/ko/dashboard-host.png
index 1bcca84..e85dca8 100644
Binary files a/site/img/ko/dashboard-host.png and b/site/img/ko/dashboard-host.png differ
diff --git a/site/index.html b/site/index.html
index 8c6bb03..82d458b 100644
--- a/site/index.html
+++ b/site/index.html
@@ -156,7 +156,7 @@
One dashboard for every server
Search, filter by label, sort. Each host shows its latest result and a trend line.
-
+
The evidence behind every check, how to fix a failure, the scan history and a comparison with the scan before.
점검마다 근거와 실패한 항목의 조치 방법, 스캔 이력, 직전 스캔과의 비교를 볼 수 있습니다.
diff --git a/web/src/lib/i18n.tsx b/web/src/lib/i18n.tsx
index c686959..0227aee 100644
--- a/web/src/lib/i18n.tsx
+++ b/web/src/lib/i18n.tsx
@@ -30,6 +30,12 @@ const en = {
"overview.changesHelp": "Controls that got worse or were fixed in a host's latest scan, and hosts that stopped reporting.",
"change.regressed": "Worse",
"change.fixed": "Fixed",
+ "since.title": "Since the previous scan",
+ "since.help": "Controls that got worse or were fixed between {prev} ({ago}) and the latest scan.",
+ "since.none": "Nothing got worse or was fixed since the previous scan.",
+ "since.other": "Nothing got worse or was fixed, but the previous scan checked other controls: compare the two scans.",
+ "since.more": "{n} more changes",
+ "since.compare": "Compare the two scans",
"change.stale": "Silent",
"change.staleWhat": "no result for {n} days",
"overview.tiles": "Hosts at a glance",
@@ -209,6 +215,12 @@ const ko: Record = {
"overview.changesHelp": "호스트의 최신 스캔에서 악화되거나 해결된 점검 항목, 그리고 보고가 끊긴 호스트입니다.",
"change.regressed": "악화",
"change.fixed": "해결",
+ "since.title": "지난 스캔 이후",
+ "since.help": "직전 스캔({prev}, {ago})과 최신 스캔 사이에 악화되거나 해결된 점검 항목입니다.",
+ "since.none": "직전 스캔 이후 악화되거나 해결된 점검 항목이 없습니다.",
+ "since.other": "악화되거나 해결된 항목은 없지만, 직전 스캔은 다른 점검 항목을 점검했습니다. 두 스캔을 비교해 보세요.",
+ "since.more": "그 밖의 변경 {n}건",
+ "since.compare": "두 스캔 비교",
"change.stale": "보고 끊김",
"change.staleWhat": "{n}일째 결과가 오지 않음",
"overview.tiles": "호스트 한눈에 보기",
@@ -366,6 +378,7 @@ export type Translate = (key: Key | string, n?: number | Record = {
"overview.stale": "Hosts not reporting for 1 day",
"overview.onHosts": "on 1 host",
+ "since.more": "1 more change",
"change.staleWhat": "no result for 1 day",
"trend.days": "1 day",
"profile.hosts": "1 host",
diff --git a/web/src/pages/Host.tsx b/web/src/pages/Host.tsx
index 42373fe..1f132cf 100644
--- a/web/src/pages/Host.tsx
+++ b/web/src/pages/Host.tsx
@@ -1,87 +1,182 @@
-import { useEffect, useMemo, useState } from "react";
+import { useEffect, useMemo, useRef, useState } from "react";
import { ApiError, api } from "../lib/api";
-import { useAsync, useNow } from "../lib/hooks";
+import { type Async, useAsync, useNow } from "../lib/hooks";
import { useI18n } from "../lib/i18n";
import { ago, compareControls, ctitle, localized } from "../lib/format";
import { lastListAddress } from "../lib/listAddress";
import { Avatar, Await, Empty, Gauge, Inline, ScorePill, Severity, SignedBadge, StatusBadge, StatusBar } from "../components/ui";
import { TrendChart } from "../components/charts";
import { IconChevron, IconDownload, IconSearch } from "../components/icons";
-import { STATUSES, type ControlChange, type ControlRow, type Diff, type ScanDoc, type ScanRow, type Status } from "../lib/types";
+import { STATUSES, type ControlChange, type ControlRow, type Diff, type HostDetail, type ScanDoc, type ScanRow, type Status } from "../lib/types";
import { STALE_DAYS } from "./Overview";
export function HostPage({ id }: { id: number }) {
const { t } = useI18n();
- const now = useNow();
- const [tab, setTab] = useState<"controls" | "history">("controls");
+ // The tab lives here, outside Await, so that a reload (after "scan now") keeps it.
+ const [tab, setTab] = useState("controls");
const state = useAsync(() => api.host(id, STALE_DAYS), [id], false);
return (
- <>
- {t("host.back")}}>
- {(h) => (
-
);
}
-function Controls({ controls, scanId }: { controls: ControlRow[]; scanId: number }) {
+/** What changed between the host's previous scan and its latest one: the controls that got worse or were fixed. */
+function SinceLast({ diff, previous, onOpen, onCompare }: { diff: Async; previous: ScanRow; onOpen: (key: string) => void; onCompare: () => void }) {
+ const { t, lang } = useI18n();
+ const now = useNow();
+ if (diff.error) return null; // the history still compares the scans and says what went wrong
+ const d = diff.data;
+ const items = d ? [...d.regressed.map((c) => ({ c, kind: "regressed" as const })), ...d.fixed.map((c) => ({ c, kind: "fixed" as const }))] : [];
+ const more = d ? d.changed.length + d.added.length + d.removed.length + Math.max(0, items.length - SINCE_MAX) : 0;
+ // Nothing got worse or was fixed because the two scans checked other controls (another profile, a new revision): say so.
+ const other = d ? d.added.length + d.removed.length : 0;
+ return (
+
+