Skip to content

feat(UI): add multi-chat support for the UI#13

Merged
krisstern merged 10 commits intojenkinsci:mainfrom
giovanni-vaccarino:ui-multi-chat
Jun 25, 2025
Merged

feat(UI): add multi-chat support for the UI#13
krisstern merged 10 commits intojenkinsci:mainfrom
giovanni-vaccarino:ui-multi-chat

Conversation

@giovanni-vaccarino
Copy link
Copy Markdown
Contributor

@giovanni-vaccarino giovanni-vaccarino commented Jun 18, 2025

Description

This PR introduces the multi-chat UI support for the chatbot pllugin.

While the backend already allowed handling multiple conversations, the frontend lacked the support for this feature. This PR updates the previous user interface, allowing users to interact with multiple chat session. A welcome box has also been added to guide users when no chat session is active.


Screenshots ( taken on the chat panel)

Welcome screen

Screenshot from 2025-06-18 04-56-08

Multiple chat view

Screenshot from 2025-06-18 04-57-36


Testing done

  • Manually ran the plugin in a Jenkins instance
  • Created and switched between multiple chat sessions successfully
  • Checked welcome screen displays appropriately when no session is active
  • Tested UI message flow for multiple sessions

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Ensure you have provided tests that demonstrate the feature works or the issue is fixed

@giovanni-vaccarino giovanni-vaccarino requested a review from a team as a code owner June 18, 2025 03:09
Comment thread frontend/src/components/Chatbot.tsx Outdated
Comment thread frontend/src/components/Chatbot.tsx Outdated
@berviantoleo
Copy link
Copy Markdown
Contributor

General feedback.

  • I think we may need to support deleting the chat without opening it, and have delete icons in the list of chats.
  • Add a pop-up confirmation before deleting the chat.

Comment thread frontend/src/components/Chatbot.tsx Outdated
Comment thread frontend/src/api/chatbot.ts Outdated
Comment thread frontend/src/api/chatbot.ts
console.warn("No last session id found: setting the current session to the first item.");
return sessions[0].id;
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a simple cache here if we are gonna call this multiple times

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since in the Chabot component(which is the only point where I call the loadChatbotSessions or loadChatbotLastSessionId) the loaders are called only once when the component mounts, and unless the component is unmounted and mounted again(like on refresh) the loaders are not invoked again, I don't find the point of having the cache in this context.

Maybe you meant to use the cache as a way to avoid reading from session storage, replacing it at runtime for like refreshes. But in that case, the cache would need to be at least as persistent as session storage, and I'm not sure if we would gain any advantages by doing that.

Let me know if I've misunderstood something. Thanks anyway for the suggestion.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, fine! If loadChatbotSessions is called multiple times, then cache is preferable; no worries if it's only called once.

@krisstern krisstern merged commit 983661a into jenkinsci:main Jun 25, 2025
18 checks passed
@giovanni-vaccarino giovanni-vaccarino deleted the ui-multi-chat branch July 8, 2025 11:51
@berviantoleo berviantoleo added the enhancement For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted label Aug 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants