-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Describe what should be investigated or refactored
In watch.ts, we have a few magic numbers which should be avoided. The use of magic numbers as sentinel values can be confusing and error-prone.
Specific points in file:
watch.ts:78 - #lastSeenTime = NONE mixes timestamp data with state flags
watch.ts:518-519 - Comparison this.#lastSeenTime === NONE is semantically unclear
watch.ts:525 - this.#lastSeenTime === OVERRIDE mixed with timestamp comparisons
As an alternative, let's create a state enum or use a nullable timestamp instead of these magic numbers.
Links to any relevant code
See the following block:
const NONE = 50;
const OVERRIDE = 100;
Additional context
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
🆕 New