Duo Chat panel reopens on page reload even when user closed it (regression)

Observed in MR !215745 (merged) discussion (note: !215745 (comment 2946367809)).

Summary: Duo Chat panel is always opened on page reload even if a user previously closed it. This appears to be a regression introduced by recent changes (likely related to this.showPanel() and default panelVisible: true).

Steps to reproduce:

  1. Open GitLab page with Duo Chat.
  2. Close the Duo Chat panel.
  3. Reload the page.

Actual result:

  • Duo Chat panel is visible again after reload (ignores user's closed state).

Expected result:

  • Duo Chat panel should remain closed after reload if the user closed it.

Additional notes:

  • Mentioned in MR !215745 (merged) discussion by @dmishunov.
  • Potential culprit: this.showPanel() combined with default panelVisible: true.
  • Needs investigation to confirm root cause and preserve user preference when toggling/hiding the panel.

References:

Please triage and assign to the appropriate frontend/AI UI owner for investigation.

Edited by 🤖 GitLab Bot 🤖