mirror of
https://github.com/lobehub/lobehub
synced 2026-04-21 09:37:28 +00:00
* Add document history versioning and TRPC APIs * 🩹 Improve document history patching for rekeyed editor nodes * Refine PageEditor history timeline UI * Enhance modal API documentation and update modal implementation guidelines. Introduce new modal components and migration notes for transitioning from legacy `@lobehub/ui` to `@lobehub/ui/base-ui`. Update version history localization for improved clarity in UI. Add new CompareModal components for document history comparison. Signed-off-by: Innei <tukon479@gmail.com> * 🔥 chore(docs): remove document history tech spec Made-with: Cursor * Enhance document history management by introducing a 30-day limit for history queries and updating related APIs. Refactor history service methods to support new options for filtering history based on the saved date. Improve UI elements in the PageEditor history timeline for better user experience. Signed-off-by: Innei <tukon479@gmail.com> * Add document history management features and improve API integration - Introduced constants for document history retention and limits. - Updated document history service to compact history based on new retention limits. - Refactored PageEditor to utilize constants for document history limits. - Added new TRPC router for document history management. - Enhanced JSON diffing capabilities for better patching of document history. Signed-off-by: Innei <tukon479@gmail.com> * ♻️ refactor: sync document history schema and simplify history service - Sync simplified document_history table from feat/document-history-db - Remove version/storage_kind/payload/base_version, use editor_data + saved_at - Rewrite pagination with composite (savedAt, id) cursor - Update TRPC APIs from version-based to historyId-based - Replace DocumentVersionControl with AutoSaveHint - Add integration tests for history service * ✨ feat: add per-source document history retention limits - autosave / manual: retain 20 entries each - restore / system: retain 5 entries each - trimHistoryBySource now deletes in batches of 100 to avoid unbounded overflow - removed obsolete constants: PATCH_THRESHOLD, RETENTION_LIMIT, SNAPSHOT_INTERVAL - added integration tests for large overflow trimming * ✨ add llm_call history source and queue-based snapshot for page agent * 💄 restyle document history list to Notion timeline * 💄 fix history timeline alignment, unify fonts and highlight current * ✨ feat(PageEditor): refine document history compare UI and date formatting Made-with: Cursor * ✨ feat(editor): add validation for editor data and update related interfaces - Introduced `isValidEditorData` function to validate editor data structure. - Updated `GetHistoryItemOutput` and `DocumentHistoryItemResult` interfaces to allow `editorData` to be `null`. - Modified `getDocumentEditorData` to return `null` for invalid editor data. - Added integration tests to ensure proper handling of invalid editor data in document history service. - Enhanced editor actions to prevent saving of invalid editor data. Signed-off-by: Innei <tukon479@gmail.com> * 💾 chore(database): split document history indexes * Fix manual saves and optimize history item rendering * 🌐 locale: add missing llm_call translation key in en-US file.json Add pageEditor.history.saveSource.llm_call = \"AI Edit\" to match the default locale and prevent raw i18n key from showing in the history panel. --------- Signed-off-by: Innei <tukon479@gmail.com> |
||
|---|---|---|
| .. | ||
| src | ||
| package.json | ||
| vitest.config.mts | ||