Skip to content

Remove ForestSummaryTrackingState#26468

Open
CraigMacomber wants to merge 3 commits intomicrosoft:mainfrom
CraigMacomber:ForestSummaryTrackingState
Open

Remove ForestSummaryTrackingState#26468
CraigMacomber wants to merge 3 commits intomicrosoft:mainfrom
CraigMacomber:ForestSummaryTrackingState

Conversation

@CraigMacomber
Copy link
Contributor

Description

Remove ForestSummaryTrackingState and derive it from trackedSummaryProperties===undefined instead.

This remove mutable state, and remove possible invaid states, removing the need for mutations and validation to maintain and ensure it is kept in sync.

Reviewer Guidance

The review process is outlined on this wiki page.

@CraigMacomber CraigMacomber requested a review from a team as a code owner February 18, 2026 03:11
Copilot AI review requested due to automatic review settings February 18, 2026 03:11
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 ForestSummaryTrackingState enum and derives the state from whether trackedSummaryProperties is undefined instead. This refactoring eliminates redundant mutable state and prevents potential invalid states where the two could become out of sync.

Changes:

  • Removed the ForestSummaryTrackingState enum and associated type definition
  • Replaced the forestSummaryState field with a derived isSummarizing getter
  • Simplified validation functions by removing redundant state checks
  • Updated all test assertions to use the new isSummarizing property

Reviewed changes

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

File Description
packages/dds/tree/src/feature-libraries/forest-summary/incrementalSummaryBuilder.ts Removed ForestSummaryTrackingState enum, replaced forestSummaryState field with isSummarizing getter, simplified validation functions
packages/dds/tree/src/test/feature-libraries/forest-summary/incrementalSummaryBuilder.spec.ts Updated all test assertions to use builder.isSummarizing instead of builder.forestSummaryState

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

Comments