Stabilize editor sync and workspace navigation - #30
Merged
Conversation
|
| Filename | Overview |
|---|---|
| docmostly/Features/Editor/DocumentSession.swift | Adds attached-editor barriers and projection callbacks so remote updates are applied after pending local edits stabilize. |
| docmostly/Features/Editor/NativeEditorBodyView.swift | Coordinates native text-input focus requests with active-block state and retries focus after structural mutations. |
| docmostly/Features/Editor/NativeRichEditorViewModel+Collaboration.swift | Attaches editor-local synchronization barriers and direct remote projection handling to shared document sessions. |
| Tools/CRDTRuntime/src/docmostly-crdt-runtime.js | Extends paragraph and heading projections to preserve stable block identifiers and indentation. |
| docmostly/App/AppState+Navigation.swift | Simplifies sidebar selection state while retaining the independently selected workspace. |
| docmostly/Features/Settings/SpaceManagementAuthorization.swift | Defines consistent workspace- and space-role checks for management controls. |
| docmostly/Features/PageTree/PageTreeNavigationState.swift | Reconciles page-tree selection with workspace and page navigation state. |
Sequence Diagram
sequenceDiagram
participant Remote as Remote sync
participant Session as DocumentSession
participant Editor as Attached editor
participant Store as Local persistence
participant Kernel as CRDT kernel
Remote->>Session: Receive remote update
Session->>Editor: Await stable local-change barrier
Editor-->>Session: Local changes integrated
Session->>Kernel: Validate update
Session->>Store: Append remote update
Session->>Editor: Recheck local-change barrier
Session->>Kernel: Apply update and capture snapshot
Session->>Editor: Publish remote projection
Session->>Store: Compact when required
Reviews (1): Last reviewed commit: "fix: stabilize editor sync and workspace..." | Re-trigger Greptile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Why
The editor had split focus ownership between SwiftUI, the native text view, and the view model, while concurrent CRDT projection and workspace navigation paths could lose ordering or selection state.
Validation
No local Xcode build or test run was performed, per repository instructions.