Skip to content

enhance: Add per-section change indicators to title TOC #95

@williamzujkowski

Description

@williamzujkowski

Context

Phase 3 of #92 (IA epic). The expandable title TOC and in-title search are live. Next: show which sections changed in recent release points.

Proposed approach

At build time, generate a per-section change index from the diff data:

  1. Read diff manifest pairs
  2. For each pair, list the section files that have diffs
  3. Write a JSON index: `{ "statutes/title-18/chapter-7/section-111.md": ["pl-117-159"] }`
  4. Title page reads this index and shows change badges

Display

  • Small lightning bolt or colored dot next to recently-changed sections
  • Tooltip showing which PL changed it: "Changed in PL 117-159"
  • This is the key differentiator vs Cornell LII and OLRC (neither shows change tracking)

Files

  • `scripts/generate-diffs.ts` — add section-level change index output
  • `apps/web/src/pages/browse/[title].astro` — read index and render indicators

Depends on

Metadata

Metadata

Assignees

No one assigned

    Labels

    frontendAstro static sitepipelineGit automation pipeline

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions