Skip to content

fix(lightspeed): disable model selector when chat session is active#3683

Closed
its-mitesh-kumar wants to merge 1 commit into
redhat-developer:mainfrom
its-mitesh-kumar:fix/lightspeed-RHDHBUGS-3313-disable-model-selector-active-chat
Closed

fix(lightspeed): disable model selector when chat session is active#3683
its-mitesh-kumar wants to merge 1 commit into
redhat-developer:mainfrom
its-mitesh-kumar:fix/lightspeed-RHDHBUGS-3313-disable-model-selector-active-chat

Conversation

@its-mitesh-kumar

Copy link
Copy Markdown
Member

Description

Disable the model selector in the Lightspeed chat footer when a chat session already has messages. Previously, switching models mid-conversation would open a new chat, fragmenting the user experience. Now the selector is disabled once a message has been sent, and a tooltip explains: "Each chat session supports only one model. To switch models, open a new chat."

Root cause

The MessageBarModelSelector component in the message bar footer was only disabled during streaming (isSendButtonDisabled). Its onSelect handler called onNewChat() unconditionally, creating a new conversation whenever the model was changed — even in an active chat session.

Fixed

  • RHDHBUGS-3313 — Lightspeed: Switching model in an active conversation incorrectly opens a new chat

Checklist

  • A changeset describing the change and affected packages. (more info)
  • Added or Updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes)

Made with Cursor

Fixes: https://redhat.atlassian.net/browse/RHDHBUGS-3313
Signed-off-by: its-mitesh-kumar <itsmiteshkumar98@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@rhdh-gh-app

rhdh-gh-app Bot commented Jul 3, 2026

Copy link
Copy Markdown

Changed Packages

Package Name Package Path Changeset Bump Current Version
@red-hat-developer-hub/backstage-plugin-lightspeed workspaces/lightspeed/plugins/lightspeed patch v2.9.1

@sonarqubecloud

sonarqubecloud Bot commented Jul 3, 2026

Copy link
Copy Markdown

@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 71.42857% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.28%. Comparing base (d69d6d6) to head (d389040).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3683   +/-   ##
=======================================
  Coverage   54.28%   54.28%           
=======================================
  Files        2347     2347           
  Lines       89650    89657    +7     
  Branches    25020    25027    +7     
=======================================
+ Hits        48666    48671    +5     
- Misses      39456    39457    +1     
- Partials     1528     1529    +1     
Flag Coverage Δ *Carryforward flag
adoption-insights 83.70% <ø> (ø) Carriedforward from d69d6d6
ai-integrations 68.35% <ø> (ø) Carriedforward from d69d6d6
app-defaults 69.79% <ø> (ø) Carriedforward from d69d6d6
augment 46.39% <ø> (ø) Carriedforward from d69d6d6
boost 74.68% <ø> (ø) Carriedforward from d69d6d6
bulk-import 72.46% <ø> (ø) Carriedforward from d69d6d6
cost-management 14.10% <ø> (ø) Carriedforward from d69d6d6
dcm 61.81% <ø> (ø) Carriedforward from d69d6d6
extensions 61.53% <ø> (ø) Carriedforward from d69d6d6
global-floating-action-button 71.18% <ø> (ø) Carriedforward from d69d6d6
global-header 59.71% <ø> (ø) Carriedforward from d69d6d6
homepage 50.23% <ø> (ø) Carriedforward from d69d6d6
install-dynamic-plugins 56.77% <ø> (ø) Carriedforward from d69d6d6
konflux 91.49% <ø> (ø) Carriedforward from d69d6d6
lightspeed 68.82% <71.42%> (+<0.01%) ⬆️
mcp-integrations 85.46% <ø> (ø) Carriedforward from d69d6d6
orchestrator 39.47% <ø> (ø) Carriedforward from d69d6d6
quickstart 65.63% <ø> (ø) Carriedforward from d69d6d6
sandbox 79.56% <ø> (ø) Carriedforward from d69d6d6
scorecard 82.67% <ø> (ø) Carriedforward from d69d6d6
theme 61.26% <ø> (ø) Carriedforward from d69d6d6
translations 7.25% <ø> (ø) Carriedforward from d69d6d6
x2a 78.68% <ø> (ø) Carriedforward from d69d6d6

*This pull request uses carry forward flags. Click here to find out more.


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d69d6d6...d389040. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@its-mitesh-kumar

Copy link
Copy Markdown
Member Author

Closing this as its Test PR by redhat-developer/rhdh-skill#54

@its-mitesh-kumar its-mitesh-kumar deleted the fix/lightspeed-RHDHBUGS-3313-disable-model-selector-active-chat branch July 4, 2026 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant