Skip to content

operationQueue.ts: Refactor priority levels from magic numbers to named constants #695

Description

@Kingsman-99

Description

src/operationQueue.ts uses numeric literals (e.g., 1, 5, 10) as priority levels throughout the code. These magic numbers make it hard to understand relative urgency and error-prone to add new levels. Replacing them with named constants improves readability.

Acceptance Criteria

  • A OperationPriority const enum (or plain object) defines LOW = 1, NORMAL = 5, HIGH = 10 (or equivalents matching the current values)
  • All numeric literals in operationQueue.ts are replaced with the named constants
  • No behavior changes; only naming refactor
  • Unit tests pass

Context

  • Target file: src/operationQueue.ts
  • Export OperationPriority so callers can use the constants too

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions