feat(docs): add incremental layout worker - #7433
Conversation
|
Stress follow-up for the 295-page rendered / ~594k-character DOCX sample:
Validation: @univerjs/engine-render 97 files passed, 889 tests passed, 59 skipped; targeted typecheck and ESLint passed. |
|
Latest stress and interaction follow-up: the 298-page / 594,044-character snapshot now reaches 50 ms for the first real key mutation-to-selection publication and 37–41 ms for the following eight keys (40 ms median). The remaining full-document ViewModel reset was replaced with a validated plain-text incremental update, and text-run lookup now uses range buckets instead of per-character Map entries. The active page retained focus after Worker completion. The Issue #1188 revision-85 snapshot also passed real keyboard paragraph input, floating menu, background color, and table-cell input with a stable viewport. All 19 Docs UI locales include the hard Worker-recovery message. Targeted regression validation: 7 files, 70 tests passed; Docs, Engine Render, Docs UI, and Docs layout Worker typechecks passed. |
|
Follow-up validation for 5dbca9a:
Validation:
Real-browser 294-page DOCX-derived snapshot checks used physical pointer/keyboard input: Enter plus text insertion, table-cell insertion, text-range creation by double-click, yellow background formatting, floating text menu, image selection/menu, and Chinese text insertion all work. Waiting for Worker handoff does not replace the active page or remove the entered content. Quick Insert remains host-composition-owned and is identical with Worker enabled and disabled. |
|
Latest editing regression fix: RichTextEditingMutation commonly carries exactly one post-edit text range without Validation added in commit a2bd655:
|
Playwright test resultsDetails
Skipped testschromium › smoking/docs-layout-worker-editing.spec.ts › keeps Enter active when the 294-page document only shows the Quick Insert button |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## dev #7433 +/- ##
==========================================
- Coverage 81.30% 81.28% -0.02%
==========================================
Files 2716 2731 +15
Lines 170611 175764 +5153
Branches 42511 43379 +868
==========================================
+ Hits 138709 142878 +4169
- Misses 31854 32836 +982
- Partials 48 50 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
1078787 to
920895e
Compare
|
Post-rebase CI note: the only remaining failed check is the pre-existing |
|
Post-rebase CI follow-up for
I am not updating the Sheet implementation or snapshot in this Docs PR. |
99ccd88 to
096df65
Compare
|
Follow-up validation for Modern continuous editing (commit d0e8486):
Validation:
|
c1153fa to
d21edde
Compare
|
Fixed an incremental list-layout crash exposed by the ClickUp MSA DOCX. Root cause: imported lists may start at nesting level 1 or deeper. The list ancestor cache was created as a sparse array, and copying it materialized skipped levels as Commit: Validation:
No fixture document, screenshots, or generated demo artifacts are included in the commit. |
|
Validated the incremental layout implementation against A real parity bug was found in resumable table pagination: the precomputation path opened a new table fragment at Commit e208de3 aligns the resumable rules and adds focused regression tests for positive remaining height and Validation:
|
d272f30 to
9d70664
Compare
Playwright test resultsDetails
Failed testschromium › smoking/docs-layout-worker-complex-elements.spec.ts › keeps complex text editing and floating drawing movement stable with Worker layout in flavor 2 Skipped testschromium › smoking/docs-layout-worker-editing.spec.ts › keeps the original Issue #1188 editing semantics unchanged with the Doc layout Worker |
f05559f to
f56b509
Compare
f56b509 to
9ffc1da
Compare
9ffc1da to
0d5eb19
Compare
Closes dream-num/univer-cli#1188
Description
Add incremental Docs layout for Traditional and Modern documents while keeping UNSPECIFIED editor documents on the historical Main-only path.
The Worker plugin and runtime live in
@univerjs/docs; no standalone worker package is introduced. The capability is implemented in SDK packages. Demo code only registers the plugin and Worker entry.Validation
Rebased onto
origin/dev@cdd5fd06beas one feature commit (0d5eb1965d).@univerjs/core,@univerjs/docs,@univerjs/docs-ui,@univerjs/engine-render,@univerjs/docs-thread-comment-ui,@univerjs/docs-quick-insert-ui, and@univerjs/rpc.@univerjs/core: 155 files passed, 3 skipped; 1039 tests passed, 10 skipped@univerjs/docs: 28 files, 167 tests@univerjs/docs-ui: 78 files, 757 tests@univerjs/engine-render: 98 files, 1020 tests@univerjs/docs-thread-comment-ui: 7 files, 21 tests@univerjs/docs-quick-insert-ui: 7 files, 15 tests@univerjs/rpc: 6 files, 15 tests@univerjs/docs-quick-insert-uipackage build passed.git diff --checkpassed.The existing Playwright collaboration matrix covers the 294-page stress document, the ClickUp agreement, issue #1188, Traditional and Modern modes, and the UNSPECIFIED Main-only regression.
SDK dependencies
No external SDK dependency version changes are introduced. The related Pro integration PR depends on the APIs in this PR and must merge after this PR.
Scope
No screenshots, sample documents, generated build output, temporary diagnostics, or submodule pointer updates are included. No architecture document is changed because the public behavior and lifecycle contracts are captured by the package APIs and regression suites in this PR.
Pull Request Checklist