feat: Add status frontmatter field for section state detection#91
Merged
williamzujkowski merged 1 commit intomainfrom Mar 30, 2026
Merged
feat: Add status frontmatter field for section state detection#91williamzujkowski merged 1 commit intomainfrom
williamzujkowski merged 1 commit intomainfrom
Conversation
) Transformer: - Add SectionStatusSchema enum (active|repealed|reserved|omitted|transferred|renumbered) - Add detectSectionStatus() function to derive status from heading text - Generate status field in YAML frontmatter for every section - Export new types and function Content Collection: - Add status field to schema with 'active' default for backwards compat Frontend (statute + browse): - Use entry.data.status as primary check with title-based fallback - Eliminates fragile string matching as sole detection method - Single source of truth for status in the transformer Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
williamzujkowski
added a commit
that referenced
this pull request
Mar 30, 2026
The status field was added to FrontmatterSchema in PR #91 but the test fixture in transformer.test.ts was not updated, causing CI typecheck failures. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
williamzujkowski
added a commit
that referenced
this pull request
Mar 30, 2026
The status field was added to FrontmatterSchema in PR #91 but the test fixture in transformer.test.ts was not updated, causing CI typecheck failures. 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
Moves section status detection from fragile title-string matching in templates to a proper frontmatter field generated by the transformer.
Transformer
SectionStatusSchemaenum: active, repealed, reserved, omitted, transferred, renumbereddetectSectionStatus(heading)derives status from heading textstatusfield added to YAML frontmatter outputContent Collection
statusfield added to schema with'active'default (backwards compatible with existing data that lacks the field)Frontend
entry.data.statusfirst, with title-based fallback for data generated before this changeImpact
statusfield, no fallback neededIssues
Test plan
pnpm test— all 266 tests passsvelte-check— 0 errors🤖 Generated with Claude Code