Add 'New' badge to work items nav item

What does this MR do and why?

This MR adds a "New" badge to the Work Items navigation menu.

  • Adds a blue info badge displaying "New" next to "Work Items" in the sidebar navigation
  • The badge automatically dismisses after users visit the work items page for the first time
  • The badge disappears after April 4, 2026
  • Includes tooltip text explaining "Issues are now work items" (or "Epics and issues are now work items" for groups with epics license)

Backend Changes

  • Added work_items_nav_badge callout to Users::Callout model for tracking dismissal
  • Updated WorkItemsMenu in both groups and projects sidebars to include badge data
  • Added controller logic to dismiss the badge when users visit work items index pages

Frontend Changes

  • nav_item.vue component can render badges with tooltips
  • Badge displays conditionally based on backend data

References

#586896 (closed)

Screenshots or screen recordings

Before After

😥 No badge

Screenshot 2026-02-03 at 9.14.05 PM.png

🆕 Badge and tooltip

work_items_project.gif

work_items_group.gif

How to set up and validate locally

Scenario 1: Badge shows on first visit

  1. Ensure the work_items_saved_views feature flag is enabled for your user
  2. Navigate to a group or project
  3. Look for the "Work Items" menu item
  4. Confirm the "New" badge appears next to "Work Items"
  5. Hover over the badge
  6. Tooltip shows "Issues are now work items." (or "Epics and issues are now work items." for groups with epics)

Scenario 2: Badge dismisses after visiting work items page

  1. Follow Scenario 1 setup to ensure badge is showing
  2. Click on "Work Items" in the sidebar
  3. Navigate back to another page (e.g., Projects, Groups)
  4. Open the super sidebar again
  5. Expected: The "New" badge no longer appears

Note: You can re-enable the badge to appear after this by doing this in your rails console user = User.find_by(username: 'your-username') and then user.callouts.where(feature_name: 'work_items_nav_badge').destroy_all

Scenario 3: Badge does not appear after April 4, 2026

  1. Change your current date on line 11 in lib/sidebars/concerns/show_work_items_badge.rb to be after April 4, 2026
  2. Navigate to a group or project
  3. No "New" badge appears

Scenario 4: Badge shows for both groups and projects

  1. Navigate to a group
  2. Expected: Badge shows before first visit, dismisses after
  3. Destroy your callout
  4. Navigate to /your-namespace/your-project/-/work_items
  5. Expected: Badge shows before first visit, dismisses after

Note: Dismissing on one group or project dismisses for all locations since it's a user level callout

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 #586896 (closed)

Edited by Joanna Niemczyk

Merge request reports

Loading