Add work_item_features_field FF for notes and fix flaky spec
What does this MR do and why?
This MR aims to fix the flaky user_uses_quick_actions spec.
Context
In the test environment all feature flags are enabled by default, so work_item_features_field is on.
With the flag on, work_item_notes.vue fetches and writes the notes list under workItem.features, but addDiscussionToCache in work_item_add_note.vue read workItemNotesByIidQuery without passing useWorkItemFeatures.
The read therefore resolved the widgets branch of the query, found nothing, and returned early, so the newly created note was silently never written to the cache.
So workItemNoteCreated subscription is the only way for the comment to reach the list.
Why can't I reproduce on gdk on web with manual testing ??
A subscription that fires before the subscription is registered is lost(race condition) and subscribeToMore is skipped while hasNextPage is true, so the note sometimes never arrived and Capybara failed with Unable to find css "li.note" after the full 30 second timeout.
References
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
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.
Related to https://gitlab.com/gitlab-org/quality/test-failure-issues/-/work_items/43757