Projects BibleWeb Interlinear Auto-save on verse navigation
Planned

Auto-save on verse navigation

Area: Interlinear Milestone: v2

Context

Problem: When the user navigates to the next/previous verse in the interlinear popup (see Verse-by-Verse Navigation), their current word selections should be saved automatically — not lost.

Solution: When navigating to a new verse with the interlinear popup open, automatically save any word selections via the word selections API with a 500ms debounce.

Not included: Manual save confirmation or undo. Saves happen silently.

Functional

Expected behavior:

  1. User has word selections on the current verse
  2. Presses arrow key to navigate to next verse
  3. Selections are auto-saved (POST /api/word-selections) before loading new verse
  4. Debounced at 500ms to avoid rapid-fire API calls during fast navigation

UX & Design

Invisible — no UI feedback. Saves happen silently in the background.

Technical

Implementation:

  • Before loading new verse data, call existing syncToServer() for current selections
  • Debounce at 500ms
  • On popup close, also trigger a final save

Files:

  • apps/web/src/lib/components/bible/InterlinearPopup.svelte (modify)

Status

Current: PLANNED Milestone: v2 Priority: Medium — prevents data loss during study

Dependencies:

  • Requires: verse-by-verse navigation (NEEDS_DESIGN), word selection persistence (DONE)