From 154014aa3a7a212eadf7b947bb08e531cfd21da8 Mon Sep 17 00:00:00 2001 From: Russell Mull Date: Sun, 12 May 2024 12:30:12 -0700 Subject: [PATCH] Mutator grouping fixes --- vscode/src/mutators.ts | 3 +++ vscode/src/workspaceState.ts | 10 ++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/vscode/src/mutators.ts b/vscode/src/mutators.ts index a75ca17..1d4feed 100644 --- a/vscode/src/mutators.ts +++ b/vscode/src/mutators.ts @@ -87,6 +87,7 @@ export class MutatorsTreeDataProvider implements vscode.TreeDataProvider { this.createMutation(itemData); }), + this.wss.onDidChangeActiveWorkspace(() => this.refresh()), this.wss.onDidChangeUsedSegments(() => this.refresh()) ); @@ -94,6 +95,8 @@ export class MutatorsTreeDataProvider implements vscode.TreeDataProvider { @@ -96,6 +97,7 @@ export class WorkspaceAndSegmentState { } } } + if (resetToLatestWorkspace) { vscode.window.showWarningMessage(`Active segment is for a different workspace; reverting to latest.`); await _useLatestSegment(); @@ -106,12 +108,16 @@ export class WorkspaceAndSegmentState { }; } + let ws_def = await apiClient.workspace(activeWorkspaceVersionId).definition(); + let mutatorGroupingAttrs = ws_def.mutator_grouping_attrs; + return new WorkspaceAndSegmentState( apiClient, activeWorkspaceName, activeWorkspaceVersionId, usedSegmentConfig, - activeSegments + activeSegments, + mutatorGroupingAttrs ); }