CLUE-341 Refactor FirestoreHistoryManager and TreeManager#2750
CLUE-341 Refactor FirestoreHistoryManager and TreeManager#2750scytacki merged 4 commits intogroup-documentsfrom
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## group-documents #2750 +/- ##
===================================================
+ Coverage 85.76% 85.78% +0.01%
===================================================
Files 819 820 +1
Lines 44002 44039 +37
Branches 11249 11255 +6
===================================================
+ Hits 37739 37778 +39
+ Misses 6247 6245 -2
Partials 16 16
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
collaborative-learning
|
||||||||||||||||||||||||||||
| Project |
collaborative-learning
|
| Branch Review |
CLUE-341-history-manager-refactor
|
| Run status |
|
| Run duration | 03m 00s |
| Commit |
|
| Committer | Scott Cytacki |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
4
|
| View all changes introduced in this branch ↗︎ | |
There was a problem hiding this comment.
Pull request overview
This PR refactors the history management system by consolidating functionality into FirestoreHistoryManager and simplifying the interaction between TreeManager and history managers. The refactoring prepares the codebase for implementing live group document updates.
Changes:
- Moved history-related methods and state from
TreeManagertoFirestoreHistoryManager - Replaced the listener-based system with a single
IHistoryManagerinterface - Split
FirestoreHistoryManagerinto base and concurrent subclasses to avoid code duplication
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/models/stores/documents.ts | Updated to use new IFirestoreHistoryManagerArgs interface and set history manager on tree manager |
| src/models/history/tree-manager.ts | Removed history loading logic and replaced listener system with single history manager reference |
| src/models/history/tree-manager-history.test.ts | Removed tests for mirrorHistoryFromFirestore (moved to history manager tests) |
| src/models/history/history-firestore.ts | Added IFirestoreHistoryEntryDoc interface to return structured history documents |
| src/models/history/firestore-history-manager.ts | Added history status tracking, remote history syncing, and consolidated history management logic |
| src/models/history/firestore-history-manager.test.ts | New test file covering history loading and status updates for the history manager |
| src/models/history/firestore-history-manager-concurrent.ts | New file containing concurrent version for multi-user editing |
| src/components/playback/playback.tsx | Updated to receive history manager as prop and use its status methods |
| src/components/document/history-view-panel.tsx | Updated to handle new IFirestoreHistoryEntryDoc structure |
| src/components/document/canvas.tsx | Creates history manager instance for playback documents |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tealefristoe
left a comment
There was a problem hiding this comment.
I left a few comments, but looks good 👍
CLUE-341
A refactoring before implementing live group document updates.