#57 · Searchable moment selector for duration endpoints
- timeline-app
- pull request
Fixes #47. - **Fixed time** endpoints show only the time field; the "Follow a moment…" button is gone. - Switching to **Follows a moment** opens a new **Choose a moment** dialog right away; closing it without choosing switches back to fixed. - A followed endpoint shows the moment, **Open moment**, and **Choose another moment…** (which reopens the selector). - The selector browses moments in time order (25 per page, cursor paging, previous/next) or searches titles and notes as you type (debounced), so it never loads a whole timeline. - Search gains `only: "moment"` in all three backends: in-memory `searchIndex`, PostgreSQL (`kind=$5` filter) and the desktop SQLite store (drops the duration union). The HTTP API rejects other values. `runSearch`'s overlay of unsaved edits was extracted into `searchPage()` and is shared by both dialogs. Tests: `search-browser.mjs` covers cancel-to-fixed, browse paging (32 moments → 25 + 7), moments-only search, choosing, and reopening/closing. Unit, HTTP, PostgreSQL search and native tests check the `only` filter. Unit, browser and offline suites pass in Chromium and Firefox; native-store tests pass. This touches the duration dialog alongside #56 (Save/Cancel); the two change different parts of it.
Sources
Open #57 · Searchable moment selector for duration endpoints in the timeline