open-notebook/open_notebook
Matt Van Horn cc8bfb11ad
feat: Recently Viewed section for notebooks and sources (#979)
* feat: Recently Viewed section for notebooks and sources

Fixes #850

* fix: export RecentlyViewedResponse type from api types

The RecentlyViewed component and notebooks API client import
RecentlyViewedResponse from @/lib/types/api but the interface was missing,
failing the type-check build. Add it to match the backend api/models.py model.

* fix: harden recently-viewed read path and index the recency query

Three robustness fixes on the recently-viewed feature:

- Make the last_viewed_at write-on-read stamping best-effort. _stamp_source_view
  and _stamp_notebook_view now swallow and log their own errors, so a failed
  stamp update can no longer turn a successful GET /sources/{id} or
  GET /notebooks/{id} into a 500.
- Stop leaking internal details from GET /recently-viewed: log the full
  exception server-side and return a generic error message to the client.
- Add indexes on last_viewed_at for the notebook and source tables in
  migration 16 so the ORDER BY last_viewed_at DESC LIMIT recently-viewed
  query does not degrade into a full table scan as data grows. The down
  migration removes the indexes before dropping the field.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* feat: register migration 18, add recently-viewed i18n keys and CHANGELOG entry

---------

Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Luis Novo <lfnovo@gmail.com>
2026-07-03 12:39:14 -03:00
..
ai fix: use a real speech clip for STT connection tests (#838) 2026-06-02 09:09:30 -03:00
database feat: Recently Viewed section for notebooks and sources (#979) 2026-07-03 12:39:14 -03:00
domain feat: Recently Viewed section for notebooks and sources (#979) 2026-07-03 12:39:14 -03:00
graphs chore(release): prepare v1.10.0 (#923) 2026-06-18 07:44:05 -03:00
podcasts fix: pass max_tokens through to podcast_creator for outline/transcript generation (#982) 2026-07-03 12:23:19 -03:00
utils fix: handle special-token sequences in token counting (#949) 2026-06-21 15:29:46 -03:00
__init__.py refactor: move environment variables loading to application entry point (#283) 2025-12-01 14:59:50 -03:00
CLAUDE.md chore: bump version to 1.8.1 2026-03-10 20:20:16 -05:00
config.py fix: handle tiktoken network errors in offline environments (issue #264) 2026-03-10 19:45:14 -05:00
exceptions.py refactor database module and migrations 2024-10-30 16:33:07 -03:00