feat: Chapter pages show full statute text inline with collapsible TOC#100
Merged
williamzujkowski merged 1 commit intomainfrom Mar 30, 2026
Merged
feat: Chapter pages show full statute text inline with collapsible TOC#100williamzujkowski merged 1 commit intomainfrom
williamzujkowski merged 1 commit intomainfrom
Conversation
Transform chapter pages from section lists into full readable documents:
- All section content rendered inline at build time via Astro render()
- Collapsible TOC at top (collapsed by default) with anchor links
- Section headings link to dedicated detail page (/statute/{slug}/)
- "History & diffs →" link for each section's version tracking
- Status badges (Repealed, Reserved, etc.) shown inline
- Inactive sections dimmed (opacity-60)
- Teal top-border separates each section visually
- Active/inactive section counts in header
- Back to title TOC link at bottom
- scroll-mt-4 on sections for smooth anchor navigation
Users can now read an entire chapter in flow without clicking into
each section individually. The dedicated section pages become the
"deep dive" view with diffs, precedents, and version history.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Transforms chapter browse pages from section lists into full readable documents — the biggest UX improvement in this session.
Before: Chapter page shows section numbers and titles as links. Must click each to read.
After: Full statute text rendered inline. Read an entire chapter in flow. Click section heading or "History & diffs" link for the deep-dive view.
Features
render()/statute/{slug}/detail pagescroll-mt-4for smooth anchor navigation from TOCWhy this matters
This makes us more usable than uscode.house.gov — users can read full chapters in one page instead of clicking through every section individually. The dedicated section pages remain for version tracking, diffs, and precedent annotations.
Navigation flow (updated)
/browse/→ pick a title/browse/title-18/→ expandable TOC, pick a chapter or section/browse/title-18/chapter-7/→ read full chapter text, click for details/statute/{slug}/→ diffs, version history, precedentsIssues
Test plan
svelte-check— 0 errorspnpm test— all pass🤖 Generated with Claude Code