These 45 commits are when the Protocol Buffers files have changed:
| Commit: | cad0ae8 | |
|---|---|---|
| Author: | longhoang-lewy | |
| Committer: | GitHub | |
Apply updates from yorkie-js-sdk 0.7.9 (#262) * feat(devtools): add cross-platform CRDT debugger Adds an opt-in devtools layer for diagnosing where iOS / Android / JS diverge during sync, by capturing the exact data a client exchanges with the server in the yorkie-js-sdk devtools format. - Sources/Devtools: an always-on ring-buffer recorder that encodes every replayable DocEvent to byte-compatible Array<DocEventsForReplay> JSON, plus iOS-only connection / sync-status diagnostics. Document gains an enableDevtools option, dumpDevtools/exportDevtools, and a publish() tap. - Sources/DevtoolsUI: an in-app SwiftUI inspector (document tree + change timeline) reading the recorder live. - Sources/DevtoolsServer: a debug-only loopback/LAN HTTP server that serves a self-contained browser viewer at / and the live buffer at /events, so a browser shows changes in real time and can diff two recordings to locate the first divergent operation. - Tools: standalone sample recordings and usage docs. - Examples/RichTextEditor: wires both inspectors in and moves undo/redo ahead of the B/I/U/S formatting buttons. * Fix Polling channel subscriber notification Port of yorkie-js-sdk#1247. On a channel refresh (polling), publish a presence-changed event only when the session count actually changed, mirroring the JS RefreshChannel path. The 'expose polling via React' part of the upstream PR has no iOS counterpart. * Add PeekChannel client Port of yorkie-js-sdk#1256. Adds the PeekChannel RPC (proto + regenerated Connect/protobuf), a YorkieService wrapper, and Client.peekChannel(_:) which reads a channel's session count without creating a server session, heartbeats, or event subscription. The usePeekChannel React hook from the upstream PR has no iOS counterpart. * chore: bump version and changelog to 0.7.9 * chore: bump CI yorkie server to v0.7.9 * test: port tests for PeekChannel and polling channel notification Port of channel_polling_test.ts at v0.7.9 covering yorkie-js-sdk#1256 (Add PeekChannel client) and yorkie-js-sdk#1247 (Fix Polling channel subscriber notification). Five tests in Tests/Integration/ChannelPollingTests.swift: - peekChannel returns session count without creating a session - peekChannel reflects increased count when a second client attaches - peekChannel throws errClientNotActivated when client is inactive - refreshChannel publishes presenceChanged when count increases (PR#1247) - refreshChannel does NOT publish presenceChanged when count is unchanged The two server-side peekChannel tests skip automatically with XCTSkip when the tunneled server predates v0.7.9 (unimplemented RPC). All five tests compile and run cleanly; three pass, two skip on the current tunnel. * Add live room member counts to Channel example via peekChannel * fix: satisfy CI-pinned SwiftFormat hoistTry and SwiftLint identifier_name in devtools tests * fix: move Client.peekChannel into an extension to satisfy type_body_length The added method pushed the Client class body to 1007 lines, over the 1000-line SwiftLint type_body_length limit. Extension bodies are not counted, so peekChannel moves into a public extension Client with no behavior change. * fix: extract devtools tap from Document.publish to satisfy cyclomatic_complexity The devtools recording tap added two branches to publish(_:), pushing its cyclomatic complexity to 26 (over the SwiftLint --strict warning threshold of 25). Move the tap into a recordForDevtools(_:) helper; no behavior change. * test: harden channel polling tests (unique keys, deterministic waits) - Replace second-resolution timestamp in channelTestKey with an 8-char UUID prefix to prevent key collisions across concurrent or rapidly-repeated runs. - Harden the "no event when count is unchanged" test with an inverted XCTestExpectation (1 s window) so late callbacks delivered on RunLoop.main are caught before the assertion fires, eliminating the race in the original plain-counter check. - Convert comment blocks preceding the class and helper declarations to /// doc comments to satisfy the SwiftFormat docComments rule. - Document why the line-58 defer teardown is not fragile (fire-and-forget deactivate, non-fatal by design; key uniqueness was the only real concern). * fix: address CodeRabbit review feedback - DevtoolsRecorder: replace single onUpdate closure with multicast addObserver/removeObserver so the browser server and SwiftUI inspector can observe concurrently without clobbering each other; fire on clear(). - Client.peekChannel: wrap RPC in do/catch + handleConnectError, matching attachChannel/detachChannel so auth/state recovery runs on failure. - DevtoolsServer/Resources/viewer.html: escape all recording-derived values before innerHTML; use null-prototype maps for path-tree segments. - DevtoolsUI/JSONNode: stable path-based id so OutlineGroup keeps expansion state across live refreshes (was a fresh UUID per build). - RichTextEditor example: gate devtools recording + LAN inspector behind #if DEBUG so release builds never record or expose document data. - Channel example: clear stale member count when peekChannel fails; add accessibility labels to icon-only undo/redo/inspector buttons. * test: use drain expectation to fix flaky unchanged-count polling test The "no event when count is unchanged" test was non-deterministically failing with "Fulfilled inverted expectation". Root cause: `attachChannel` unconditionally starts a Watch stream. The stream delivers a `ChannelPresenceEvent(type: .initialized, ...)` via `handleWatchChannelResponse` asynchronously after `attachChannel` returns. Because the stream dispatch is async (Task + RunLoop.main), this event can arrive during the 1 s inverted-expectation window that was installed immediately after `syncChannel` — firing the callback and tripping the inverted expectation even though `refreshChannel` correctly suppressed its own event (the PR #1247 fix is working correctly). Note: `Channel.isRealtime` only controls the heartbeat timer; it does NOT prevent the watch stream from starting, so `isRealtime: false` alone would not close the race. Fix: install a drain expectation before the first `syncChannel` and wait for it to be fulfilled (via `fulfillment(of:timeout:5.0)`) before swapping in the inverted "no event" expectation. This guarantees that both the refresh RPC path and the watch-stream initialization path have completed before the observation window opens, so any event arriving in the 1 s window is genuinely spurious and correctly fails the test. * test: use addTeardownBlock for awaited channel test cleanup Replace defer { Task { try? await ... } } fire-and-forget cleanup with addTeardownBlock, which XCTest awaits before the test completes — so client deactivation/detachment finishes before the next test runs instead of leaking activated clients across tests. Per CodeRabbit review. * fix: address CodeRabbit follow-ups (observer snapshot, JSONNode id escaping) - DevtoolsRecorder.notifyObservers snapshots observers before iterating, so an observer callback that (un)registers cannot mutate the dictionary mid-iteration. - JSONNode escapes '/' and '\' in each path segment when building the stable id, so an object key containing '/' cannot collide with a deeper path. * chore: exclude devtools modules from code coverage Devtools (recorder, browser server, SwiftUI inspector) is opt-in debug tooling; exclude Sources/Devtools, Sources/DevtoolsServer, Sources/DevtoolsUI from Codecov so it doesn't drag the SDK's coverage metric.
The documentation is generated from this commit.
| Commit: | 25547d5 | |
|---|---|---|
| Author: | longhoang-lewy | |
| Committer: | GitHub | |
Apply updates from yorkie-js-sdk 0.7.6 (#258) * Copy attributes to split node in cloneElement * Implement toJSON for Bytes and Date primitive types * Register LWW-losing element in GC set on Set conflict * Apply array-move-convergence with LWW position register Port the array-move convergence fix: each RGANode now carries an LWW position register (position_created_at/moved_at/removed_at in the proto) separate from the element, so concurrent moves converge by LWW on the position. moveAfter resolves the anchor by position identity and, on both win and loss, produces a dead position node returned for GC; MoveOperation carries position identity (via posCreatedAt) to stay wire-compatible with the Go server/JS. Dead position nodes serialize with position timestamps and no element. CRDTRoot's GC walk registers dead position nodes. Ports yorkie-js-sdk#1227. * Unify presence event emission with reconcilePresence * test: cover array-move LWW, primitive toJSON, cloneElement attrs, GC, presence Port the v0.7.6 test scenarios: array-move LWW position register and move convergence (RGATreeList), primitive toJSON for Bytes/Date, split node attribute copy, LWW-losing element GC on Set conflict, and the reconcilePresence event emission. Integration cases need a live yorkie server v0.7.6. * chore: bump version to 0.7.6 and update changelog * chore: bump CI yorkie server to v0.7.6 * test: expect base64 bytes in various-types after toJSON change #1225 changed Primitive.toJSON to emit Bytes as base64 (JS-faithful), so the pre-existing test_can_support_various_types must expect "AQI=" for [1,2] instead of the old decimal-array "[1,2]". Drop the now-resolved bytes/date TODO. * Fix array index corruption when appending after a tail move moveAfter's winner path deleted the old (now-dead) position node from the index splay tree while `last` still pointed at it. A subsequent insert/append that anchors on `last` (e.g. append after moving the tail element to the front) then failed to locate its anchor in the index tree, so the appended element was never indexed — get(index:) returned nil and crashed callers. Keep the dead position node in the splay tree with length 0 (re-splay to refresh weights) instead of deleting it, matching the LWW-loser path and JS, which keep dead position nodes splayed until GC purge. * Fix array move-node encoding and deepcopy to preserve positions - Converter.toRGANodes: encode a moved node's positionMovedAt from the actual move ticket (entry.posMovedAt), not positionCreatedAt, and branch on posMovedAt like JS toRGANodes — keeps the move timestamp on the wire. - CRDTArray.deepcopy: iterate all position nodes and reconstruct moved (addMovedElement) and dead (addDeadPosition) slots with their position timestamps, mirroring JS CRDTArray.deepcopy. Copying only live nodes dropped moved/dead positions, so a move on the clone could anchor after a wrong or GC'd position.
| Commit: | 9e8e138 | |
|---|---|---|
| Author: | longhoang-lewy | |
| Committer: | GitHub | |
Apply updates from yorkie-js-sdk 0.7.5 (#257) * Add Counter dedup mode with HyperLogLog for UV measurement Port the dedup Counter feature: a new HyperLogLog (HLL.swift, xxhash64 — byte-compatible with the Go server) backs a dedup mode on CRDTCounter (Int32-valued, value = HLL cardinality estimate). Adds the public JSONDedupCounter authoring type (wired through JSONObject/JSONArray), IncreaseOperation gains an `actor` field (dedup increases require an actor and are not undoable), and the converter/proto carry the new VALUE_TYPE_INTEGER_DEDUP_CNT, Counter.hll_registers, and Increase.actor. Also folds in "Simplify Counter interface and replace long with bigint" (yorkie-js-sdk#1216): iOS already uses native Int32/Int64 (no Long library), so only the interface shape is mirrored — the bigint change is a no-op here. Skipped upstream yorkie-js-sdk#1218 (default transport gRPC-Web -> Connect): iOS already uses connect-swift's Connect protocol, so there is nothing to switch. Ports yorkie-js-sdk#1215 and #1216. * Enable splitLevel=1 concurrent tests and add split undo/redo Port split undo/redo: a split's reverse is a boundary-deletion that merges the split elements back (TreeEditOperation gains redoSplitLevel + toSplitReverseOperation, so the boundary-deletion's own reverse re-splits). IndexTree.splitElement now excludes removed children from the (single, visible) size, matching the upstream visibleSize fix. Ports yorkie-js-sdk#1219. * Add undo/redo support for TreeStyleOperation CRDTTree.style()/removeStyle() now also return the previous attribute values (and, for style, the keys that were newly added) captured from the first styled node; TreeStyleOperation builds a reverse op from them (combined / removeStyle / style). Callers in JSONTree updated to the new return arity. CRDTTree also carries the #1219 split-loop tweak (findOffset(includeRemoved: true)) since it lives in the same file. Ports yorkie-js-sdk#1221. * test: cover Counter dedup/HLL and Tree split/style undo Add HLL structural tests, CRDT dedup-counter + JSONDedupCounter unit tests, and integration suites for Counter dedup convergence, Tree split-level-1 undo/redo, and TreeStyle undo/redo (incl. overlapping-undo correctness), mirroring the yorkie-js-sdk v0.7.5 test scenarios. Integration cases require a live yorkie server v0.7.5. * chore: bump version to 0.7.5 and update changelog * chore: bump CI yorkie server to v0.7.5 * Fix tree style undo capturing tombstoned attribute values style()/removeStyle() captured previous attributes via getNodeByKey(key)?.value, which returns a tombstoned (removed) attribute's value. After a removeBold, the bold key is tombstoned but was still read as an existing attribute, so the reverse op restored the stale value instead of removing the key — undo/redo of style removal left the attribute in place. Gate the capture on RHT.has(key:) (non-removed) to match yorkie-js-sdk, so a tombstoned attribute counts as absent and the reverse op removes it. * Log instead of silently dropping HLL restore failure on deepcopy deepcopy() used `try? copy.restoreHLL(bytes)`, silently swallowing any error and producing a dedup-counter copy with an empty HLL but the original's timestamps. hllBytes() always yields a valid 16384-byte payload so this cannot happen for valid state, but a future invariant break should be loud: log the error via Logger.error rather than dropping it. (Avoids try!, per repo style.)
| Commit: | 65cd1b8 | |
|---|---|---|
| Author: | longhoang-lewy | |
| Committer: | GitHub | |
Apply updates from yorkie-js-sdk 0.7.4 (#256) * Mirror tree merge snapshot encoding fix from Go SDK Add `merged_from` (field 9, TreeNodeID) and `merged_at` (field 10, TimeTicket) to the TreeNode proto so a node moved by a concurrent merge carries the merge witness and its immutable merge ticket in the snapshot encoding. `merged_at` is stored alongside `merged_from` because the source parent's `removed_at` may be overwritten by later LWW tombstones and cannot serve as the merge-time causal boundary. Regenerated resources.pb.swift via buf (pinned plugins). Ports yorkie-js-sdk#1210. * Fix convergence bugs in concurrent tree merge/split Port the v0.7.4 Tree merge/split convergence fixes. Because the upstream changes are tightly interleaved across tree.ts / index_tree.ts (later fixes build on the mergedFrom/mergedAt fields introduced mid-series), they are ported as one cohesive change rather than reconstructed per-PR: - ticketKnown() causal-visibility helper; toBeMergedNodes gating so elements created by concurrent ops are not merged (Fix 9). - detachChild() to move alive nodes between parents (vs removeChild which now silently skips an already-detached child during GC purge). - mergedFrom/mergedAt/mergedInto on CRDTTreeNode; rebuildMergeState() on snapshot load reconstructs the mergedInto cache from persisted mergedFrom; converter round-trips mergedFrom/mergedAt. - findNodesAndSplitText redirect: insertion into a merge-tombstoned parent forwards to the merge target. - advancePastUnknownSplitSiblings / hasUnknownSplitSibling: edit and style ranges advance past concurrent split siblings; style/removeStyle skip End-token styling when an unknown split sibling extended the range. - edit() cascade-deletes unknown split siblings and propagates deletes to children moved by prior merges; remove() now returns Bool to gate GC pairs; split()/splitElement take a versionVector and keep merge-moved children whose source is local in the left node (Fix 8, via the shouldStayLeftOnSplit IndexTreeNode hook so the generic tree stays free of CRDT types). - traverseInPosRange returns early on an empty (fromIdx > toIdx) range. Ports yorkie-js-sdk#1202, #1203, #1204, #1205, #1206, #1211 (and the #1210 encoding consumed here). Intentional iOS divergences: the write-only `preTombstoned` set from the JS source is omitted (dead code); remove() keeps iOS's existing LWW tombstone direction (only the Bool return is added) — both tracked as follow-ups. * test: cover tree merge/split convergence and mergedFrom/mergedAt encoding Port the v0.7.4 tree convergence tests: converter mergedFrom/mergedAt round-trip and splitText/deepcopy merge-metadata unit tests, plus the concurrent merge/split convergence integration scenarios (overlapping, contained, and side-by-side merges) mirroring yorkie-js-sdk integration/tree_test.ts. Integration cases require a live yorkie server v0.7.4. * chore: bump version to 0.7.4 and update changelog * chore: bump CI yorkie server to v0.7.4 * Fix RichTextEditor undo/redo not re-rendering after revert document.undo()/redo() revert the CRDT correctly, but the editor never repainted from the reverted document: syncTextSnapShot() reused the on-screen attributed string when the cached `content` matched the doc text (so a content revert re-applied the stale string) and early-returned on the didFinishSync guard when the plain string was unchanged (so a style-only revert never rendered). Add a `force` path to syncTextSnapShot() that always rebuilds the attributed string from the document and skips both shortcuts; undo()/redo() now call it with force: true. Normal typing keeps the optimized path. * chore: extract tree edit helpers to satisfy SwiftLint Split the merge-move, cascade-delete-split-sibling, and propagate-deletes-to-merged-children blocks out of edit() into private helpers (applyMergeMoves, collectUnknownSplitSiblings, propagateDeletesToMergedChildren) to bring edit() under the cyclomatic-complexity and function-body-length limits. No behaviour change. * Fix tombstone-inclusive tree traversal for concurrent merge+delete convergence The overlapping-merge-and-delete-element-node convergence case diverged: after a client merged two paragraphs, a concurrent delete of the second paragraph's content from another client was not propagated, leaving the merged-in text alive ("<p>ab</p>" instead of "<p>a</p>"). Root cause: edit()'s range traversal excluded tombstoned nodes, so the merge-source parent (tombstoned by the local merge) was never visited and propagateDeletesToMergedChildren never fired. yorkie-js-sdk threads `includeRemoved=true` from edit() through the range walk; iOS lacked the parameter entirely. Thread `includeRemoved` (default false) through findOffset, tokensBetween, indexOf, addSizeOfLeftSiblings, toTreePos, toIndex and traverseInPosRange, and pass true from edit() only (style/removeStyle keep the visible-only walk, matching JS). iOS keeps a single visible `size`, so the JS totalSize notion is computed on the fly via nodeLength(includeRemoved:)/ paddedLength(includeRemoved:). * test: harden merge-state assertions and document shared-ops convergence test Address PR review feedback: - ConverterTests: assert merge-link identity (movedChild.mergedFrom == sourceParent.id, sourceParent.mergedInto == firstP.id) instead of only non-nil, so the roundtrip regression can't pass with wrong links. - TreeMergeConvergenceTests: document that multi_level_split_with_concurrent_merge_and_text_split intentionally shares its setup/operations with the cascade-delete test (mirroring the upstream pair 1:1) and asserts convergence-only by design.
| Commit: | fe574cc | |
|---|---|---|
| Author: | longhoang-lewy | |
| Committer: | GitHub | |
Apply updates from yorkie-js-sdk 0.7.1 (#253) * Retain peer presence across watch stream reconnections * Add tree-level schema validation and ProseMirror example Ports the tree-level schema validation from yorkie-js-sdk#1181: a TreeNodeRule (node_type/content/marks/group) in the ruleset proto, a ProseMirror-compatible content-expression parser/matcher, and a tree validator wired into the yorkie.Tree ruleset check. The ProseMirror example and ANTLR schema grammar are JS-only (the iOS SDK consumes pre-parsed rulesets via proto) and are not ported. * test: cover tree-level schema validation and presence retention * chore: bump CI yorkie server to v0.7.1 * chore: bump version to 0.7.1 and update changelog * test: assert CreateSchema status; drop ProseMirror from changelog note
| Commit: | d7c8aff | |
|---|---|---|
| Author: | longhoang-lewy | |
| Committer: | blurfx | |
Apply updates from yorkie-js-sdk 0.6.49 (#251)
| Commit: | 6135265 | |
|---|---|---|
| Author: | longhoang-lewy | |
| Committer: | GitHub | |
Apply updates from yorkie-js-sdk 0.6.49 (#251) * Add undo/redo support for Text.Style operations * Return unwrapped primitive values from Array iterator * chore: bump version to 0.6.49 and update changelog * test: cover mixed style-undo reverse op and heterogeneous Array elements()
| Commit: | b0f6b85 | |
|---|---|---|
| Author: | longhoang-lewy | |
| Committer: | GitHub | |
Apply updates from yorkie-js-sdk 0.6.48 (#250) * Replace WatchDocument and WatchChannel with unified Watch RPC Also extracts the shared watch stream lifecycle (yorkie-js-sdk#1160); iOS already centralizes the watch lifecycle in doWatchLoop/runWatchLoop, so no separate helper is introduced. * Remove --backend-disable-webhook-validation from docker-compose * chore: bump version to 0.6.48 and update changelog
| Commit: | 7ae8d0b | |
|---|---|---|
| Author: | longhoang-lewy | |
| Committer: | GitHub | |
Apply updates from yorkie-js-sdk 0.6.47 (#249) * Refactor channel terminology from presence to session * Add backend-disable-webhook-validation to CI
| Commit: | 594f0de | |
|---|---|---|
| Author: | longhoang-lewy | |
| Committer: | GitHub | |
Apply updates from yorkie-js-sdk 0.6.43 (#247) * Apply updates from yorkie-js-sdk 0.6.43 * Refactor Channel example room management with categories * Bump yorkieVersion to 0.6.43
| Commit: | 6cca038 | |
|---|---|---|
| Author: | longhoang-lewy | |
| Committer: | GitHub | |
Apply updates from yorkie-js-sdk 0.6.42 (#246)
| Commit: | fcd6ab5 | |
|---|---|---|
| Author: | longhoang-lewy | |
| Committer: | GitHub | |
Apply updates from yorkie-js-sdk 0.6.41 (#244) * feat: add GetRevision and align revision RPC fields with js-sdk v0.6.41 - Regenerate proto: add GetRevision RPC + GetRevisionRequest/Response - ListRevisionsRequest project_id -> client_id - RestoreRevisionRequest revision_id field 2 -> document_id, revision_id -> field 4 - Add Client.getRevision and YorkieService wrapper - Note RevisionSummary.snapshot is now YSON format * feat: port YSON module from js-sdk v0.6.41 - YSONValue enum + YSONText/YSONTree value types - YSON.parse (regex preprocess + JSONSerialization + postprocess), textToString, treeToXML - Type guards (isText/isTree/isInt/isLong/isDate/isBinData/isCounter/isObject) - 24 unit tests ported from yson_test.ts * refactor: thread OpSource and ExecutionResult through Operation.execute Foundation for undo/redo (js-sdk parity): - Operation.execute now returns ExecutionResult{opInfos, reverseOp?} and takes source: OpSource - Each operation keeps its body as a private executeOpInfos helper; reverseOp is nil for now - Change.execute threads source; Document.applyChanges passes source Behavior-preserving; reverse-op generation lands in follow-up commits. * feat: add CRDTRoot.findElementPairByCreatedAt for undo/redo ancestor walk Phase 4a CRDT primitive. (getPreviousCreatedAt already exists on CRDTArray/RGATreeList; CRDTObject.set executedAt deferred to the reverse-Set path.) * feat: generate reverse operations for undo/redo Phase 4b (js-sdk parity): - Operation.execute returns ExecutionResult? (nil = skip during undo/redo) - Add->Remove, Remove->Add/Set, Move->Move, Set->Set/Remove, ArraySet->ArraySet - Set/Remove ancestor-removed undo-skip; Set undo deregister of tombstoned element - setCreatedAt/setPrevCreatedAt mutators for history reconciliation - reverse ops carry a placeholder executedAt, reassigned at undo time (Phase 5) Behavior-preserving: reverse paths only run when source == .undoRedo (not yet wired). * feat: add History for undo/redo stacks Phase 4c: History class with undo/redo stacks (max depth 50), push/pop/clear, and reconcileCreatedAt (value-type-safe for struct ops). HistoryOperation enum covers operation + presence cases. reconcileTextEdit deferred to the reverse-Edit phase; presence-undo wiring deferred. * feat: wire undo history into the local update path Phase 5a: - Change.execute returns ChangeExecutionResult{operations, opInfos, reverseOps} - Document.update pushes reverseOps to the undo stack, clears redo on new ops, and reconciles ArraySet createdAt in the history - internalHistory/isUpdating state added executeUndoRedo + public undo/redo facade follow in Phase 5b. * feat: implement Document undo/redo execution Phase 5b (js-sdk parity): - Public canUndo/canRedo + undo()/redo(); executeUndoRedo applies reverse ops on a fresh change (source .undoRedo), reassigning executedAt and createdAt for Add/ArraySet, pushing the inverse onto the opposite stack - isUpdating guard; clearHistory on snapshot apply - CRDTElement.setCreatedAt (createdAt now settable; Primitive/Counter let->var) - 5 local undo/redo unit tests Known limitation (XCTExpectFailure + follow-up): undoing an object-property overwrite needs the ElementRHT positionedAt mechanism (newer than the iOS port). * feat: implement reverse EditOperation for Text undo/redo (#1126) Phase 6 (js-sdk parity): - RGATreeSplit.normalizePos/refinePos; edit returns removedValues - CRDTText refinePos/normalizePos/posToIndex; edit returns removedValues - EditOperation is now a class; computes a reverse edit (re-inserts removed content), refines its range on undo replay, and reconciles its range against remote edits (reconcileOperation, 6 cases) - History.reconcileTextEdit; Document.applyChanges reconciles text-edit ranges - 2 text undo/redo unit tests (insert + delete) pass * test: add undo/redo coverage; chore: bump CI server to v0.6.41; docs: changelog Phase 7: - test-writer: array add/remove/move undo/redo, reconcileOperation range-shift, ancestor-removed undo-skip (unit) + a two-client convergence integration test - critic-reviewer fixes: document deliberate ArraySet nil-reverse divergence and the intentional reconcileTextEdit stack-copy - bump CI yorkie server pin + docker-compose images to v0.6.41 - CHANGELOG v0.6.41 entry * feat(example): add Undo/Redo to RichTextEditor; expose Document.clearHistory - ContentViewModel.undo()/redo() re-render from the document snapshot; refresh canUndo/canRedo on every document event; toolbar Undo/Redo buttons - Make Document.clearHistory public and call it after the one-time content scaffolding in initializeClient, so undo can never remove 'content' and break the editor (fixes 'get(key:) content does not exist' after undo) Both the SDK and the RichTextEditor example build (BUILD SUCCEEDED). * fix(example): defer undo/redo state publish; use local server - refreshUndoRedoState() publishes canUndo/canRedo on the next main-actor turn to avoid 'Publishing changes from within view updates' (it is called from the document subscription, which can fire during a SwiftUI view update) - point the RichTextEditor client at the local server (no API key needed) * chore(examples): apply formatter output and build artifact updates SwiftFormat-on-save reformatting (RichTextEditor + Todomvc), Xcode package resolution churn, and build info plist updates. No functional changes. * fix: preserve document order of removed text nodes in reverse edit Pre-PR critic found a convergence bug: RGATreeSplit.deleteNodes returned removed nodes in a Swift Dictionary (unordered), so undoing a multi-node text deletion restored scrambled content and diverged from peers. Return removed nodes in document order instead. - add multi-node delete-undo test asserting exact restored content - add deterministic EditOperation.reconcileOperation 6-case + no-op tests - lint fixes (redundantSelf/hoistTry in YSON, identifier names, orphaned doc comment) * docs: backfill PR link in v0.6.41 changelog entry
| Commit: | f5ae52b | |
|---|---|---|
| Author: | longhoang-lewy | |
| Committer: | GitHub | |
Apply updates from yorkie-js-sdk 0.6.40 (#243) * Apply updates from yorkie-js-sdk 0.6.40 Port revision management (yorkie-js-sdk#1127): regenerate protobuf (RevisionSummary field renumber + Project/UpdatableProjectFields auto_revision_enabled), add the RevisionSummary type + converter, and Client.createRevision/listRevisions/restoreRevision with an integration test. * docs: add v0.6.40 changelog entry
| Commit: | bf5f6f8 | |
|---|---|---|
| Author: | longhoang-lewy | |
| Committer: | GitHub | |
Apply updates from yorkie-js-sdk 0.6.39 * Apply updates from yorkie-js-sdk 0.6.39 Port additive protocol changes from yorkie-js-sdk v0.6.39: - resources.proto: add ChannelSummary and RevisionSummary messages - yorkie.proto: add CreateRevision/ListRevisions/RestoreRevision RPCs and their request/response messages - Regenerate Swift protobuf/connect sources Pin buf swift plugins (apple/swift v1.37.0, connectrpc/swift v1.0.3) so protobuf generation is reproducible and stays free of unrelated codegen drift (e.g. the nonisolated keyword in newer protoc-gen-swift). * chore: bump CI yorkie server to v0.6.39 * chore: resolve build warnings across SDK and integration tests - Drop spurious 'await' on APIs that became synchronous in the v0.6.39 sync (1348 call sites across the integration suite; TextViewModel example). - CRDTArray.deepcopy: explicit '_ = try?' for the discarded insert result. - ChangeID.setClocks: remove dead 'var vector' clone (value type, never mutated). - JSONArray.moveAfterByIndex: drop no-op @discardableResult (Void return). - TextIntegrationTests: 'var' -> 'let' for never-mutated iterators. * docs: add CHANGELOG.md reconstructed from GitHub releases Reconstructs the project changelog from all 43 GitHub Releases (v0.2.19 -> v0.6.37) in Keep a Changelog format. * chore: satisfy swiftformat redundantSelf in DocumentIntegrationTests The await removal exposed bare property accesses that the project's '--self insert' rule requires to be qualified. Applied swiftformat 0.55.6 (the CI-pinned version): 14 'self.' insertions, no behaviour change. * docs: add v0.6.39 changelog entry
| Commit: | b012eff | |
|---|---|---|
| Author: | longhoang-lewy | |
| Committer: | GitHub | |
Apply updates from yorkie-js-sdk 0.6.36 (#240)
| Commit: | ad6444e | |
|---|---|---|
| Author: | Ivan | |
| Committer: | GitHub | |
Apply updates from yorkie-js-sdk 0.6.34 (#238) * Sync 0.6.34 * Fix swiftlint * Fix swift format * Remove duplicate files * Fix test * Fix test * Fix test * Fix swiftformat * Fix unit test * Remove unused code
| Commit: | 3b02ee3 | |
|---|---|---|
| Author: | Ivan | |
| Committer: | GitHub | |
Apply updates from yorkie-js-sdk 0.6.28 (#236) * Sync 0.6.28 * Update brew 0.6.28
| Commit: | 66bd225 | |
|---|---|---|
| Author: | Ivan | |
| Committer: | GitHub | |
Apply updates from yorkie-js-sdk 0.6.23 (#223) * Sync #1030 * Sync #1037 * Import Helpers * Fix review
| Commit: | efc2437 | |
|---|---|---|
| Author: | ivan.do | |
Sync #1038
| Commit: | 344bd57 | |
|---|---|---|
| Author: | Ivan | |
| Committer: | GitHub | |
Apply updates from yorkie-js-sdk 0.6.18 (#219) * Sync #1010 * Update Yorkie server 0.6.18 * Resolve dependency * Specific protobuf to 1.31 * Require swift proto buf as 1.31 * Fix swiftformat * Add Yorkie Test Helper * Fix swift review Remove unused file
| Commit: | 8f9d9bb | |
|---|---|---|
| Author: | Ivan | |
| Committer: | GitHub | |
Apply updates from yorkie-js-sdk 0.6.13 (#215) * Sync #992 * Sync https://github.com/yorkie-team/yorkie-js-sdk/pull/993 * Fix brew install from local file * Fix swiftlint * fix swiftformat * Fix swiftformat * Fix swiftformat * Remove fatalError * Update Sources/Document/Document.swift Co-authored-by: James (An Nguyen) <nguyenngocan.hcmut@gmail.com> * Fix wrong definition of Function --------- Co-authored-by: James (An Nguyen) <nguyenngocan.hcmut@gmail.com>
| Commit: | 9e50901 | |
|---|---|---|
| Author: | Ivan | |
| Committer: | GitHub | |
Apply updates from yorkie-js-sdk 0.6.10 (#213) * TS tree_style_operation.ts packages/sdk/src/document/operation * Sync #969 * Configure yorkie server 0.6.10 * Fix swiftlint * Fix swiftFormat * Fix swiftformat * Fix swiftFormat
| Commit: | 9712ad6 | |
|---|---|---|
| Author: | Ivan | |
| Committer: | GitHub | |
Apply updates from yorkie-js-sdk 0.6.0 (#206) * Sync #938 * Sync #942 * fix swiftlint * Remove unused code * Update yorkie.pb
| Commit: | 964729c | |
|---|---|---|
| Author: | LOG | |
| Committer: | GitHub | |
Apply updates from yorkie-js-sdk v0.5.3 (#199) * Add (Pb)VersionVector proto message and matching VersionVector struct * Update converter to use version vector * Update Document to handle version vector in applychangepack * Define version vector and add into change_id, changepack * Update GC in CRDT Root to use min synced version vector * Add YorkieTestHelper target for shared test helpers * Apply missing version vector updates * Apply version vector to tests * Fix: Import YorkieTestHelper only during `swift test` to resolve test command failure
| Commit: | 748134e | |
|---|---|---|
| Author: | LOG | |
| Committer: | GitHub | |
Apply updates from yorkie-js-sdk v0.5.2 (#197) * Add support for a new operation type ArraySet in the protocol * Bump minimum deployment target to iOS 15 * Update dependency versions * Apply review comments by coderabbitai
| Commit: | 1aa3dd8 | |
|---|---|---|
| Author: | LOG | |
| Committer: | GitHub | |
Apply updates from yorkie-js-sdk v0.4.27 (#192) * Added the generated ErrorInfo model from googleapis/google/rpc/error_details.proto * Add YorkieService wrapper for YorkieServiceClient with API mocking support * Handle retry for syncLoop and watchLoop / Handle ErrClientNotActivated and ErrClientNotFound * Fix watch loop reconnect timer issue in manual syncMode * Fix ensure onlineClients are reset on document detach * Handle local changes correctly when receiving snapshot * Fix Xcode warnings * Apply SwiftFormat * Fix 1 failing test in ClientIntegrationTests * Apply review comments by coderabbitai
| Commit: | 01142d8 | |
|---|---|---|
| Author: | Jung gyun Ahn | |
| Committer: | GitHub | |
Add RHTNode removal to converter for consistency (#182) * Fix incorrect indexes in TreeChange * Update swift-integration.yml * Update swift-integration.yml * Update swift-integration.yml * Add RHTNode removal to converter for consistency
| Commit: | 4b063d8 | |
|---|---|---|
| Author: | Jung gyun Ahn | |
| Committer: | GitHub | |
Handle concurrent editing and styling in Tree (#166)
| Commit: | cbde6a0 | |
|---|---|---|
| Author: | Jung gyun Ahn | |
| Committer: | GitHub | |
Implement Tree.RemoveStyle (#158) * Implement Protocol Changes for Tree.RemoveStyle * merge similar functions
| Commit: | 314b944 | |
|---|---|---|
| Author: | Jung gyun Ahn | |
| Committer: | GitHub | |
Restore interface changes due to server DB sharding (#148) * Revert "Reflect interface changes of server DB sharding" This reverts commit a56bb269a7039f3d8e15423269bc7a5ae40e1b9f. * update ci docker version
| Commit: | b1d58ea | |
|---|---|---|
| Author: | Jung gyun Ahn | |
| Committer: | GitHub | |
Reflect interface changes of server DB sharding (#145) * Reflect interface changes of server DB sharding * fix lint
| Commit: | 6dacc0d | |
|---|---|---|
| Author: | Jung gyun Ahn | |
| Committer: | GitHub | |
Implement splitLevel of Tree.Edit (#139) * Refactor Tree codes * correct lint error * Implement splitLevel of Tree.Edit
| Commit: | f15db57 | |
|---|---|---|
| Author: | Jung gyun Ahn | |
| Committer: | GitHub | |
Support concurrent formatting of Text (#116) * refactor TCs of Text * Support concurrent formatting of Text
| Commit: | 2310f0a | |
|---|---|---|
| Author: | Jung gyun Ahn | |
| Committer: | GitHub | |
Change TreeNode to have IDs instead of insPrev, insNext (#103) * Change the value of XXXChange to Change in Document.subscribe * initial commit * add Test codes. * Expose pathToIndex API * Bump up protobuf * change yorkie server to 0.4.5 * Remove duplicated codes * remove redundant codes * Initial commit * Correcting misported code * Add TC for presence * change xcode version to 14.3.1 * Update Tree.edit to allow insertion of multiple contents at once * Replace selection with presence * Rename TextRangeStruct to TextPosStructRange * Clean up methods related to presence * Add presence.get() to get presence value in doc.update() * Change 'Documents' from plural to singular in DocEvent * Cleanup proto * Concurrent case handling for Yorkie.tree * fix tree style TC * Change TreeNode to have IDs instead of insPrev, insNext * correct typo. and remove forced unwrap * apply review comment * apply review comment * correct typo
| Commit: | f200e12 | |
|---|---|---|
| Author: | Jung gyun Ahn | |
| Committer: | GitHub | |
Concurrent case handling for Yorkie.tree (#102) * Change the value of XXXChange to Change in Document.subscribe * initial commit * add Test codes. * Expose pathToIndex API * Bump up protobuf * change yorkie server to 0.4.5 * Remove duplicated codes * remove redundant codes * Initial commit * Correcting misported code * Add TC for presence * change xcode version to 14.3.1 * Update Tree.edit to allow insertion of multiple contents at once * Replace selection with presence * Rename TextRangeStruct to TextPosStructRange * Clean up methods related to presence * Add presence.get() to get presence value in doc.update() * Change 'Documents' from plural to singular in DocEvent * Cleanup proto * Concurrent case handling for Yorkie.tree * fix tree style TC * correct typo. and remove forced unwrap * apply review comment * apply review comment * correct typo
| Commit: | 87fd0f5 | |
|---|---|---|
| Author: | Jung gyun Ahn | |
| Committer: | GitHub | |
Cleanup proto (#101) * Change the value of XXXChange to Change in Document.subscribe * initial commit * add Test codes. * Expose pathToIndex API * Bump up protobuf * change yorkie server to 0.4.5 * Remove duplicated codes * remove redundant codes * Initial commit * Correcting misported code * Add TC for presence * change xcode version to 14.3.1 * Update Tree.edit to allow insertion of multiple contents at once * Replace selection with presence * Rename TextRangeStruct to TextPosStructRange * Clean up methods related to presence * Add presence.get() to get presence value in doc.update() * Change 'Documents' from plural to singular in DocEvent * Cleanup proto * apply review comment * apply review comment * correct typo
| Commit: | 8be3818 | |
|---|---|---|
| Author: | Jung gyun Ahn | |
| Committer: | GitHub | |
Change 'Documents' from plural to singular in DocEvent (#100) * Change the value of XXXChange to Change in Document.subscribe * initial commit * add Test codes. * Expose pathToIndex API * Bump up protobuf * change yorkie server to 0.4.5 * Remove duplicated codes * remove redundant codes * Initial commit * Correcting misported code * Add TC for presence * change xcode version to 14.3.1 * Update Tree.edit to allow insertion of multiple contents at once * Replace selection with presence * Rename TextRangeStruct to TextPosStructRange * Clean up methods related to presence * Add presence.get() to get presence value in doc.update() * Change 'Documents' from plural to singular in DocEvent * apply review comment * apply review comment * correct typo
| Commit: | 35b77a1 | |
|---|---|---|
| Author: | Jung gyun Ahn | |
| Committer: | GitHub | |
Move Presence from Client to Document (#94) * Change the value of XXXChange to Change in Document.subscribe * initial commit * add Test codes. * Expose pathToIndex API * Bump up protobuf * change yorkie server to 0.4.5 * Remove duplicated codes * remove redundant codes * Initial commit * Correcting misported code * Add TC for presence * change xcode version to 14.3.1
| Commit: | 580bcd9 | |
|---|---|---|
| Author: | Jung gyun Ahn | |
| Committer: | GitHub | |
Allow multi tree nodes when edit (#93) * Change the value of XXXChange to Change in Document.subscribe * initial commit * add Test codes. * Expose pathToIndex API * Bump up protobuf * change yorkie server to 0.4.5 * Remove duplicated codes * remove redundant codes
| Commit: | 653c066 | |
|---|---|---|
| Author: | Jung gyun Ahn | |
| Committer: | GitHub | |
Implement yorkie.Tree for text editors using tree model (#90) * Change the value of XXXChange to Change in Document.subscribe * initial commit * add Test codes. * Cleanup of test-related terminology * Expose pathToIndex API * Bump up protobuf * modify action script * correct script * disable todo lint rule * Revert "Expose pathToIndex API" This reverts commit d5a6a0226601ef3dc008939e1c030768c5b9bd0c. * Revert "Bump up protobuf " This reverts commit 89f1ba1360ae9784919647fe113d92264c1d20c1. * set yorkie server version to 0.4.4 * set yorkie server to 0.4.4 * fix sync() concurrency * bump to 0.4.4 * Update swift-integration.yml * Revert "Update swift-integration.yml" This reverts commit 318dc04b03ca6acde97901efca4dcbae9eab1c15. * add more debug info. * Update swift-integration.yml * fix typo * change params to underscore * fix compile error * Revert "Update swift-integration.yml" This reverts commit 318dc04b03ca6acde97901efca4dcbae9eab1c15. * fix misused idString * change the lamport in the TimeTicketStruct to string * cleanup codes * complete == function * change throw exception to assert * remove unnecessary code * change throw exception to precondition * open ElementNode init() * rename JSON nodes * revert edit() parameter to 0.4.4 * remove forced unwrap * fix lint error * fix JSONTree iterration * fix tc validation function * change docker action * Revert "change docker action " This reverts commit f5120da2a6ebfedee179fde3c0a9970917d14d09. * Change JSONTree attributes value type to Any * remove forced unwrap * fix bool converting * Revert "fix bool converting" This reverts commit b761b93ef7c9374654b137600ee0fb7c36e144a9. * remove duplicated codes * Update swift-integration.yml * cleanup ci action * Update swift-integration.yml * Update swift-integration.yml * Fix compile error
| Commit: | 8e84992 | |
|---|---|---|
| Author: | Jung gyun Ahn | |
| Committer: | GitHub | |
Add Client sync mode (#65) * Add Client sync mode * change syncMode to realtimeSyncMode * Add test codes * fix warning by xcode 14.3 * revert codes for xcode 14.3 * Remove unnecessary checkpoint validation from applyChangePack * Match function names with JS * lint code * Remove pullOnly mode * revert a unnessary change * Revert codes position to diff changes of codes clearly * Revert codes * Add comments for SyncMode * Refactor the codes related to getPeerPresence (#77) * add test code for pauseRemoteChanges and resumeRemoteChanges * remove waits in TC * revert waits in TC
| Commit: | b5ec0be | |
|---|---|---|
| Author: | Jung gyun Ahn | |
| Committer: | GitHub | |
Add RemoveDocument API (#64) * Add RemoveDocument API * Elaborate on the value of the PeersChanged event * Add TC for the stream connection status change event * Fix the watchLoop start and stop for pause, resume * Removed the codes for changing the status of the doc, before sending the API * Invalidate watchLoop reconnection timer when disconnecting stream * Throws an error when server returns removed doc for the attached result
| Commit: | 4387216 | |
|---|---|---|
| Author: | Jung gyun Ahn | |
| Committer: | GitHub | |
Remove duplicated key from TextNodeAttr (#52)
| Commit: | c865d0a | |
|---|---|---|
| Author: | Jung gyun Ahn | |
| Committer: | GitHub | |
Implement Text Element (#50) * Implements RGATreeSplit * Add throw noSuchElement error for failed forced unwrap
| Commit: | e48397b | |
|---|---|---|
| Author: | 원형식 | |
| Committer: | GitHub | |
Initial project setup (#2) Project structure based on a default swift package project and yorkie-js-sdk. - grpc-swift - swift-protobuf - SwiftLint - SwiftFormat