Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,10 @@ public void SetRoomCombinationScenario(string scenarioKey)
else
{
Debug.LogMessage(LogEventLevel.Debug, this, "Unable to find partition with key: '{0}'", partitionState.PartitionKey);
}
}
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There appears to be trailing whitespace after the closing brace on this line. Please remove the extra spaces to avoid noisy diffs and keep formatting consistent.

Suggested change
}
}

Copilot uses AI. Check for mistakes.
}
// Activates the scenario to prevent _currentScenario from being null when starting in manual mode.
ChangeScenario(scenario);
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ChangeScenario returns Task (async) and is being invoked without awaiting or otherwise observing the task. This can hide exceptions from Activate/Deactivate and can also allow overlapping scenario changes if this method is called multiple times quickly. Consider explicitly firing-and-forgetting with exception logging (e.g., capturing the returned task and handling faults) or introducing a serialized/queued scenario-change mechanism so only one activation runs at a time.

Suggested change
ChangeScenario(scenario);
var _ = ChangeScenario(scenario).ContinueWith(t =>
{
var ex = t.Exception != null ? t.Exception.Flatten() : null;
if (ex != null)
{
Debug.LogMessage(LogEventLevel.Error, this,
"Error changing scenario to '{0}': {1}", scenario.Key, ex);
}
}, TaskContinuationOptions.OnlyOnFaulted);

Copilot uses AI. Check for mistakes.
}
else
{
Expand Down
Loading