Bug
In some cases, especially after a ChatPanel has been left inactive for a long time or after refreshing a long-open ChatPanel, the profile selector can show the wrong profile even though the panel's thread history and thread ID are correct.
A common example is an open panel whose thread belongs to an external agent node: the displayed history and thread ID correspond to that external-agent thread, but the profile selector below incorrectly displays chat.
Expected behavior
The profile selector should be derived from the currently active thread/panel context and should display the profile associated with that thread. Refreshing or resuming an idle panel must not replace the selected profile with a stale or default value.
Actual behavior
The ChatPanel can show the correct external-agent thread history and thread ID while the profile selector displays chat, producing an inconsistent UI state and making it unclear which profile will be used for the next action.
Conditions observed
- ChatPanel has been open and inactive for an extended period.
- A long-open ChatPanel is refreshed.
- The panel contains a long thread history.
- The active thread belongs to an external agent node.
Investigation notes
Please trace profile selection and synchronization across ChatPanel refresh/resume, thread hydration, thread switching, and external-agent thread loading. Check for stale closure/state, default-profile fallback, or an update ordering/race where thread metadata arrives after the selector state is initialized.
Acceptance criteria
- The profile selector consistently matches the active thread's profile after refresh, resume, and thread switching.
- External-agent threads never fall back visually to
chat when their thread metadata identifies another profile.
- Existing thread history, thread ID, draft persistence, and profile switching behavior remain intact.
- Add regression coverage for a refreshed/rehydrated long-lived panel and an external-agent thread.
Bug
In some cases, especially after a ChatPanel has been left inactive for a long time or after refreshing a long-open ChatPanel, the profile selector can show the wrong profile even though the panel's thread history and thread ID are correct.
A common example is an open panel whose thread belongs to an external agent node: the displayed history and thread ID correspond to that external-agent thread, but the profile selector below incorrectly displays
chat.Expected behavior
The profile selector should be derived from the currently active thread/panel context and should display the profile associated with that thread. Refreshing or resuming an idle panel must not replace the selected profile with a stale or default value.
Actual behavior
The ChatPanel can show the correct external-agent thread history and thread ID while the profile selector displays
chat, producing an inconsistent UI state and making it unclear which profile will be used for the next action.Conditions observed
Investigation notes
Please trace profile selection and synchronization across ChatPanel refresh/resume, thread hydration, thread switching, and external-agent thread loading. Check for stale closure/state, default-profile fallback, or an update ordering/race where thread metadata arrives after the selector state is initialized.
Acceptance criteria
chatwhen their thread metadata identifies another profile.