Skip to content

Reuse bounded journal windows across title sync - #157

Merged
tiensonqin merged 1 commit into
mainfrom
fix/local-first-sync
Nov 9, 2026
Merged

tiensonqin merged 1 commit into
mainfrom
fix/local-first-sync

Conversation

@tiensonqin

@tiensonqin tiensonqin commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Keep title sync from repeatedly scanning every node in a journal just to refresh the visible 32-row window. Preserve only the selected UUIDs across title/updated-at commits and local title edits, then hydrate their contents from the latest projection. Actual journal attributes drive eligibility; structural changes, non-title pending operations, title presence changes, and unbounded reads retain the existing full-read path.

This is the simpler follow-up to #156: no DataScript changes, extra runtime, thread, or sync-protocol changes. Apply/checkpoint/ACK/rebase/error ordering is unchanged. It shortens common sync jobs, not preemption of atomic structural work.

Validation: 1,297 core tests; native WebSocket command/recovery/cancellation checks; real local three-client sync stress (602 mobile operations, 82 CLI mutations, 20 assets, offline/crash/lost-ACK/server-restart recovery, matching final datoms, zero pending). One regression case compares cached and fresh journal reads across content and structural commits.

macOS real-core probe with 10,000 journal nodes: window refresh ~78ms → ~0.6ms, including a newer unsynced local title. This is not physical iPad profiling.

Link to Devin session: https://app.devin.ai/sessions/951fc198b3c140ad8b8cc8af5b531471
Open in Devin Desktop: https://app.devin.ai/desktop/session/951fc198b3c140ad8b8cc8af5b531471?variant=devin
Requested by: @tiensonqin


🟢 Devin Review found nothing to fix · View findings

Devin Review

@devin-ai-integration

Copy link
Copy Markdown

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@tiensonqin
tiensonqin merged commit a1e4c5b into main Nov 9, 2026
3 checks passed
@tiensonqin
tiensonqin deleted the fix/local-first-sync branch November 9, 2026 14:11
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