Sync panorama node detail on refresh; scope scenario 4 to the fixture doc

Why: the cockpit refresh reloaded overview and tree but left the node
detail at its old snapshot, so the 刷新对齐 banner persisted after
refreshing (DV-R05 wants every projection to advance). PanoramaNode now
refetches when the overview snapshotRevision advances. Scenario 4 also
scoped its tree clicks to the 验证主体报告 branch — the unscoped first
caret expanded an unrelated rdm-self doc.

Evidence: tsc clean, vitest green, build green (SELF); seven-scenario
rerun to be recorded on the Dev I4 card.

Impact: cockpit panorama + e2e spec.

Refs: rollout I4
This commit is contained in:
2026-10-17 04:30:32 +00:00
parent e503cc9e93
commit 83e81d12ac
2 changed files with 7 additions and 4 deletions
+4 -2
View File
@@ -197,6 +197,7 @@ export function DocumentCockpit() {
)}
{overview && selected && viewMode === 'panorama' && (
<PanoramaNode pid={pid} selection={selected} overview={overview}
snapRev={overview.meta.snapshotRevision}
childPage={selected.ref.kind === 'document' ? treePages[selected.ref.id] : undefined}
density={density}
onClear={() => setSelected(null)}
@@ -290,10 +291,11 @@ function PanoramaHome({ overview, onSelect }: { overview: CockpitOverview; onSel
)
}
function PanoramaNode({ pid, selection, overview, childPage, density, onClear, onOpenReader }: {
function PanoramaNode({ pid, selection, overview, childPage, density, snapRev, onClear, onOpenReader }: {
pid: string; selection: Selection; overview: CockpitOverview
childPage?: { items: CockpitTreeNode[]; nextCursor?: string; hasMore: boolean; meta?: CockpitMeta }
density: Density
snapRev: string
onClear: () => void
onOpenReader: () => void
}) {
@@ -314,7 +316,7 @@ function PanoramaNode({ pid, selection, overview, childPage, density, onClear, o
})
.catch(e => { if (g === gen.current) setErr(e.message) })
return () => { gen.current++ }
}, [pid, selection.ref.kind, selection.ref.id])
}, [pid, selection.ref.kind, selection.ref.id, snapRev])
const node = (detail?.node || null) as CockpitTreeNode | null
const title = node?.title || selection.ref.id
return (