GitLab Duo overview in admin area is always wrong about direct connection

Summary

When looking at GitLab Duo overview in admin area, Information about GitLab Duo "Direct connections" is always wrong. (Showing not enabled when enabled, and enabled when not enabled.)

This is due to https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/app/helpers/admin/application_settings_helper.rb#L44 returning result of disabled_direct_code_suggestions without inverting as direct_code_suggestions_enabled

Steps to reproduce

Open admin panel GitLab Duo - https://gitlab.example.com/admin/gitlab_duo - and Direct connections will display some information. Open configuration sumbenu via "Change configuration" button and check that the actual configuration is oposite.

What is the current bug behavior?

Displaying oposite information.

What is the expected correct behavior?

Displaying actual state

Relevant logs and/or screenshots

Direct connections enabled

2024-12-21T20_39_31_149551584+01_00

2024-12-21T20_40_07_463364238+01_00

Direct connections disabled

2024-12-21T20_37_33_878032900+01_00

2024-12-21T20_37_47_989374518+01_00

Output of checks

Results of GitLab environment info

Expand for output related to GitLab environment info
root@gitlab-dev:~# gitlab-rake gitlab:env:info

System information
System:		Ubuntu 24.04
Proxy:		no
Current User:	git
Using RVM:	no
Ruby Version:	3.2.5
Gem Version:	3.5.23
Bundler Version:2.5.11
Rake Version:	13.0.6
Redis Version:	7.0.15
Sidekiq Version:7.2.4
Go Version:	unknown

GitLab information
Version:	17.7.0-ee
Revision:	1fd574ee571
Directory:	/opt/gitlab/embedded/service/gitlab-rails
DB Adapter:	PostgreSQL
DB Version:	14.11
URL:		https://gitlab-dev.ict.fit.cvut.cz
HTTP Clone URL:	https://gitlab-dev.ict.fit.cvut.cz/some-group/some-project.git
SSH Clone URL:	git@gitlab-dev.ict.fit.cvut.cz:some-group/some-project.git
Elasticsearch:	no
Geo:		no
Using LDAP:	yes
Using Omniauth:	yes
Omniauth Providers: azure_activedirectory_v2

GitLab Shell
Version:	14.39.0
Repository storages:
- default: 	unix:/var/opt/gitlab/gitaly/gitaly.socket
GitLab Shell path:		/opt/gitlab/embedded/service/gitlab-shell

Gitaly
- default Address: 	unix:/var/opt/gitlab/gitaly/gitaly.socket
- default Version: 	17.7.0
- default Git Version: 	2.47.0

Possible fixes

Responsible line: https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/app/helpers/admin/application_settings_helper.rb#L44

Code introduced in: !168903 (merged)

Workaround: Change /opt/gitlab/embedded/service/gitlab-rails/ee/app/helpers/admin/application_settings_helper.rb

        direct_code_suggestions_enabled: (!::Gitlab::CurrentSettings.disabled_direct_code_suggestions).to_s,