| 224 | } |
| 225 | |
| 226 | syncWorkspaces(metadata: Map<string, FrontendWorkspaceMetadata>): void { |
| 227 | if (!this.isActive && metadata.size > 0) { |
| 228 | this.isActive = true; |
| 229 | } |
| 230 | |
| 231 | this.workspaceMetadata = metadata; |
| 232 | for (const [id, unsubscribe] of this.runtimeRetryUnsubscribers) { |
| 233 | if (!metadata.has(id)) { |
| 234 | unsubscribe(); |
| 235 | this.runtimeRetryUnsubscribers.delete(id); |
| 236 | } |
| 237 | } |
| 238 | this.refreshController.bindListeners(); |
| 239 | this.refreshController.requestImmediate(); |
| 240 | } |
| 241 | |
| 242 | // ───────────────────────────────────────────────────────────────────────────── |
| 243 | // Workspace-based PR detection (primary mode) |