Close test coverage gap in AI sidebar panel
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Work on this issue](https://contributors.gitlab.com/manage-issue?action=work&projectId=278964&issueIid=594427) - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=594427) </details> <!--IssueSummary end--> ## Overview Extend the [existing agentic chat feature specs](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/spec/support/shared_examples/ai/agentic_chat_shared_example.rb) to cover two regressions that recently caused incidents in Duo Agentic Chat. ## Test Coverage Requirements The tests should cover the following use cases: #### Persist panel visibility after GitLab Duo chat is disabled 1. The AI panel remembers when the user opens or closes the AI panel after a page reload. 2. User disables GitLab Duo. When GitLab Duo is disabled, the chat panel is still visible and it displays an empty state for users capable of re-enable GitLab Duo. 3. The user collapses GitLab Duo panel. 4. The user reloads the page. 5. The panel stays collapsed. #### Start a new conversation when an existing thread is loaded 1. The user loads a chat thread from the history panel. 2. The user selects the "New chat" button in the sidebar panel. 3. The user selects an agent. 4. The chat panel starts a new thread with the selected agent. ### Implementation guidelines There are feature specs for the AI sidebar panel implemented in [/ee/spec/support/shared_examples/ai/agentic_chat_shared_example.rb](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/spec/support/shared_examples/ai/agentic_chat_shared_example.rb). Let's expand these tests to cover the behaviors described in the test coverage requirements.
issue