Skip to content

Remove Transactor.isInProgress#26535

Merged
noencke merged 1 commit intomicrosoft:mainfrom
noencke:remove-isInProgress
Feb 25, 2026
Merged

Remove Transactor.isInProgress#26535
noencke merged 1 commit intomicrosoft:mainfrom
noencke:remove-isInProgress

Conversation

@noencke
Copy link
Contributor

@noencke noencke commented Feb 25, 2026

Cleanup PR that replaces the now-redundant isInProgress with checks against size. Transactor.size has also been made a property rather than a method.

Copilot AI review requested due to automatic review settings February 25, 2026 01:45
@noencke noencke requested a review from a team as a code owner February 25, 2026 01:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes the now-redundant isInProgress() method from the Transactor interface and converts size() from a method to a property. Since isInProgress() was semantically equivalent to size > 0, all usages have been replaced with direct size comparisons.

Changes:

  • Removed Transactor.isInProgress() method from the interface
  • Converted Transactor.size() from a method to a property getter
  • Updated all call sites to check size === 0 or size > 0 instead of calling isInProgress()
  • Updated documentation comments to reference Transactor.size instead of Transactor.isInProgress()

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/dds/tree/src/shared-tree-core/transaction.ts Removed isInProgress() method, converted size() to property getter, updated documentation comments
packages/dds/tree/src/shared-tree/treeCheckout.ts Replaced isInProgress() calls with size === 0 or size > 0 checks
packages/dds/tree/src/shared-tree/sharedTree.ts Replaced isInProgress() calls with size === 0 or size > 0 checks
packages/dds/tree/src/shared-tree/schematizingTreeView.ts Replaced isInProgress() call with size > 0 check
packages/dds/tree/src/test/shared-tree/treeCheckout.spec.ts Updated test assertions to check size property values directly
packages/dds/tree/src/test/shared-tree-core/transaction.spec.ts Updated test assertions to use size property instead of isInProgress() and size() method
packages/dds/tree/src/test/shared-tree/fuzz/fuzzEditReducers.ts Replaced isInProgress() calls with size property checks
packages/dds/tree/src/test/shared-tree/fuzz/fuzzEditGenerators.ts Replaced isInProgress() calls with size > 0 checks

@noencke noencke requested a review from daesunp February 25, 2026 02:09
@noencke noencke merged commit 7275bb6 into microsoft:main Feb 25, 2026
34 checks passed
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.

3 participants