2 months ago
ec136f1Closes #49. A clipboard row's ⌘K menu gains Pin Entry / Unpin Entry (⌘P). Pinned rows lead the list under their own "Pinned" section — for the empty query and for filtered searches alike — so the handful of entries you keep reaching for stop sinking under the day's noise. The pin is a `pinned` column on `items`, added to existing databases by an ALTER TABLE guarded like `source_app`'s. `items` itself stays in pure recency order and `search` lifts pinned rows to the head, memoized next to the search memo and invalidated with it, so an unpinned history pays nothing. Pins are exempt from retention pruning and from the in-memory window: `load` fetches every pinned row plus the newest 1000 unpinned ones, and the window trim never drops a pin. Clear History still deletes everything. Pinning lifts a row out of its date bucket, so the selection has to follow it: `AppCore` resolves the row's new index in the current results (paste and copy now do the same instead of assuming index 0, which pins would break) and bumps a follow token the list watches to scroll the highlight back into view. The list's follow-the-moved-row handler now keys off the store's newest row rather than the filtered results, so typing a query no longer reads as a row that moved. Paste & Keep Window Open gives up its pin glyph for `macwindow`.
Parent29c6213