Remove homepage_merge_requests_widget feature flag

What does this MR do and why?

Removes the homepage_merge_requests_widget feature flag and the code it gated, now that the flag is enabled for 100% of GitLab.com. The merge requests widget on the personal homepage becomes unconditional.

Per the feature flag removal guidance, all references and the YAML definition are removed in a single merge request. The multi-milestone expand-and-contract pattern does not apply here: the flag gated only frontend rendering, not a data write, a cache key or a state transition.

Who is affected

  • GitLab.com: no visible change. The flag is already enabled for everyone, so the page renders exactly as it does today.
  • GitLab Self-Managed and Dedicated: the flag was disabled by default, so this merge request is what releases the feature there. The merge requests widget appears on the personal homepage, and the four count cards are removed.

What was removed

  • Feature flag
    • The YAML definition.
    • The push_frontend_feature_flag calls in app/controllers/root_controller.rb and app/controllers/dashboard_controller.rb.
  • The four count cards
    • The four <user-items-count-widget> usages in homepage_app.vue, along with all their supporting props, computed properties, click handlers and error state.
    • The user_items_count_widget.vue component and its spec.
    • The two GraphQL query files merge_requests_widget_metadata.query.graphql and work_items_widget_metadata.query.graphql, and their spec mocks.
    • The four dashboard path keys in app/controllers/concerns/homepage_data.rb and the matching props in index.js.
    • The duplicated createUserCountsManager and fetchUserCounts calls. The super sidebar's own user_counts.vue already makes them on every signed-in page.
  • Also now unused
    • The duoCodeReviewBotUsername provide, inject and controller key, which existed only to supply a variable to one of the deleted queries.
    • The concern's private duo_code_review_bot_username method, which duplicated the one in MergeRequestsHelper that the concern already includes.
    • The redundant Gitlab::Utils::StrongMemoize include, which the concern was also getting through that helper.
    • The three tracking constants TRACKING_LABEL_MERGE_REQUESTS, TRACKING_LABEL_WORK_ITEMS and TRACKING_PROPERTY_AUTHORED_BY_YOU.

The diff is roughly 21 insertions against 1183 deletions across 17 files. locale/gitlab.pot was regenerated.

Not included: the page layout is unchanged. With the card row gone, the left column now begins at the pick-up, to-do and activity widgets. Whether the grid itself should change is a design question against the Figma reflow frames, and is deliberately left out of this merge request.

Screenshots or screen recordings

Screenshots of the changes can be found in the implementation MRs (while the feature flag was OFF):

Then the feature flag has been fully enabled in production: #631474 (comment 3937465367)

Currently on master:

current master: flag OFF current master: flag ON
image.png image.png

How to set up and validate locally

  1. Check out this branch and visit / as a signed-in user.
  2. Confirm the four count cards ("Merge requests / Waiting for your review", "Merge requests / Assigned to you", "Work items / Assigned to you", "Work items / Authored by you") are gone, and that the merge requests widget renders.
  3. Repeat on /dashboard/home and confirm the same result.
  4. In the browser network tab, confirm no request is made for the mergeRequestsWidgetMetadata or workItemsWidgetMetadata queries.
  5. Run the frontend specs: yarn jest spec/frontend/homepage
  6. Run the backend specs: bundle exec rspec spec/requests/dashboard/homepage_spec.rb spec/controllers/concerns/homepage_data_spec.rb spec/views/root/_index.html.haml_spec.rb

On this branch the results were 336 frontend tests passing and 37 RSpec examples passing.

Edited by Marco Tomasi

Merge request reports

Loading
Loading