Scope agent_plan FF check to root ancestor

What does this MR do and why?

Anchor the agent_plan feature flag check to the root ancestor of the resource_parent instead of the resource_parent itself.

Before, the flag was checked against the resource_parent directly, which would have rolled the feature out per project or per group. With this change, enabling the flag on a top-level group propagates the widget to every container underneath it.

References

https://gitlab.com/gitlab-org/gitlab/-/work_items/598408+

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading