Skip to content

feat: In-title section search filter for expandable TOC#94

Merged
williamzujkowski merged 1 commit intomainfrom
feat/92-title-search
Mar 30, 2026
Merged

feat: In-title section search filter for expandable TOC#94
williamzujkowski merged 1 commit intomainfrom
feat/92-title-search

Conversation

@williamzujkowski
Copy link
Copy Markdown
Collaborator

Summary

Phase 2 of #92 (IA epic) — adds keyword search to the expandable title TOC.

TitleFilter.svelte

  • Debounced text input (150ms) filters sections by title text
  • Auto-expands chapters with matches, hides empty chapters
  • Shows match count: "N of M sections match"
  • Clear button to reset
  • Only rendered for titles with 20+ sections

UX Flow

User types "assault" on Title 18 page → chapters without matching sections collapse → only Chapter 7 (Assault) and other relevant chapters expand → matching sections highlighted.

Issues

Test plan

  • svelte-check — 0 errors
  • pnpm test — all pass
  • Visual: filter on Title 18, verify chapter auto-expand
  • Visual: verify small titles (Title 1) don't show filter

🤖 Generated with Claude Code

New TitleFilter.svelte component:
- Debounced text filter (150ms) searches section titles
- Auto-expands chapters with matches, hides empty chapters
- Shows "N of M sections match" count
- Clear button to reset filter
- Only renders for titles with 20+ sections (skips tiny titles)
- Accessible: labeled input, aria-label on clear button

Integrated into /browse/title-{n}/ above the expand/collapse buttons.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@williamzujkowski williamzujkowski merged commit 85da5fa into main Mar 30, 2026
1 check failed
@williamzujkowski williamzujkowski deleted the feat/92-title-search branch March 30, 2026 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant