Skip to content

fix(setInitialYjsState): do not push or save the initial state on open - #9103

Open
silverkszlo wants to merge 1 commit into
mainfrom
fix/saving-initial-state
Open

fix(setInitialYjsState): do not push or save the initial state on open#9103
silverkszlo wants to merge 1 commit into
mainfrom
fix/saving-initial-state

Conversation

@silverkszlo

Copy link
Copy Markdown
Collaborator

馃摑 Summary

Opening a document without a stored yjs state applied the generated initial state as a local update. It was then pushed to the server like a user edit, which marked the document dirty and triggered an autosave, even for a freshly created and untouched document.

Apply the initial state with the sync provider as origin so it counts as received from the server. The provider sends diffs against the known server state, so the first real user edit still carries the initial state along with it.

馃弫 Checklist

  • Code is properly formatted (npm run lint / npm run stylelint / composer run cs:check)
  • Sign-off message is added to all commits
  • Tests (unit, integration and/or end-to-end) passing and the changes are covered with tests
  • Documentation (README or documentation) has been updated or is not required

馃 AI (if applicable)

  • The content of this PR was partly or fully generated using AI tools
  • The AI-generated content was reviewed, comprehended and tested by a human

Opening a document without a stored yjs state applied the generated
initial state as a local update. It was then pushed to the server like
a user edit, which marked the document dirty and triggered an autosave,
even for a freshly created and untouched document.

Apply the initial state with the sync provider as origin so it counts
as received from the server. The provider sends diffs against the known
server state, so the first real user edit still carries the initial
state along with it.

Signed-off-by: silver <s.szmajduch@posteo.de>
Assisted-by: ClaudeCode:claude-fable-5
@github-project-automation github-project-automation Bot moved this to 馃Л Planning evaluation (don't pick) in 馃摑 Productivity team Aug 25, 2026
@silverkszlo silverkszlo moved this from 馃Л Planning evaluation (don't pick) to 馃憖 In review in 馃摑 Productivity team Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 馃憖 In review

Development

Successfully merging this pull request may close these issues.

1 participant