Skip to content

refactor: clean up WorkflowHistoryFetcher code#1121

Merged
adhityamamallan merged 4 commits intocadence-workflow:masterfrom
adhityamamallan:refactor-history-fetcher-code
Dec 17, 2025
Merged

refactor: clean up WorkflowHistoryFetcher code#1121
adhityamamallan merged 4 commits intocadence-workflow:masterfrom
adhityamamallan:refactor-history-fetcher-code

Conversation

@adhityamamallan
Copy link
Member

Summary

  • Add docstrings to public methods
  • Clean up unused isStarted variable
  • Create enableQuery() private method to share code
  • Create createStateChangeHandler() private method to improve readability and separate concerns

Test plan

Unit tests passing + ran locally to sanity-check.

Signed-off-by: Adhitya Mamallan <adhitya.mamallan@uber.com>
Signed-off-by: Adhitya Mamallan <adhitya.mamallan@uber.com>
Signed-off-by: Adhitya Mamallan <adhitya.mamallan@uber.com>
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 refactors the WorkflowHistoryFetcher class to improve code organization and maintainability. The changes are purely structural with no functional changes to behavior.

  • Adds comprehensive JSDoc documentation to all public methods
  • Removes unused isStarted instance variable
  • Extracts common query enabling logic into a private enableQuery() method
  • Extracts state change handling logic into a factory method createStateChangeHandler() for better separation of concerns

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: Adhitya Mamallan <adhitya.mamallan@uber.com>
@adhityamamallan adhityamamallan merged commit 01b84d9 into cadence-workflow:master Dec 17, 2025
3 checks passed
@adhityamamallan adhityamamallan deleted the refactor-history-fetcher-code branch December 17, 2025 21:25
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