-
-
Couldn't load subscription status.
- Fork 16
UX Improvements for Jupyter Chat Interface #298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible to keep this attach button? So it's available to extension authors making use of the @jupyter/chat package.
Also some applications may still need this button when drag-and-drop is not possible, or in the case of Notebook 7 (which does not show the filebrowser on the notebook page)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good callout, I do think the attach button is important for the reasons you mention. The reason I disabled it4 (just for now) was that the file picker UI (last time I used it) had a number of usability and styling issues that made it sort of broken. Do you know 1) where that file picker component lives?, 2) if its design and behavior has been improved?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's actually quite fine when testing with http://jtpio.github.io/pydata-paris-2025/lab :
jupyterlite-ai-filepicker.mp4
I think there were some fixes in the recent JupyterLab 4.5 pre-releases (which this demo uses).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know 1) where that file picker component lives?, 2) if its design and behavior has been improved?
@martinRenou fixed some issues related to the file picker in jupyterlab/jupyterlab#17737 and jupyterlab/jupyterlab#17844
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you see any other issue with it, I can have a look. But yeah it should work much better now.
|
This looks fantastic! The UX improvements are really significant – I especially appreciate the cleaner message display with asymmetric headers and the bubble indicator for user messages. It's much more familiar for a chat interface and streamlines the visual hierarchy nicely. I also really like the change to @-mentions – switching from the pill UI to bolded text is a huge improvement. It's similar to GitHub's UX and much cleaner. The pill UI always felt cluttered, and the colors never worked well across light/dark modes. This is much better. I noticed this isn't mentioned in the top comment, but here's an example of it in action:
I'd love to see this merged ASAP so we can showcase it at JupyterCon next week. The timing would be perfect. Great work @ellisonbg! |
|
I'm not able to edit a message anymore. Is this expected or only on my side ?
EDIT: just found that the button is commented https://github.com/jupyterlab/jupyter-chat/pull/298/files#diff-e344709a04ca086f69b0d5547c28b881f7396fc8824a76a091e28abe35fee092R19 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ellisonbg, I love this new design.
This tooltipped button was quite convenient for the toolbar buttons, to ensure that buttons added by external extensions keep the same style, and also of course to handle tooltips (it doesn't work anymore on my side, on enabled and disabled buttons).
I would be nice to keep it and depend on it with the new buttons.
| }); | ||
| buttons.push(editButton); | ||
| } | ||
| // if (props.edit !== undefined) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should restore this edit button
| const registry = new InputToolbarRegistry(); | ||
|
|
||
| // TODO: Re-enable stop button once logic is fully implemented | ||
| // registry.addItem('stop', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want the stop button to be by default in the toolbar, or should we let extensions with LLM include it ?
| /** | ||
| * The chat model. Provides access to messages, writers, and other chat state. | ||
| */ | ||
| chatModel?: IChatModel; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The IInputModel contains a chat context, which provides some of the attributes and methods from the chat model. We could extends this context to provide the current writers, if this is required for the StopButton.
You can find some context about this at #190 (comment).
| ))} | ||
| </Box> | ||
| </Box> | ||
| <InputWritingIndicator writers={writers} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any benefit of including the writing indicator component in the input component, instead of having it as sibling ?
The input component is also used when editing a message, for example, and we won't use the writing indicator in this context.
| label={input.length > 2 ? helperText : ' '} | ||
| /> | ||
| > | ||
| <AttachmentPreviewList |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't know why but I'm not able to open an attachment from the input.
It used to be possible AFAIK, and it is still possible for an attachment in the message (after sending it).
| margin-top: 0; | ||
| } | ||
|
|
||
| .jp-chat-writers { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any benefit of using embedded style instead of CSS (for static style) ?
I often find it difficult to debug, and to find out where a property come from.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need a new button ?
Currently we use the send button for the same action AFAIU, with a way to customize the function called when clicking it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This button should probably never be visible with the Send button, they do similar actions.


UX Improvements for Jupyter Chat Interface
Summary
This PR introduces a comprehensive set of user experience improvements to the Jupyter Chat interface, focusing on visual clarity, usability, and modernization. The changes streamline the chat interaction patterns, reduce visual clutter, and create a more polished, professional appearance throughout the application.
Screenshots
Screenshot 1: Clean Input State
What you're seeing: The new empty chat interface with the modernized input field. Notice:
Screenshot 2: Code Blocks and Message Display (Full View)
What you're seeing: A complete conversation showing multiple UI improvements:
Screenshot 3: Attachment Preview (Input with File)
What you're seeing: The new attachment chip design in the input field:
Screenshot 4: Full Conversation with Attachment
What you're seeing: A complete view showing:
Screenshot 5: Sidebar Chat View
What you're seeing: The chat interface in sidebar mode (narrower layout):
Motivation & UX Benefits
1. Modernized Chat Input Design
The chat input has been completely redesigned with a focus on clarity and modern UX patterns:
2. Enhanced Attachment Experience
Attachments received significant UX improvements to make them more useful and visually appealing:
3. Cleaner Code Block Toolbar
4. Improved Message Display
5. Better Autocomplete Experience
Multiple improvements to the @ mention autocomplete functionality:
6. Responsive Design
Technical Changes
Tooltip+IconButton/Buttonpatternssxprop with CSS variables for theme consistencyChatAreatype to track whether chat is in main area or sidebarTooltippedButton,TooltippedIconButton,ContrastingTooltip)Files Changed
Accessibility Improvements
aria-labelattributesFuture Work