Skip to content

fix(compare): wait for the sheet scroll service before scroll sync - #58

Merged
OTime-Coder merged 1 commit into
mainfrom
fix/comparison-scroll-before-rendered
Sep 24, 2026
Merged

OTime-Coder merged 1 commit into
mainfrom
fix/comparison-scroll-before-rendered

Conversation

@OTime-Coder

Copy link
Copy Markdown
Member

Summary

  • Comparison scroll sync waits until the sheet render unit has SheetScrollManagerService before calling sheet.operation.set-scroll.
  • The applied scroll key is recorded only after that command runs, so an early peer scroll is retried instead of being dropped.
  • This is the univer-cli copy of the same guard already opened for the DSH plugin.

Test plan

  • pnpm --filter @univer/unit-comparison-viewer exec vitest run test/readonly-workbook-scroll.test.tsx
  • pnpm --filter @univer/unit-comparison-viewer exec tsc -p tsconfig.test.json --noEmit

Made with Cursor

A peer scroll can run before SheetScrollManagerService is registered.
That throw unmounts the comparison view.

Co-authored-by: Cursor <cursoragent@cursor.com>
@OTime-Coder
OTime-Coder merged commit 837a90c into main Sep 24, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant