Conversation
27a8e65 to
4554f5d
Compare
70ef805 to
69aa55e
Compare
c3e08d6 to
139bf8c
Compare
initializeWithContent returns false when content was enrolled by the editor (race between uploadDoc and acquireLock). The file still needs syncing and publishing to the syncStore for cross-vault propagation. Also clears pendingUpload in deleteFile.
classifyUpdate deduplicates via tracked state vectors, making the user-based filter redundant. The server can also mislabel the user on the event, making user-based filtering unreliable.
696e3e4 to
173702c
Compare
initializeFromRemote now only enrolls CRDT bytes and sets the state vector. LCA is the caller's responsibility via the new setLCA method. downloadDoc calls setLCA after flushing to disk. GUID remap does not set LCA (disk may differ from remote).
baseStart/baseEnd from diff3 are token indices, not line numbers. The line-map lookup produced wrong positions. String search for oursContent in localContent is reliable for unique hunk text.
Mark .system3-announcement-banner and .system3-announcement as :global() since they target elements outside the Svelte component scope.
Replace @media prefers-color-scheme blocks with color-mix() using Obsidian theme variables. Fixes diff colors when OS and Obsidian theme modes differ.
Canvas created an IndexeddbPersistence but never called destroy() on it, leaking the IDB connection. Match the SharedFolder teardown pattern: destroy persistence and capture the async flush with awaitOnReload.
Forward-slash separators in transformIgnorePatterns and transform keys don't match Windows backslash paths. Use [\\/] to match both.
PromiseTracker maintains both a map of pending promises (per-instance) and a module-level ring buffer of the last 100 settled promises. The ring buffer survives plugin reload so completed promises from a prior instance stay inspectable after disable+GC. Tracked entries carry an optional owner tag. The plugin's tracker uses plugin:<instanceId> as its default owner so retained Live shells can be correlated with the lifecycle promises that captured them. Wired up lifecycle hooks: - the plugin onload() itself is tracked as plugin:onload:<instanceId> - awaitOnReload() accepts an optional label and the hsmStore teardown uses it, surfacing stuck unload work with the instance id In non-debug builds track() is a passthrough - no map entries, no .then() chain, no overhead. Exposed via __relayDebug.getPendingPromises() and getRecentPromises(). Call sites for trackPromise() will be added in a follow-up commit.
The sync flag was only set to true and never cleared. On reconnection, stale `true` was observed and dependent code treated a freshly-reopened connection as already-synced, leading to races where data was read before the new sync completed. Clear on explicit disconnect() and on any provider state transition away from "connected".
…d matches setMeta unconditionally cleared pendingUpload[vpath] if the path had any pending entry — even when the incoming meta described a different document at that path (GUID remap case). This could drop the pending-upload tracking for the local doc whose upload had not yet completed. Clear only when pendingUpload's stored guid matches the incoming meta.id.
…t promises Two related issues in the sync and download queues: - Queued items whose doc was destroyed sat in the queue indefinitely. Evict them at the top of processSyncQueue / processDownloadQueue, reject their completion callbacks with "Document destroyed", and drop the inProgress entries. - Duplicate enqueue calls created new pending promises every time, with no way to await work already in flight. Track the original Promise per guid in new syncPromises / downloadPromises maps so repeated enqueue calls share it. Clear the map on resolve/reject and on destroy.
ba684d2 to
c1362e9
Compare
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.
No description provided.