Entry Preview

Entry Preview is the reusable static summary of one validated current public Entry v2. It keeps the Summary, controlled labels, dates, relationships, and navigation behavior consistent wherever a list presents Entries. This page is for maintainers and coding agents changing the shared preview or integrating it into another public page.

Purpose and ownership

Entry Preview owns:

  • Typed projection from EntryPreviewSource to EntryPreviewViewModel.
  • Selection of the first authored Domain as display priority and mapping to its public label.
  • UTC-safe display dates while preserving the exact ISO value in <time datetime>.
  • Summary validation and rendering as plain text.
  • Claim Status and Evidence Strength label mapping.
  • Canonical Entry and Topic Trail URL validation.
  • Same-site navigation paths derived from those canonical URLs.
  • Typed heading level, presentation, tone, quiet-treatment, and current-trail options.
  • Static semantic markup and responsive card presentation.

It does not own Entry ordering, host section headings, canonical records, release selection, route generation, or full Entry pages.

Inputs and outputs

EntryPreview.astro accepts:

  • entry: the required resolved Entry subset containing title, summary, claim_status, evidence_strength, and ordered domains.
  • treatment: default or quiet; the default is default.
  • topicTrail: an optional host-resolved current Topic Trail relationship.
  • titleLevel: 2 or 3; the default is 3.
  • presentation: standard or homepage; the default is standard.
  • tone: paper or navy; the default is paper.

Projection returns validated display text, the Entry v2 Summary, exact and human-readable dates, Claim Status and Evidence Strength labels, absolute canonical URLs, and route-only navigation targets. Host pages never parse canonical URLs or rebuild this field sequence.

Normal flow

  1. A host receives a resolved Entry from Release Construction.
  2. The host passes the required subset and only the presentation options it owns.
  3. The projector validates required fields, maps controlled values, formats the date, renders the Claim, and validates canonical URLs.
  4. Public Interface navigation converts each validated internal canonical URL into a same-site path while retaining the absolute URL in the model.
  5. The Astro component renders one static <article> with the selected heading level and treatment.

Homepage presentation

Homepage presentation renders:

  1. The first authored Domain in the accessible blue pill.
  2. The linked Entry title at the host-selected heading level.
  3. The Entry v2 Summary with a decorative asterisk accent.
  4. A footer rule.
  5. The human date at bottom-left with the exact ISO value in datetime.
  6. Claim Status at bottom-right, visually uppercase and accessibly labelled.

The title is the only Entry-navigation affordance. Homepage cards do not contain Topic Trail or Read Entry links. The featured card uses an H2; recent cards use H3. One recent card may request the navy tone, while all other cards use paper.

Standard presentation

Standard presentation renders:

  1. Domain and Updated D Mon YYYY metadata.
  2. The linked Entry title.
  3. The Entry v2 Summary with its decorative asterisk.
  4. Claim Status and Evidence Strength.
  5. The linked primary or host-supplied Topic Trail.
  6. A contextual Read Entry link.

Topic Trail pages use standard presentation with the quiet treatment. The quiet treatment removes the card shadow and side borders without removing statuses, relationships, or navigation. Repeated Read Entry links use an accessible name containing the Entry title. Entry Preview does not render the legacy v1 Review Status or Entry State.

Canonical URLs and local navigation

Resolved Entries carry absolute canonical URLs because release metadata, sitemaps, exports, and canonical document links require an origin. Entry Preview retains and validates those URLs, but public anchor elements use only their path, query, and fragment. A local page therefore opens another local VyDex route instead of navigating to the reserved vydex.example browser-test origin. Production anchors resolve to the same public routes without weakening canonical metadata.

External source URLs do not pass through this conversion. Entry Preview does not render source links.

Safety, accessibility, and failure behavior

Projection rejects missing values, unmapped controlled values, invalid dates, unsafe or unsupported Markdown, and invalid HTTP(S) canonical URLs. It returns no partial preview and does not mutate the source.

Cards use the project-owned 16px radius and subtle shadow. Domain and status pills use the project-owned pill radius. Compact blue text uses the approved accessible color. Title and Claim text are never clamped or hidden. Keyboard focus uses the shared visible treatment, reduced motion uses shared tokens, and all content remains available without JavaScript.

Internal edge cases

  • Only the first authored Domain is displayed; the source keeps every Domain in authored order.
  • A current-trail override changes the footer relationship for its host without changing the stored primary Topic Trail.
  • Date formatting uses UTC so the calendar date cannot move across time zones.
  • Canonical URLs may contain a query or fragment. Same-site navigation preserves both.
  • The full card is never clickable, which prevents nested or competing link targets.

Cross-system edge cases

  • Canonical Records owns valid field values, Markdown profiles, and controlled labels. Entry Preview consumes those contracts without widening them.
  • Release Construction owns snapshot selection, material activity, relationships, routes, and absolute canonical URLs.
  • Stage 1 Homepage owns featured and recent selection, title levels, and the one approved navy card.
  • Stage 1 Topic Trail Page owns list membership and supplies the current trail when an Entry belongs through a secondary relationship.
  • Stage 1 Entry Page uses the same same-site navigation rule for its internal relationships but owns the complete record presentation and Entry-specific Markdown rendering.
  • Frontier Atlas owns colors, type, spacing, radius, shadow, focus, and responsive primitives.

Invariants

  • Display priority does not create a semantic primary Domain.
  • Homepage presentation changes visible density without changing canonical ownership.
  • Topic Trail pages retain the Entry v2 Summary, Claim Status, Evidence Strength, Topic Trail, and Read Entry.
  • Absolute canonical URLs remain available for metadata while internal anchors stay on the current origin.
  • Exact ISO dates remain machine-readable and display dates remain deterministic.
  • The component has no card-wide link, image, ranking, confidence score, featured badge, generated Claim summary, Review Status, or Entry State.
  • Projection and rendering remain static and do not fetch data in the browser.

Implementation landmarks

  • src/components/entry-preview/ — Preview projection, typed host interface, markup, and treatments.
  • src/shared/public-navigation/ — Absolute canonical URL to same-site navigation conversion.
  • src/shared/entry-markdown/ — Safe Entry Markdown rendering.
  • tests/components/ — Projection, Markdown, date, mapping, and presentation checks.
  • tests/foundation/ — Same-site public-navigation contract.
  • tests/browser/ — Host modes, links, keyboard behavior, and accessibility checks.

Before changing Entry Preview

Check that all visible values still come from validated resolved Entry data; absolute canonical URLs remain available; internal links stay on the current origin; Topic Trail overrides do not mutate records; Homepage and standard sequences remain distinct; full Claims stay visible; and component, browser, keyboard, and accessibility tests cover the change.