Context. surface customer · domain nisaba · route /nisaba/compare · auth signed-in · source apps/oshun/web/src/app/nisaba/compare/page.tsx
Last walked. 2026-05-29 automated runtime walk (Playwright headless) — render, /v1 data (2xx), console/page-errors, expected content, screenshot verified; live screen-reader, touch, offline, and telemetry-delivery checks pending a manual AT pass. Evidence: WALKTHROUGH/results/runtime-sweep-2026-05-29.md; content re-verified 2026-06-03 against current source; 2026-06-29 Playwright re-walk added Veritas retraction cascade edition-update notice + diff coverage
Purpose#
Three editions of a passage side by side, with diff highlight on the line and a plain-English note. Lets a reader compare witnesses without leaving the desk.
Entry points#
- Nisaba sub-nav —
nisaba.mdsub-nav (verify wiring of thecomparetab) - Scholar mode — links from
nisaba-scholar.md - Direct URL / bookmark — yes
Layout regions#
page.tsx is a thin server component: await getNisabaCompare() →
<NisabaCompare data={data} />.
Inside NisabaCompare (nisaba.tsx), a Lilith composition:
- Web shell top —
LCustomerNav active="library" - Header strip — eyebrow row "Nisaba · text, three ways" / "Aurelius IV.viii
· ll. 1–5" / "← prev passage · next passage →";
LDisplayheadline "The text, side by side."; supporting italic copy - Display / apparatus toolbar — eyebrow row with options:
- Display: 3-way (active) / 2-way / linear
- Synced scroll · on
- Apparatus · on
- Diff highlight · on
- Add witness ▾
- Export Leiden
- Retraction edition-update notice — only when the route is opened with
cascade=cascade-ai-governance-survey-retraction; exposesdata-nisaba-edition-update-notice, the cascade id, affected source, corrected source, pinned edition version, original/corrected citation labels, locator, per-row before/after diff, corrected-source link, and notebook-marker return link - Three-column body — three witnesses laid out in a CSS grid
(
repeat(3, 1fr)):- Verify in source: typical contents are two Greek witnesses and one English translation, with per-line diff highlight
- Plain-English note — short note explaining differences (verify placement
in
NisabaCompare)
States#
- Loaded —
getNisabaCompare()resolves before render - Display: 3-way active — current default per the toolbar
- Display: 2-way / linear — verify whether these toggles are interactive in V1
- Synced scroll on/off — verify implementation
- Diff highlight on/off — verify implementation
- Apparatus on/off — toggles per-line apparatus
- Add witness ▾ — verify whether the menu opens a witness picker
- Export Leiden — exports the Leiden-style transcription (verify destination — file download? clipboard?)
- Veritas retraction edition-update —
/nisaba/compare?origin=veritas-retraction&cascade=cascade-ai-governance-survey-retraction&citation=notebook-citation-ai-governance-adoption-claimrenders the source-retracted edition notice with the affected survey source, corrected operator-data source, pinned edition version, locator, and two explicit diff rows - Standalone PWA / Offline — depends on shell + server cache
Interactions#
Header strip#
- ← prev passage — navigates to previous passage (verify exact target)
- next passage → — navigates to next passage
Display toolbar#
- 3-way (active) — keeps the three-column layout
- 2-way — switches to two columns (verify which two witnesses)
- linear — switches to single-column linear view
- Synced scroll — toggles cross-column scroll syncing
- Apparatus — toggles apparatus visibility
- Diff highlight — toggles inline diff highlights
- Add witness ▾ — opens a menu of additional witnesses
- Export Leiden — exports Leiden transcription
Witness columns#
- Line click / hover — highlights the matching line in the other columns
when
Synced scrollis on - Apparatus footnote — opens the apparatus entry
Retraction edition-update notice#
- Original vs. corrected citation —
data-nisaba-edition-update-original-citationanddata-nisaba-edition-update-corrected-citationrender the withdrawn survey label next to the corrected Statnett operator-data label - Pinned locator and version —
data-nisaba-edition-version-pinanddata-nisaba-edition-update-locatorname the exact notebook footnote / sentence represented by the diff - Diff rows —
data-nisaba-edition-diff-rowentries expose line ids, before text, after text, and rationale - Open corrected source —
data-nisaba-edition-update-action="open-corrected-source"links to/veritas/source/statnett-operator-data?origin=nisaba-edition-diff - Back to notebook marker —
data-nisaba-edition-update-action="open-notebook-marker"links back to/nisaba/notebookwith the shared cascade query
Data & contracts#
- Reads:
getNisabaCompare()from@/lib/lilith-data/nisaba-depth— returnsNisabaCompareData(witnesses/editions, lines, diff metadata). This is a local fixture (getNisabaCompareFixture()innisaba-depth.ts), not a live BFF fetch. WhencascadeIdiscascade-ai-governance-survey-retraction, it also returnseditionUpdateNoticefor the affected notebook citation. - Writes: None.
- Realtime: None.
- Caching: server fetch
- Auth/role check: shell middleware
E2E coverage#
apps/oshun/web/e2e/veritas-nisaba-bridge.spec.ts— step 8 follows the Veritas claim confidence-band retraction marker into/nisaba/notebook, opens the affected notebook citation, clicksdata-nisaba-notebook-retraction-action="open-edition-diff", asserts the/nisaba/compareedition-update notice, diff rows, edition version pin, locator, and corrected-source link, then follows that link to the Veritas source profile.
Cross-references#
- Sibling Nisaba routes:
- Component sources:
apps/oshun/web/src/components/lilith/nisaba.tsx(NisabaCompare)apps/oshun/web/src/lib/lilith-data/nisaba-depth.ts
- Feature spec:
V1/features.md#nisaba
Open questions / known gaps#
- Confirm which display, apparatus, and witness toggles are interactive in V1 vs. visual indicators
- Document the Leiden export format and target (download, clipboard)
- Document the prev/next passage navigation contract
- Verify reduced-motion handling for any scroll-sync animations