Duo doesn't work on project if the instance set it off by default

Summary

If self-managed instance set Duo disabled by default, Duo doesn't work on project where it's enabled.

Environment

I reproduced this bug for self-managed GitLab with my GDK

Steps to reproduce

  1. Go to Admin->GitLab Duo and change configuration to be Off by default.
  2. Go to any project where your user is Owner, go to Settings->General and search for Duo settings, make sure that it's enabled.

Bug

There is no Duo Chat window, or if it exists (rare case), I can't ask any question and got an error that AI isn't enabled.

Expected behaviour

I can use Duo Chat. With Duo enabled by default on instance level, everything works correctly.

Screenshots

Admin panel

Screenshot_2024-12-20_at_12.16.25

Project settings

Screenshot_2024-12-20_at_12.27.07

Assignee Loading
Time tracking Loading