From ab2c40d35801a103e497b87083d71b8c3a8b2afc Mon Sep 17 00:00:00 2001 From: iliya Date: Sat, 21 Mar 2026 12:15:13 +0200 Subject: [PATCH] fix: populate team color/displayName in tool approval from config.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit syntheticRequest for team launch was missing color and displayName fields — they only existed in TeamCreateRequest (create flow). Now reads color and name from config.json when building syntheticRequest, so ToolApprovalRequest always has team color. --- src/main/services/team/TeamProvisioningService.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/main/services/team/TeamProvisioningService.ts b/src/main/services/team/TeamProvisioningService.ts index 14d9c55d..e8f2fc50 100644 --- a/src/main/services/team/TeamProvisioningService.ts +++ b/src/main/services/team/TeamProvisioningService.ts @@ -3231,6 +3231,19 @@ export class TeamProvisioningService { skipPermissions: request.skipPermissions, }; + // Enrich with color/displayName from config.json (always available for launched teams) + try { + const cfg = JSON.parse(configRaw) as Record; + if (typeof cfg.color === 'string' && cfg.color.trim().length > 0) { + syntheticRequest.color = cfg.color.trim(); + } + if (typeof cfg.name === 'string' && cfg.name.trim().length > 0) { + syntheticRequest.displayName = cfg.name.trim(); + } + } catch { + // config already validated above — ignore parse errors here + } + const run: ProvisioningRun = { runId, teamName: request.teamName,