open-notebook/open_notebook/database/migrations
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
..
1.surrealql refactor: reorganize folder structure for better maintainability 2026-01-03 14:04:27 -03:00
1_down.surrealql refactor: reorganize folder structure for better maintainability 2026-01-03 14:04:27 -03:00
2.surrealql refactor: reorganize folder structure for better maintainability 2026-01-03 14:04:27 -03:00
2_down.surrealql refactor: reorganize folder structure for better maintainability 2026-01-03 14:04:27 -03:00
3.surrealql refactor: reorganize folder structure for better maintainability 2026-01-03 14:04:27 -03:00
3_down.surrealql refactor: reorganize folder structure for better maintainability 2026-01-03 14:04:27 -03:00
4.surrealql refactor: reorganize folder structure for better maintainability 2026-01-03 14:04:27 -03:00
4_down.surrealql refactor: reorganize folder structure for better maintainability 2026-01-03 14:04:27 -03:00
5.surrealql refactor: reorganize folder structure for better maintainability 2026-01-03 14:04:27 -03:00
5_down.surrealql refactor: reorganize folder structure for better maintainability 2026-01-03 14:04:27 -03:00
6.surrealql refactor: reorganize folder structure for better maintainability 2026-01-03 14:04:27 -03:00
6_down.surrealql refactor: reorganize folder structure for better maintainability 2026-01-03 14:04:27 -03:00
7.surrealql refactor: reorganize folder structure for better maintainability 2026-01-03 14:04:27 -03:00
7_down.surrealql refactor: reorganize folder structure for better maintainability 2026-01-03 14:04:27 -03:00
8.surrealql refactor: reorganize folder structure for better maintainability 2026-01-03 14:04:27 -03:00
8_down.surrealql refactor: reorganize folder structure for better maintainability 2026-01-03 14:04:27 -03:00
9.surrealql refactor: reorganize folder structure for better maintainability 2026-01-03 14:04:27 -03:00
9_down.surrealql refactor: reorganize folder structure for better maintainability 2026-01-03 14:04:27 -03:00
10.surrealql feat: content-type aware chunking and unified embedding (#444) 2026-01-21 23:49:08 -03:00
10_down.surrealql perf: improve source listing speed by 20-30x (#436) 2026-01-15 22:29:20 -03:00
11.surrealql feat: credential-based API key management (#477) (#540) 2026-02-10 08:30:22 -03:00
11_down.surrealql feat: credential-based API key management (#477) (#540) 2026-02-10 08:30:22 -03:00
12.surrealql feat: credential-based API key management (#477) (#540) 2026-02-10 08:30:22 -03:00
12_down.surrealql feat: credential-based API key management (#477) (#540) 2026-02-10 08:30:22 -03:00
13.surrealql fix: turn the embedding field into optional (#557) 2026-02-10 11:24:17 -03:00
13_down.surrealql fix: turn the embedding field into optional (#557) 2026-02-10 11:24:17 -03:00
14.surrealql feat(podcasts): model registry integration, credential passthrough & new features (#632) 2026-02-27 11:06:47 -03:00
14_down.surrealql feat(podcasts): model registry integration, credential passthrough & new features (#632) 2026-02-27 11:06:47 -03:00
15.surrealql fix(credentials): persist Ollama num_ctx via a flexible config object (#903) 2026-06-16 09:24:35 -03:00
15_down.surrealql fix(credentials): persist Ollama num_ctx via a flexible config object (#903) 2026-06-16 09:24:35 -03:00
16.surrealql fix: pass max_tokens through to podcast_creator for outline/transcript generation (#982) 2026-07-03 12:23:19 -03:00
16_down.surrealql fix: pass max_tokens through to podcast_creator for outline/transcript generation (#982) 2026-07-03 12:23:19 -03:00
17.surrealql feat: per-transformation custom model selection (#978) 2026-07-03 12:30:50 -03:00
17_down.surrealql feat: per-transformation custom model selection (#978) 2026-07-03 12:30:50 -03:00
18.surrealql feat: Recently Viewed section for notebooks and sources (#979) 2026-07-03 12:39:14 -03:00
18_down.surrealql feat: Recently Viewed section for notebooks and sources (#979) 2026-07-03 12:39:14 -03:00