[new ui] Switching to a thread in Duo Agentic Chat throws an error in console
Summary
The activeTab watcher, introduced in Add tests for the AI side rails toggle in agent... (!213066 - merged) throws a JS error in console
Steps to reproduce
- Have the Duo Chat in Agentic mode
- Open DevTools
- Open "Duo Chat history" tab in the new UI
- Click any of the threads
- Observe the JS error in console
- Observe that the input field isn't focused in the opened thread
Example Project
gitlab.com
What is the current bug behavior?
The JS error is thrown and the input field in the opened thread isn't focused
What is the expected correct behavior?
- No JS error
- the input field in the opened thread correctly is focused
Output of checks
Essentially, this watcher calls the focusInput method on the duo_agentic_chat component which expects the web-agentic-duo-chat component (the chat ref) to be available. But it's not at the time this watcher kicks in.
