Skip to content

Stabilize editor sync and workspace navigation - #30

Merged
Chefski merged 2 commits into
devfrom
agent/editor-sync-navigation
Jul 31, 2026
Merged

Stabilize editor sync and workspace navigation#30
Chefski merged 2 commits into
devfrom
agent/editor-sync-navigation

Conversation

@Chefski

@Chefski Chefski commented Jul 31, 2026

Copy link
Copy Markdown
Owner

What changed

  • stabilize CRDT projection merging and document-session ordering
  • make native editor focus and toolbar visibility follow the actual text input first responder
  • preserve keyboard focus across Return, insertion, merge, and block deletion
  • improve page-tree selection and space-management authorization/navigation
  • add focused regression coverage and regenerate the bundled CRDT runtime

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

  • strict SwiftLint
  • Swift parser validation for 35 changed Swift files
  • CRDT runtime: 9 Node tests
  • CRDT runtime bundle regenerated successfully
  • git diff --check

No local Xcode build or test run was performed, per repository instructions.

@Chefski
Chefski merged commit 6a313dc into dev Jul 31, 2026
6 of 7 checks passed
@Chefski
Chefski deleted the agent/editor-sync-navigation branch July 31, 2026 19:31
@greptile-apps

greptile-apps Bot commented Jul 31, 2026

Copy link
Copy Markdown

Confidence Score: 5/5

The PR appears safe to merge, with no concrete changed-code defect identified.

The synchronization barriers, native focus lifecycle, CRDT schema updates, navigation transitions, and management authorization paths are internally consistent with their updated callers and regression coverage.

Important Files Changed

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
Loading

Reviews (1): Last reviewed commit: "fix: stabilize editor sync and workspace..." | Re-trigger Greptile

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