Skip to content

Add widget for branch push event to the homepage

Summary

This issue tracks the implementation of a new "Pick up where you left off" widget on the homepage that displays recent branch push events and provides users with the option to create merge requests directly from the homepage.

Background

Currently, there is a success alert that appears on other "dashboard" pages when a user pushes a new branch from their local environment. Instead of reusing the same alert with = render "projects/last_push", we should thoughtfully integrate this functionality into the homepage experience.

User Experience

  • Users see a dedicated section titled "Pickup where you left off"
  • The widget shows the most recent branch push with project context
  • Users can create a merge request directly or dismiss the notification
  • The widget integrates seamlessly with the existing homepage layout

Acceptance Criteria

  • Widget appears on homepage after pushing a new branch
  • Widget displays correct project name, branch name, and timestamp
  • "Create merge request" button works when user has permissions
  • Dismiss functionality hides the widget
  • Widget handles edge cases gracefully (missing data, permissions, etc.)
  • Frontend tests cover all component functionality
  • Backend tests cover data preparation and error handling

Technical Notes

  • Uses existing user.recent_push data
  • Leverages existing show_last_push_widget? and create_mr_button? logic
  • Includes comprehensive error handling for repository access issues
  • Maintains consistency with existing GitLab UI patterns
Edited by Konstantin Greif