-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
The colorIndex in colorManager.js is module-level state that could cause interference between concurrent operations.
Current Behavior
let colorIndex = 0;
export function getNextColor() {
const color = COLORS[colorIndex % COLORS.length];
colorIndex++;
return color;
}Proposed Solution
Use a generator function or pass color iterator as parameter to avoid shared mutable state.
export function* colorGenerator() {
let index = 0;
while (true) {
yield COLORS[index % COLORS.length];
index++;
}
}Priority
Medium
Related
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Projects
Status
Backlog