Skip to content

Chat panel model dropdown doesn't update in real-time when models are enabled in Configuration #16

Open
@nehmetohmedb

Description

@nehmetohmedb

Problem

When a user enables a new model in the Configuration panel (Configuration.tsx), the model doesn't immediately appear in the chat panel dropdown. The user has to refresh the screen to see the newly enabled model.

Current Behavior

  1. User opens Configuration → Models tab
  2. User enables a new model
  3. User goes back to chat panel
  4. Model dropdown still shows old list of models
  5. User must refresh the page to see the new model

Expected Behavior

When a model is enabled/disabled in the Configuration panel, the chat panel model dropdown should immediately reflect the change without requiring a page refresh.

Technical Details

  • Affected files:

    • src/frontend/src/components/Configuration/Configuration.tsx (line 364 - ModelConfiguration)
    • src/frontend/src/components/Chat/WorkflowChat.tsx (lines 265-290 - model fetching)
    • src/frontend/src/components/Chat/ChatPanel.tsx
  • Root cause: The WorkflowChat component fetches models only on mount (useEffect line 266) and doesn't listen for model configuration changes

Proposed Solution

Implement real-time synchronization between Configuration and Chat components:

  1. Add a global state management for model updates (Zustand store)
  2. Update ModelConfiguration to trigger model refresh when changes are made
  3. Update WorkflowChat to listen for model configuration changes
  4. Alternatively, use a custom event system for component communication

Acceptance Criteria

  • Enabling a model in Configuration immediately updates chat dropdown
  • Disabling a model in Configuration immediately removes it from chat dropdown
  • No page refresh required
  • Model changes persist across component navigation
  • Performance impact is minimal

Priority

Medium - UX improvement that affects user workflow efficiency

Labels

  • bug
  • frontend
  • models
  • ux-improvement

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions