Restored chapter.html to the version from commit fb4e970 which had the perfect working keyboard navigation. The recent changes to chapter view were not needed.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
When you scroll the page and then press ↑ or ↓ for the first time, the selection now intelligently starts from what's currently visible in the viewport instead of always starting at the top.
**Behavior:**
- If chapter section is visible → starts there
- If scrolled past chapters → starts at first visible paragraph
- Selection only moves when you press a key (not automatically on scroll)
This makes navigation feel natural when combined with mouse/trackpad scrolling.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Selection now automatically updates when scrolling to match what's visible in the viewport:
- When in chapter drilldown mode, scrolling updates to the first visible chapter
- When viewing paragraphs, scrolling updates to the first visible paragraph
- When chapter section is selected and scrolled off-screen, switches to paragraphs
- Debounced for smooth performance (150ms)
This makes keyboard navigation feel natural when combined with mouse/trackpad scrolling.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Changed selector from selecting all paragraphs to only selecting direct children paragraphs, which prevents selecting both the blockquote and the paragraph inside it.
Before: `section:not(.chapters-section) p` selected p inside blockquotes
After: `section:not(.chapters-section) > p` only selects direct p children
This fixes the issue where Key Verses blockquotes had two selection items.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
**Book View Changes:**
- Chapter section is now a single item with green box outline
- Press ↓ to select chapter section
- Press Enter to drill down into individual chapters
- Press Esc to exit drilldown mode
- All paragraphs now use green box outline styling (consistent UX)
**Chapter View Changes:**
- Removed 'c' keyboard shortcut (reserved keyword)
- Updated help text
**Navigation Flow:**
1. Start: Press ↓ → selects chapter section (green box)
2. Press Enter → drills into first chapter number
3. Navigate ↑/↓ through chapter numbers
4. Press Enter on a chapter → navigate to that chapter
5. Press Esc → exit back to chapter section
6. Press ↓ from chapter section → move to paragraphs below
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Book view now supports navigating both chapter links and introduction paragraphs. Chapter view supports navigating action buttons, verses, and chapter selector controls.
**Book View:**
- Navigate through chapter numbers with ↑/↓
- Continue down to navigate through introduction paragraphs
- Press Enter on chapters to read them
- Visual feedback with green highlights for both zones
**Chapter View:**
- Three-zone navigation: actions, verses, chapter selector
- Press 'c' to jump to chapter selector
- Press Enter in chapter selector to focus dropdown
- Escape to clear selections
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Removed service worker, PWA manifest, offline page, and all related UI components to simplify the application and reduce bloat.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Updated all route handler functions in the API to be asynchronous by adding 'async' keyword.
- This change enhances performance and allows for better handling of concurrent requests.
- Adjusted related documentation comments to reflect the changes in function signatures.
- Press 'c' to switch to cached pages navigation mode
- j/k navigate through cached URLs
- Enter opens the selected cached page
- Esc or h returns to cards mode
- Auto-expands categories when entering cached mode
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Verses are selectable with j/k navigation
- Space speaks selected verse using Web Speech API
- Enter drills down to verse commentary page
- s stops speech
- v switches to verse mode from cards
- Clicking verses also selects them
- Visual feedback for selected and speaking verses
- Removed cached pages navigation (simplified)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- j/↓ move down through quick access cards
- k/↑ move up through cards
- l/→ move right / next chapter in reader
- h/← move left / previous chapter / go back
- Enter opens selected card
- Esc clears selection
- g goes to Genesis 1
- ? shows help
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
The base.html template doesn't have an extra_js block defined,
so the JavaScript was being silently dropped. Moved the script
tag inside the content block where it will be rendered.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add no-cache headers to sw.js endpoint to prevent aggressive caching
- Move system status grid to top of offline page for debugging
- Show connection status, SW version, cache storage, bible data, pages cached
- Add SW version check that reads from actual sw.js file
- Keep download progress indicator in download section
- Move cached pages list to collapsible details
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Centered hero section with status badge
- Prominent status card with icon
- Clean download section with gradient background
- Quick access grid with larger icon cards
- Improved Bible reader section with styled controls
- Technical details collapsed by default
- Simplified cached URL list (limit 500 per category)
- Cleaner, more modern styling throughout
- Better dark mode support
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Keep nginx only for production (Fly.io). Local dev uses uvicorn
directly for simpler hot-reloading.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Fly.io's Consul health checks hit /health. Now nginx responds
directly with 200 OK without proxying to uvicorn, so health
checks won't fail under heavy load.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Web service has healthcheck on /api/health
- nginx depends on web being healthy before starting
- Added curl to Dockerfile for healthcheck
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- nginx.conf: docker-compose version (uses 'web:8001')
- nginx-prod.conf: production version (uses '127.0.0.1:8001')
- Separate nginx service in docker-compose
- uvicorn runs on port 8001, nginx exposes 8000
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
The offline page now uses Jinja2 template inheritance to get the
site sidebar automatically. All functionality preserved.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
The 'Caching for offline' indicator is now a link to /offline page.
Also added toLocaleString() for page count formatting.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Button now shows 'Refresh Cache' and stays enabled after download
completes, allowing users to re-download/refresh the cache.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Collapsible category sections for cached pages
- Categories: Main Pages, Bible Chapters, Verse Commentary,
Interlinear, Stories, Topics, Study Guides, etc.
- Clean URL display: %20 replaced with spaces, paths cleaned up
- Keyboard navigation: j/k to navigate, Enter/Space to expand,
h/l for left/right, Esc to back out, u to enter URL nav mode
- Increased download concurrency from 50 to 100 workers
- Progress notifications every 250 completions (was 100)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Replace sequential batch downloads with a concurrent pool pattern
using 50 simultaneous workers. This dramatically speeds up the
caching of ~48,000 pages for offline use.
- Each worker pulls URLs from a shared queue
- Progress notifications sent every 100 pages
- Workers run in parallel using Promise.all()
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Site has ~48,000 total pages (17k main + 31k verses)
- Only show "Ready for offline use" when >45,000 pages cached
- Show percentage cached for partial downloads
- 12,349 cached is only 25%, not complete
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Shows clear status with icon: ready (✅), warning (⚠️), or error (🚫)
- Displays helpful troubleshooting tips when service worker fails
- Instructions for disabling content blockers, checking browser settings
- Shows page count when cached
- Color-coded cards: green for OK, yellow for warning, red for error
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- j/k or ↑/↓ to navigate quick links and verses
- h/l or ←/→ to move between quick links or change chapters
- Enter to open selected quick link
- g to jump to Genesis 1
- Escape to clear selection
- ? to show keyboard help
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Design improvements:
- Added Quick Access section with links to Books, Stories, Topics, etc.
- Moved technical debug info to collapsible "Technical Details" section
- Added styled quick link grid with hover effects
- Cleaner layout focusing on user-friendly features
Bug fix:
- Fixed import error: use load_all_stories() instead of get_all_stories()
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Service worker now responds to GET_CACHE_STATUS message
- /offline page queries caching status when it loads
- If download is in progress, shows progress bar immediately without requiring click
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Added all 1,189 interlinear chapter URLs (/book/{book}/chapter/{chapter}/interlinear)
- Added all 186 individual story URLs (/stories/{slug})
- Now the sitemap includes everything for complete offline caching
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- PDF links/buttons are greyed out (40% opacity) when offline
- Adds strikethrough and "not-allowed" cursor
- Shows tooltip "PDF unavailable offline"
- Prevents click events
- Re-enables automatically when back online
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Major improvements to offline caching:
- Service worker now parses sitemaps dynamically instead of hardcoded URL lists
- Fetches /sitemap.xml and any child sitemaps (sitemap-main.xml, sitemap-verses.xml)
- Caches ALL pages found in sitemaps including 31,102 individual verse pages
- Much cleaner, smaller service worker (~300 lines vs ~1800 lines)
- Added status messages during sitemap parsing
- Better error handling with retry option
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Interlinear pages now redirect to offline reader with book/chapter params
- All uncached HTML pages now go to /offline instead of homepage
- Bumped cache version to v5
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Changes:
- Caching now only starts when user clicks "Download for Offline Use" on /offline page
- Added all 186 Bible stories (including kids mode) to cache list
- Added progress bar and status indicators on /offline page
- Bumped cache version to v4
- Total cacheable pages: ~1,500 (1189 chapters + 186 stories + 66 books + resources)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Updated service worker to pre-cache:
- All 1189 chapter pages (Genesis 1 through Revelation 22)
- All 66 book overview pages
- All resource/reference pages (topics, stories, study guides, etc.)
- Total: ~1300+ pages for complete offline access
Also bumped cache version to v3 and increased batch size for faster caching.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Service workers can only control URLs within their scope. A service worker
at /static/sw.js couldn't control the root scope (/) without special headers.
- Add /sw.js route that serves the service worker with Service-Worker-Allowed: /
- Update registration to use /sw.js instead of /static/sw.js
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Adds a link to the /offline debug page at the bottom of the sidebar,
allowing users to easily access offline status and cached pages list.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Shows service worker registration status
- Lists all cache storage names
- Checks if Bible data (31,102 verses) is cached
- Displays all cached pages grouped by category (clickable links)
- Shows online/offline connection badge
- Includes Bible reader for reading any chapter from cached JSON
Visit /offline to see what's available without internet.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Verified all URLs actually return 200 status
- Fixed topic URLs (need capital letters: /topics/Faith not /topics/faith)
- Fixed story URLs (use slugs like /stories/god-creates-the-world)
- Fixed resource URLs (e.g. /fruits-of-the-spirit not /fruits-of-spirit)
- Added all parables, reading plans, study guides
- Total: 388 pages now pre-cached in background
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Service worker now pre-caches ~160 pages in background after install
- Includes all resource pages, topics, study guides, stories, book pages
- Caches in batches of 5 with 1-second delays to avoid overwhelming server
- Progress indicator shows "Caching for offline: X%" in bottom-left
- Shows "Ready for offline! (X pages)" when complete, then fades out
- Bumped cache version to v2 to trigger re-cache
Combined with the Bible JSON (~4.7MB), the entire site is now
available offline after first visit.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Created /offline route with client-side Bible renderer
- Loads verses from cached JSON (verses-1769.json)
- Full book/chapter navigation with dropdowns
- Keyboard navigation (← → for chapters)
- Service worker redirects to offline reader when Bible pages fail
- Pre-caches offline reader page on install
- Auto-parses URL params (?book=Genesis&chapter=1)
When offline, users can read any chapter of the Bible using
the cached JSON data - no need to have visited the page before.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Created sw.js with caching strategies:
- Static assets (CSS, JS, fonts) - cache first
- Bible pages - network first, cache fallback
- API requests - network first with offline cache
- Pre-caches verses-1769.json (~4.7MB) on install
- Added service worker registration to base.html
- Added offline indicator (red badge in bottom-right)
- Linked manifest.json for PWA support
Users can now read the Bible offline after first visit.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>