Skip to content

Make feature flag checks async end-to-end#50

Closed
Copilot wants to merge 2 commits into
mq-multienvfrom
copilot/sub-pr-46-another-one
Closed

Make feature flag checks async end-to-end#50
Copilot wants to merge 2 commits into
mq-multienvfrom
copilot/sub-pr-46-another-one

Conversation

Copy link
Copy Markdown

Copilot AI commented Feb 19, 2026

IFeatureService.IsFeatureEnabled was synchronously blocking on IFeatureManagerSnapshot.IsEnabledAsync via .GetAwaiter().GetResult(), risking thread-pool starvation and deadlocks under ASP.NET request contexts.

Changes

  • IFeatureService / FeatureService: Replaced bool IsFeatureEnabled(string) with Task<bool> IsFeatureEnabledAsync(string), using await in the implementation
  • ViewComponents (UploadViewComponent, TabbedNavigationViewComponent): Updated calls to await IsFeatureEnabledAsync(...) inside existing async InvokeAsync methods
  • Razor Pages (Index, Completed, Denied, Review, Justification): Converted OnGet()OnGetAsync() returning Task, awaiting feature flag checks
// Before
public bool IsFeatureEnabled(string featureName) =>
    _featureManager.IsEnabledAsync(featureName).GetAwaiter().GetResult();

// After
public async Task<bool> IsFeatureEnabledAsync(string featureName) =>
    await _featureManager.IsEnabledAsync(featureName);

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: mark-quickel <112185610+mark-quickel@users.noreply.github.com>
Copilot AI changed the title [WIP] Update multi-environment support and claims filtering based on feedback Make feature flag checks async end-to-end Feb 19, 2026
Copilot AI requested a review from mark-quickel February 19, 2026 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants