| 429 | const colorRequested = new Map<string, AvatarColorKey>() |
| 430 | |
| 431 | function pickAvailableColor(used: Set<string>): AvatarColorKey { |
| 432 | const available = AVATAR_COLOR_KEYS.filter((c) => !used.has(c)) |
| 433 | if (available.length === 0) return AVATAR_COLOR_KEYS[Math.floor(Math.random() * AVATAR_COLOR_KEYS.length)] |
| 434 | return available[Math.floor(Math.random() * available.length)] |
| 435 | } |
| 436 | |
| 437 | function enrich(project: { worktree: string; expanded: boolean }) { |
| 438 | const [childStore] = serverSync().child(project.worktree, { bootstrap: false }) |