Skip to content

Long running branch: Group documents#2720

Open
scytacki wants to merge 59 commits intomasterfrom
group-documents
Open

Long running branch: Group documents#2720
scytacki wants to merge 59 commits intomasterfrom
group-documents

Conversation

@scytacki
Copy link
Member

@scytacki scytacki commented Jan 19, 2026

This work is ready now, it has many changes which have been reviewed in individual PRs.

scytacki and others added 17 commits January 6, 2026 11:21
- group documents just use the firestore metadata instead of having firebase metadata too. This is a pattern that all documents should change to eventually.
- group document content is stored in a different place firebase because they don't have a user. We could use the fake uid that is created for them so they could be stored in the same place in firebase that the other documents are stored, but this seems like it would lead to more problems.
This also enables reloading the page when a group document is open.
replace "group" with GroupDocument
Also:
- save the firebase metadata for the document so it is consistent with other CLUE documents. This removes some complexity around the createdAt timestamp.
- remove some console logs.
- revert the useSyncMst*ToFirebase to requiring a path as a string which makes more sense. However keep them checking for a non-empty path to prevent weird behavior
- have createDocument return the firestore metadata that it creates, so it can be used by other code
- add an official VisibilityType to unify "public" | "private" typing.
- add a type guard for DocumentType, this makes it safer when loading in documents from Firestore and other places.
- unify document title component used in sort-work-document-area and document-view
- note that use-document-caption has overlapping features with the document-title
- update db.ts so the document.self is not required to get the documentKey, some documents do not have this set and it isn't really needed
- add GroupDocument as a sortable type
- update getDocumentDisplayTitle to handle group documents.
- move some createDocMapBy* into the DocumentGroup to simplify the code
- update the byGroup and byName groupings so they handle group documents
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@codecov
Copy link

codecov bot commented Jan 19, 2026

Codecov Report

❌ Patch coverage is 60.68548% with 195 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.67%. Comparing base (ea92ae1) to head (2a81880).

Files with missing lines Patch % Lines
...ls/history/firestore-history-manager-concurrent.ts 7.27% 102 Missing ⚠️
src/lib/db.ts 53.08% 38 Missing ⚠️
src/models/history/firestore-history-manager.ts 86.29% 17 Missing ⚠️
src/components/document/document.tsx 61.11% 7 Missing ⚠️
src/components/document/document-workspace.tsx 33.33% 6 Missing ⚠️
src/components/document/history-view-panel.tsx 70.00% 6 Missing ⚠️
src/models/document/document-metadata-model.ts 14.28% 6 Missing ⚠️
src/models/stores/documents.ts 58.33% 5 Missing ⚠️
src/components/document/document-title.tsx 90.47% 2 Missing ⚠️
src/models/history/tree-manager.ts 75.00% 2 Missing ⚠️
... and 3 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2720      +/-   ##
==========================================
- Coverage   86.20%   85.67%   -0.53%     
==========================================
  Files         849      851       +2     
  Lines       46449    46725     +276     
  Branches    12072    12133      +61     
==========================================
- Hits        40040    40033       -7     
- Misses       6002     6679     +677     
+ Partials      407       13     -394     
Flag Coverage Δ
cypress ?
cypress-regression 75.42% <57.33%> (+0.47%) ⬆️
cypress-smoke 43.01% <35.33%> (-0.32%) ⬇️
jest 50.44% <34.07%> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cypress
Copy link

cypress bot commented Jan 19, 2026

collaborative-learning    Run #18004

Run Properties:  status check failed Failed #18004  •  git commit 2a81880499: Merge pull request #2757 from concord-consortium:CLUE-341-group-docs-merge
Project collaborative-learning
Branch Review group-documents
Run status status check failed Failed #18004
Run duration 09m 47s
Commit git commit 2a81880499: Merge pull request #2757 from concord-consortium:CLUE-341-group-docs-merge
Committer Scott Cytacki
View all properties for this run ↗︎

Test results
Tests that failed  Failures 1
Tests that were flaky  Flaky 3
Tests that did not run due to a developer annotating a test with .skip  Pending 5
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 175
View all changes introduced in this branch ↗︎

Tests for review

Failed  cypress/e2e/functional/tile_tests/tile_navigator_spec.js • 1 failed test • Regression tests

View Output

Test Artifacts
Tile Navigator > can be hidden and shown Test Replay Screenshots
Flakiness  xy_plot_tool_spec.js • 1 flaky test • Regression tests

View Output

Test Artifacts
XYPlot Tool Tile > XYPlot Tool > Test duplicating graph with an xy-plot (a.k.a. graph) Test Replay Screenshots
Flakiness  table_tool_spec.js • 1 flaky test • Regression tests

View Output

Test Artifacts
Table Tool Tile > should handle table row reordering Test Replay Screenshots
Flakiness  diagram_tool_spec.js • 1 flaky test • Regression tests

View Output

Test Artifacts
Diagram Tool Tile > Shared Variable Tiles (Diagram, Drawing) Test Replay Screenshots

scytacki and others added 8 commits January 19, 2026 08:29
Use a Firestore transaction and the metadata to safely track the
last history entry when multiple users are adding history entries
at the same time.
This also add a log statement to make it a little easier to track down
where in the test it is failing.
scytacki and others added 7 commits February 6, 2026 14:49
most complex change is better error handling in uploadQueuedHistoryEntries. The approach doesn't fully fix the problem, but at least it prevents a messed up uploadInProgress state.
resolved conflicts in:
- sort-document-utils.ts
- document-group.ts
- app-config-model.test.ts
- history-view-panel.tsx
- Canvas.js
- single_student_canvas_test.js
Resolved conflicts in:
- document-file-menu.tsx (combined useMemo from master with group doc option)
- document-file-menu.test.tsx (combined both test suites - basic menu ops and group doc visibility)
- document-utils.ts (kept GroupDocument import, removed duplicate imports)
- document-group.ts (kept inline byGroup with GroupDocument handling, added upperWords)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants