Skip to content

Remove duplicate enum #4085

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 24, 2025
Merged

Remove duplicate enum #4085

merged 2 commits into from
Jul 24, 2025

Conversation

robertbrignull
Copy link
Contributor

Does anyone know why we have these two identical enums? It doesn't look like either of them are used outside of query-history-manager.ts and history-tree-data-provider.ts, and as far as I can tell it's not about having separate types for data storage.

I came across this as part of #4056 but thought I'd pull this out to a separate PR.

@robertbrignull robertbrignull requested review from a team and Copilot July 22, 2025 15:42
@robertbrignull robertbrignull requested a review from a team as a code owner July 22, 2025 15:42
Copy link

@Copilot 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 consolidates duplicate enum definitions by removing a redundant SortOrder enum and importing it from a single source instead. The change eliminates code duplication where the same enum was defined identically in two different files.

  • Remove duplicate SortOrder enum definition from query-history-manager.ts
  • Import SortOrder from history-tree-data-provider.ts where it's already defined

@robertbrignull robertbrignull merged commit bb2f7d0 into main Jul 24, 2025
20 of 23 checks passed
@robertbrignull robertbrignull deleted the robertbrignull/duplicate-enums branch July 24, 2025 08:26
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.

2 participants