Draft: Fix: AI Panel Navigation display

What does this MR do and why?

This MR fixes the following Navigation Issues in the Side Panel:

  • Going from History back to Active Chat does not restore the Active Chat Session
  • Sessions title is restored when going from Active Chat back to Sessions

References

Related GitLab Issues: 1 - https://gitlab.com/gitlab-org/gitlab/-/issues/577821 2 - #575840

Screenshots or screen recordings

Before After
Screen_Recording_2025-11-04_at_1.20.08_PM Screen_Recording_2025-11-04_at_12.47.40_PM

How to set up and validate locally

  1. To test this locally, make sure you have the following FFs enabled: duo_workflow, duo_workflow_in_ci, ai_flow_triggers, paneled_view, global_topbar, tailwind_container_queries. After you can toggle New UI on in user's setting under the user's profile dropdown
  2. Open the side panel and open Sessions.
  3. Test navigation (see below for test cases)
  4. If you see no Sessions then run the following query bundle exec rake "gitlab:duo_workflow:populate[50,20,1,<<YOUR_TEST_GROUP_PATH/PROJECT_HERE>>]" to create new agent sessions. Refresh the page.

Navigation Testing

1) Side Panel - History

  1. In your side panel, navigate to the History tab and select an item in the list.
  2. Notice it loads in the active chat tab at the top of the side panel navigation.
  3. Immediately navigate to the Sessions tab (typically the last one).
  4. Validate title says Sessions.
  5. Navigate back to History, validate title says History.
  6. Navigate back to the active chat tab at the top, validate the title has been retained.

2) Side Panel - New

  1. After the above, navigate to the New chat tab. Validate title contains New.
  2. Navigate back to the active chat tab, validate title says GitLab Duo Chat and shows the new chat view.
  3. Navigate to History tab, click a history session item, notice it loads active chat with session title.
  4. Navigate back to New chat, and then back to the active chat - see that it loads only the new chat.

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 #577821

Edited by Lindsey Shelton

Merge request reports

Loading