Forráskód Böngészése

feat(web): 将归属变更和审计日志改为时间线

sy 3 napja
szülő
commit
0c7485b504

+ 1 - 1
web-scaffold/src/app/App.tsx

@@ -70,7 +70,7 @@ function ScrollToTop() {
 
 const workspacePages: Record<string, ComponentType> = {
   queue: TeamQueuePage, members: TeamMembersPage, mode: TeamDispatchModePage,
-  plan: CustomerPlanPage, accounts: CustomerAccountsPage, logs: AuditLogPage,
+  plan: CustomerPlanPage, accounts: CustomerAccountsPage, logs: () => <AuditLogPage pageTitle="归属变更" />,
   submit: CustomerSubmitPage,
   /* 缺陷 P-21(2026-11-14 实测):这里原先挂运营侧 `WorkOrderLedgerPage`——客户账号打开
    * `/workspace/progress` 拿到的是运营口径的行集与列集,既看不到自己的工单,也没有

+ 111 - 92
web-scaffold/src/pages/AuditLogPage.tsx

@@ -17,9 +17,9 @@
  */
 import { useEffect, useState } from "react";
 import { PageIntro } from "../components/PageIntro";
-import { ChevronDown, Download, Fingerprint, Search, UserRound } from "lucide-react";
+import { ArrowRight, CalendarDays, ChevronDown, Download, Fingerprint, Search, UserRound } from "lucide-react";
 import { Button } from "../components/ui/button";
-import { Input } from "../components/ui/input";
+import { SearchInput } from "../components/ui/search-input";
 import { FilterSelect } from "../components/ui/filter-select";
 import { DateRangeFilter } from "../components/ui/date-range-filter";
 import { OpsNotice, OpsTableColumns, OpsTableEmpty } from "../components/OperationsKit";
@@ -55,14 +55,18 @@ import {
 import type { AuditItem } from "../lib/api/types";
 import "../styles/operations.css";
 import "../styles/party-audit.css";
+import "../styles/audit-timeline.css";
+
+const auditDayFormat = new Intl.DateTimeFormat("zh-CN", { timeZone: "Asia/Shanghai", year: "numeric", month: "2-digit", day: "2-digit" });
+const auditTimeFormat = new Intl.DateTimeFormat("zh-CN", { timeZone: "Asia/Shanghai", hour: "2-digit", minute: "2-digit", second: "2-digit", hour12: false });
 
 /** occurred_at → 东八区「日期+时刻」两行(总则§10.2,⚠️ 不显 UTC 串);null ⇒ 「—」(时刻未知,⛔ 猜) */
 function TimeCell({ at }: { at: string | null }) {
   if (!at) return <>—</>;
   const date = new Date(at);
   if (Number.isNaN(date.getTime())) return <>{at}</>;
-  const dateText = new Intl.DateTimeFormat("zh-CN", { timeZone: "Asia/Shanghai", year: "numeric", month: "2-digit", day: "2-digit" }).format(date);
-  const timeText = new Intl.DateTimeFormat("zh-CN", { timeZone: "Asia/Shanghai", hour: "2-digit", minute: "2-digit", second: "2-digit", hour12: false }).format(date);
+  const dateText = auditDayFormat.format(date);
+  const timeText = auditTimeFormat.format(date);
   return (
     <>
       <span className="audit-time-date">{dateText}</span>
@@ -91,18 +95,18 @@ function ActionCell({ action }: { action: string }) {
  * (`detail_json.object`/前后值区的白名单名称键)→ 都取不到才 W32;三种形态都并列「类型 · 主键」小字。
  * ⛔ 拿当前库里的名字顶替历史行(I38:改名会伪造流水),⛔ 留空。
  */
-function ObjectCell({ item, compact }: { item: AuditItem; compact: boolean }) {
+function ObjectCell({ item }: { item: AuditItem }) {
   const typeText = AUDIT_OBJECT_TYPE_DISPLAY[normalizeAuditObjectType(item.object.type)] ?? item.object.type;
   const snapshot = auditObjectSnapshot(item);
   return (
     <>
       {snapshot ? (
-        <span className="audit-object-name" title={`${compact ? `${snapshot.text} · ` : ""}对象名取自${snapshot.source}(事件当时的快照,不随后续改名变化)`}>{snapshot.text}</span>
+        <span className="audit-object-name" title={`${snapshot.text} · 对象名取自${snapshot.source}(事件当时的快照,不随后续改名变化)`}>{snapshot.text}</span>
       ) : (
         W32
       )}
       <br />
-      <small title={compact ? `${typeText} · ${item.object.id}` : undefined}>
+      <small title={`${typeText} · ${item.object.id}`}>
         {typeText} · {item.object.id}
       </small>
     </>
@@ -154,35 +158,66 @@ function CompactAuditValue({ value, extra = [] }: {
  * 「分账号:」一行⛔ 受前后值区是否为空影响(D-76):订阅类流水前后值都有值,而 D-41 的额度
  * 对齐结果只落在 `detail_json.sub_accounts`,一并短路=审计页读不到补建了哪几个号。
  */
-function AfterCell({ item, compact }: { item: AuditItem; compact: boolean }) {
-  const detail = auditDetailLines(item);
-  const seats = auditSeatLines(item);
-  if (compact) {
-    const extra = [
-      { label: "明细", lines: detail },
-      { label: "分账号", lines: seats },
-    ].filter(({ lines }) => lines.length > 0);
-    return <CompactAuditValue value={item.after} extra={extra} />;
+function AfterCell({ item }: { item: AuditItem }) {
+  const extra = [
+    { label: "明细", lines: auditDetailLines(item) },
+    { label: "分账号", lines: auditSeatLines(item) },
+  ].filter(({ lines }) => lines.length > 0);
+  return <CompactAuditValue value={item.after} extra={extra} />;
+}
+
+function AuditTimeline({ items }: { items: readonly AuditItem[] }) {
+  const groups: { day: string; entries: { item: AuditItem; clock: string; timestamp?: string }[] }[] = [];
+
+  for (const item of items) {
+    const date = item.occurred_at ? new Date(item.occurred_at) : null;
+    const validDate = date && !Number.isNaN(date.getTime()) ? date : null;
+    const day = validDate ? auditDayFormat.format(validDate) : "日期未记录";
+    const entry = {
+      item,
+      clock: validDate ? auditTimeFormat.format(validDate) : item.occurred_at || "—",
+      timestamp: validDate?.toISOString(),
+    };
+    const group = groups.at(-1);
+    if (group?.day === day) group.entries.push(entry);
+    else groups.push({ day, entries: [entry] });
   }
-  return (
-    <>
-      <AuditLines lines={formatAuditValue(item.after)} />
-      {detail.length > 0 && (
-        <>
-          <br />
-          <small>明细:</small>
-          <AuditLines lines={detail} />
-        </>
-      )}
-      {seats.length > 0 && (
-        <>
-          <br />
-          <small>分账号:</small>
-          <AuditLines lines={seats} />
-        </>
-      )}
-    </>
-  );
+
+  return <div className="audit-timeline">
+    {groups.map(({ day, entries }, groupIndex) => (
+      <section className="audit-timeline-day" key={entries[0].item.cursor ?? `${day}-${groupIndex}`}>
+        <h2><CalendarDays size={16} aria-hidden="true" />{day}</h2>
+        <ol>
+          {entries.map(({ item, clock, timestamp }, index) => {
+            const actor = item.actor.username ?? item.actor.user_id;
+            return <li className="audit-timeline-row" key={item.cursor ?? index}>
+              <span className="audit-timeline-time">
+                {timestamp ? <time dateTime={timestamp}>{clock}</time> : clock}
+              </span>
+              <span className="audit-timeline-marker" aria-hidden="true" />
+              <article className="audit-timeline-event">
+                <header>
+                  <div>
+                    <h3><ActionCell action={item.action} /></h3>
+                    <div className="audit-timeline-object"><ObjectCell item={item} /></div>
+                  </div>
+                  <span className="audit-timeline-actor">
+                    <UserRound size={15} aria-hidden="true" />
+                    <span><small>操作人</small>{actor ?? "—"}</span>
+                  </span>
+                </header>
+                <div className="audit-timeline-values">
+                  <dl><dt>变更前</dt><dd><CompactAuditValue value={item.before} /></dd></dl>
+                  <ArrowRight size={15} className="audit-timeline-arrow" aria-hidden="true" />
+                  <dl><dt>变更后</dt><dd><AfterCell item={item} /></dd></dl>
+                </div>
+              </article>
+            </li>;
+          })}
+        </ol>
+      </section>
+    ))}
+  </div>;
 }
 
 /** C88 横幅(契约 14.4.2):按身份逐字;⚠️ 四句不得合并为通用文案 */
@@ -256,40 +291,29 @@ export function AuditLogPage({ pageTitle = "审计日志", partyView = false }:
   const list = useAuditList();
   const { applied, apply: applyFilter } = list;
   const [draft, setDraft] = useState<AuditFilter>(EMPTY_AUDIT_FILTER);
-  const [filterError, setFilterError] = useState<string | null>(null);
   const [exporting, setExporting] = useState(false);
   const [notice, setNotice] = useState<string | null>(null);
   const hasFilter = Object.values(draft).some(Boolean) || Object.values(applied).some(Boolean);
   const needsObjectType = Boolean(draft.objectId && !draft.objectType);
-  const objectTypeError = "主体定位须先选择对象类型。";
-  const visibleFilterError = partyView && needsObjectType ? objectTypeError : filterError;
-  const intro = partyView ? "按时间、操作人或业务对象查找本方的变更记录。" : "需要追查一笔操作时,可按时间、账号或业务对象查找记录。";
+  const filtersPending = draft !== applied || list.phase.kind === "loading";
+  const intro = partyView
+    ? "按时间、操作人或业务对象查找本方的变更记录。"
+    : pageTitle === "归属变更"
+      ? "查看本公司的归属变动和变更前后的记录。"
+      : "按时间、操作人或业务对象追查历史操作。";
 
   useEffect(() => {
-    if (!partyView || draft === applied || needsObjectType) return;
-    const timer = window.setTimeout(() => applyFilter(draft), 300);
-    return () => window.clearTimeout(timer);
-  }, [partyView, draft, applied, needsObjectType, applyFilter]);
+    // 对象 ID 与类型一起提交,避免筛选条件尚未填完整时返回其他记录。
+    if (draft !== applied && !needsObjectType) applyFilter(draft);
+  }, [draft, applied, needsObjectType, applyFilter]);
 
   const change = (key: keyof AuditFilter, value: string) => {
-    setDraft((current) => ({ ...current, [key]: value }));
-    setFilterError(null);
-  };
-
-  const apply = () => {
-    // 主体定位只接受 ID 且须与对象类型成对(作业§5.4);缺类型 ⇒ 拒发并提示,⛔ 静默丢条件
-    if (needsObjectType) {
-      setFilterError(objectTypeError);
-      return;
-    }
-    setFilterError(null);
-    list.apply(draft);
+    setDraft((current) => current[key] === value ? current : { ...current, [key]: value });
   };
 
   const reset = () => {
     setDraft(EMPTY_AUDIT_FILTER);
-    setFilterError(null);
-    list.apply(EMPTY_AUDIT_FILTER);
+    applyFilter(EMPTY_AUDIT_FILTER);
   };
 
   const objectTypeSelect = (
@@ -318,54 +342,45 @@ export function AuditLogPage({ pageTitle = "审计日志", partyView = false }:
   }
 
   return (
-    <section className={partyView ? "ops-page ops-page--audit party-audit-page page-fill page-fill-window" : "ops-page ops-page--audit page-fill"}>
+    <section className={partyView ? "ops-page ops-page--audit party-audit-page page-fill page-fill-window" : "ops-page ops-page--audit audit-timeline-page"}>
       <header className="ops-heading">
         <div>
           <h1>{pageTitle}</h1>
           <PageIntro>{intro}</PageIntro>
         </div>
         {canExport && (
-          <Button variant="outline" type="button" onClick={() => setExporting(true)}>
+          <Button variant="outline" type="button" disabled={filtersPending} onClick={() => setExporting(true)}>
             <Download size={16} />
             {EXPORT_DIALOG_TITLE}
           </Button>
         )}
       </header>
 
-      {partyView ? <aside className="party-audit-scope" aria-label="记录可见范围"><ScopeBanners role={role} /></aside> : <ScopeBanners role={role} />}
+      <aside className="party-audit-scope" aria-label="记录可见范围"><ScopeBanners role={role} /></aside>
 
-      <section className="ops-list-shell list-shell-fill" aria-label="操作记录">
-        {/* 检索区四件(契约 14.4.1):对象类型/主体定位(只接受 ID)/操作人(ID)/时间区间+关键字 */}
-        <form className="ops-toolbar flex-wrap" aria-label="筛选操作记录" onSubmit={(event) => { event.preventDefault(); if (!partyView) apply(); }}>
-          {partyView && <label className="ops-search party-audit-keyword">
+      <section className={partyView ? "ops-list-shell list-shell-fill" : "ops-list-shell audit-timeline-shell"} aria-label="操作记录">
+        <div className="ops-toolbar audit-record-filters" role="group" aria-label="筛选操作记录">
+          <label className={partyView ? "ops-search party-audit-keyword" : "ops-search"}>
             <Search size={17} aria-hidden="true" />
-            <Input aria-label="关键字" placeholder="搜索变更记录" value={draft.keyword} onChange={(event) => change("keyword", event.target.value)} />
-          </label>}
-          {!partyView && objectTypeSelect}
+            <SearchInput aria-label="关键字" placeholder={pageTitle === "审计日志" ? "搜索操作记录" : "搜索变更记录"} value={draft.keyword} onCommit={(value) => change("keyword", value)} />
+          </label>
           <label className="ops-search">
-            {partyView ? <Fingerprint size={17} aria-hidden="true" /> : <Search size={17} />}
-            <Input aria-label="主体定位(对象 ID)" placeholder={partyView ? "对象 ID" : "主体定位:对象 ID"} value={draft.objectId} onChange={(event) => change("objectId", event.target.value)} />
+            <Fingerprint size={17} aria-hidden="true" />
+            <SearchInput aria-label="主体定位(对象 ID)" placeholder="对象 ID" value={draft.objectId} onCommit={(value) => change("objectId", value)} />
           </label>
           <label className="ops-search">
-            {partyView ? <UserRound size={17} aria-hidden="true" /> : <Search size={17} />}
-            <Input aria-label="操作人(账号 ID)" placeholder="操作人:账号 ID" value={draft.actorId} onChange={(event) => change("actorId", event.target.value)} />
+            <UserRound size={17} aria-hidden="true" />
+            <SearchInput aria-label="操作人(账号 ID)" placeholder="操作人 ID" value={draft.actorId} onCommit={(value) => change("actorId", value)} />
           </label>
-          {partyView && objectTypeSelect}
+          {objectTypeSelect}
           <DateRangeFilter label="时间范围" from={draft.from} to={draft.to} onChange={change} constrainRange />
-          {!partyView && <label className="ops-search">
-            <Search size={17} />
-            <Input aria-label="关键字" placeholder="关键字" value={draft.keyword} onChange={(event) => change("keyword", event.target.value)} />
-          </label>}
-          {!partyView && <Button type="submit" size="sm">
-            查询
-          </Button>}
-          {(!partyView || hasFilter) && <Button type="button" size="sm" variant="ghost" onClick={reset}>
+          {hasFilter && <Button type="button" size="sm" variant="ghost" onClick={reset}>
             重置筛选
           </Button>}
-        </form>
-        {visibleFilterError && (
+        </div>
+        {needsObjectType && (
           <p className="ops-form-error" role="alert">
-            {visibleFilterError}
+            请先选择对象类型,再按对象 ID 筛选。
           </p>
         )}
 
@@ -378,9 +393,9 @@ export function AuditLogPage({ pageTitle = "审计日志", partyView = false }:
           </p>
         )}
 
-        <div className="measured-table-scroll ops-table-wrap" role="region" aria-label={`${pageTitle},可横向滚动查看字段`} tabIndex={0}>
-          <table className={partyView ? "ops-table party-audit-table" : "ops-table"} aria-busy={partyView ? list.phase.kind === "loading" || list.loadingMore : undefined}>
-            <OpsTableColumns widths={partyView ? [11, 13, 14, 18, 22, 22] : [11, 11, 13, 18, 22, 25]} />
+        {partyView ? <div className="measured-table-scroll ops-table-wrap" role="region" aria-label={`${pageTitle},可横向滚动查看字段`} tabIndex={0}>
+          <table className="ops-table party-audit-table" aria-busy={list.phase.kind === "loading" || list.loadingMore}>
+            <OpsTableColumns widths={[11, 13, 14, 18, 22, 22]} />
             <thead>
               <tr>
                 {W31_COLUMNS.map((column) => (
@@ -394,18 +409,18 @@ export function AuditLogPage({ pageTitle = "审计日志", partyView = false }:
                   <td>
                     <TimeCell at={item.occurred_at} />
                   </td>
-                  <td title={partyView ? item.actor.username ?? item.actor.user_id ?? undefined : undefined}>{item.actor.username ?? item.actor.user_id ?? <span className="table-placeholder">—</span>}</td>
+                  <td title={item.actor.username ?? item.actor.user_id ?? undefined}>{item.actor.username ?? item.actor.user_id ?? <span className="table-placeholder">—</span>}</td>
                   <td>
                     <ActionCell action={item.action} />
                   </td>
                   <td>
-                    <ObjectCell item={item} compact={partyView} />
+                    <ObjectCell item={item} />
                   </td>
                   <td>
-                    {partyView ? <CompactAuditValue value={item.before} /> : <AuditLines lines={formatAuditValue(item.before)} />}
+                    <CompactAuditValue value={item.before} />
                   </td>
                   <td>
-                    <AfterCell item={item} compact={partyView} />
+                    <AfterCell item={item} />
                   </td>
                 </tr>
               ))}
@@ -413,10 +428,14 @@ export function AuditLogPage({ pageTitle = "审计日志", partyView = false }:
               {list.phase.kind === "ready" && list.items.length === 0 && <OpsTableEmpty colSpan={6}>{W15}</OpsTableEmpty>}
             </tbody>
           </table>
-        </div>
+        </div> : <div className="audit-timeline-content" aria-busy={list.phase.kind === "loading" || list.loadingMore}>
+          {list.phase.kind === "loading" ? <p className="audit-timeline-empty" role="status">正在加载…</p>
+            : list.items.length ? <AuditTimeline items={list.items} />
+              : list.phase.kind === "ready" && <div className="audit-timeline-empty" role="status"><CalendarDays size={23} aria-hidden="true" />{W15}</div>}
+        </div>}
         {list.nextCursor && (
           <footer className="ops-list-footer">
-            <Button variant="outline" size="sm" type="button" disabled={list.loadingMore || (partyView && (draft !== applied || list.phase.kind === "loading"))} onClick={list.loadMore}>
+            <Button variant="outline" size="sm" type="button" disabled={list.loadingMore || filtersPending} onClick={list.loadMore}>
               {list.loadingMore ? "加载中…" : "加载更多"}
             </Button>
           </footer>

+ 124 - 0
web-scaffold/src/styles/audit-timeline.css

@@ -0,0 +1,124 @@
+.audit-timeline-page { min-width: 0; }
+.audit-timeline-page.ops-page--audit > .ops-heading { margin-bottom: 12px; }
+.ops-toolbar.audit-record-filters { gap: 8px; }
+.audit-timeline-shell {
+  --timeline-inset: clamp(14px, 2.5vw, 24px);
+  container-type: inline-size;
+}
+.audit-timeline-shell > .ops-form-error { margin: 0 var(--timeline-inset) 12px; }
+.audit-timeline-content { min-width: 0; border-top: 1px solid var(--border-subtle); }
+.audit-timeline { padding: 20px var(--timeline-inset) 24px; background: var(--surface-subtle); }
+.audit-timeline-day + .audit-timeline-day { margin-top: 26px; }
+.audit-timeline-day h2 {
+  display: flex;
+  align-items: center;
+  gap: 7px;
+  margin: 0 0 12px;
+  color: var(--text-secondary);
+  font-size: var(--type-section);
+  font-weight: 600;
+  font-variant-numeric: tabular-nums;
+}
+.audit-timeline-day h2 svg { flex: none; color: var(--primary); }
+.audit-timeline-day ol { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
+.audit-timeline-row {
+  display: grid;
+  grid-template-columns: 76px 14px minmax(0, 1fr);
+  column-gap: 12px;
+}
+.audit-timeline-time {
+  padding-block-start: 17px;
+  color: var(--muted-foreground);
+  font-size: var(--type-support);
+  font-variant-numeric: tabular-nums;
+  text-align: end;
+  overflow-wrap: anywhere;
+}
+.audit-timeline-marker { position: relative; }
+.audit-timeline-marker::before {
+  content: "";
+  position: absolute;
+  inset: 0 auto -12px 50%;
+  border-inline-start: 1px solid var(--border-hover);
+}
+.audit-timeline-marker::after {
+  content: "";
+  position: absolute;
+  inset: 19px auto auto 50%;
+  width: 9px;
+  height: 9px;
+  translate: -50% 0;
+  border: 2px solid var(--primary);
+  border-radius: 50%;
+  background: var(--card);
+}
+.audit-timeline-row:first-child .audit-timeline-marker::before { inset-block-start: 23px; }
+.audit-timeline-row:last-child .audit-timeline-marker::before { inset-block-end: auto; height: 23px; }
+.audit-timeline-row:only-child .audit-timeline-marker::before { display: none; }
+.audit-timeline-event {
+  min-width: 0;
+  padding: 14px 16px 16px;
+  border: 1px solid var(--border);
+  border-radius: var(--radius-control);
+  background: var(--card);
+}
+.audit-timeline-event header { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 8px 18px; }
+.audit-timeline-event header > div { min-width: 0; }
+.audit-timeline-event h3 { margin: 0; color: var(--foreground); font-size: var(--type-body); font-weight: 600; overflow-wrap: anywhere; }
+.audit-timeline-event h3 br, .audit-timeline-object br { display: none; }
+.audit-timeline-event h3 small, .audit-timeline-object small {
+  display: block;
+  color: var(--muted-foreground);
+  font-size: var(--type-meta);
+  font-weight: 400;
+  overflow-wrap: anywhere;
+}
+.audit-timeline-object { margin-top: 3px; color: var(--text-secondary); font-size: var(--type-support); overflow-wrap: anywhere; }
+.audit-timeline-actor {
+  display: inline-flex;
+  align-items: flex-start;
+  gap: 5px;
+  min-width: 0;
+  color: var(--text-secondary);
+  font-size: var(--type-support);
+  overflow-wrap: anywhere;
+}
+.audit-timeline-actor svg { flex: none; margin-top: 2px; color: var(--icon); }
+.audit-timeline-actor small { margin-inline-end: 6px; color: var(--muted-foreground); font-size: var(--type-meta); }
+.audit-timeline-values {
+  display: grid;
+  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
+  align-items: stretch;
+  gap: 10px;
+  margin-top: 12px;
+}
+.audit-timeline-values dl { min-width: 0; margin: 0; padding: 8px 11px; border: 1px solid var(--border-subtle); border-radius: 7px; background: var(--surface-subtle); }
+.audit-timeline-values dl:last-child { border-color: var(--primary-border); background: var(--primary-soft); }
+.audit-timeline-values dt { margin-bottom: 4px; color: var(--muted-foreground); font-size: var(--type-meta); }
+.audit-timeline-values dl:last-child dt { color: var(--primary-soft-foreground); }
+.audit-timeline-values dd { margin: 0; color: var(--text-secondary); font-size: var(--type-support); line-height: 1.55; overflow-wrap: anywhere; }
+.audit-timeline-values .party-audit-value { white-space: pre-wrap; }
+.audit-timeline-arrow { align-self: center; color: var(--icon); }
+.audit-timeline-empty {
+  display: grid;
+  justify-items: center;
+  gap: 8px;
+  margin: 0;
+  padding: 56px 16px;
+  color: var(--muted-foreground);
+  font-size: var(--type-body);
+  text-align: center;
+}
+.audit-timeline-shell > .ops-list-footer { justify-content: center; }
+
+@container (max-width: 590px) {
+  .audit-timeline-row { grid-template-columns: 12px minmax(0, 1fr); gap: 5px 9px; }
+  .audit-timeline-time { grid-column: 2; padding: 0; text-align: start; }
+  .audit-timeline-marker { grid-column: 1; grid-row: 1 / span 2; }
+  .audit-timeline-marker::after { inset-block-start: 5px; }
+  .audit-timeline-row:first-child .audit-timeline-marker::before { inset-block-start: 9px; }
+  .audit-timeline-row:last-child .audit-timeline-marker::before { height: 9px; }
+  .audit-timeline-event { grid-column: 2; padding: 12px; }
+  .audit-timeline-values { grid-template-columns: minmax(0, 1fr); gap: 6px; }
+  .audit-timeline-arrow { justify-self: center; rotate: 90deg; }
+}