Skip to content

Conversation

@ellisonbg
Copy link
Collaborator

@ellisonbg ellisonbg commented Oct 20, 2025

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

screenshot1

What you're seeing: The new empty chat interface with the modernized input field. Notice:

  • Clean, minimalist placeholder text: "Enter a chat message, @ to mention..."
  • New square send button with upward arrow icon in the bottom-right corner (currently disabled/grayed out since there's no text)
  • Removed the old attachment button and verbose button designs
  • No top border on the input area, creating a cleaner visual flow

Screenshot 2: Code Blocks and Message Display (Full View)

screenshot2

What you're seeing: A complete conversation showing multiple UI improvements:

  • User message bubble (top) shows the asymmetric design - your own messages appear without redundant headers or avatars
  • AI response (Jupyternaut) shows clean formatting with the avatar and timestamp on the left
  • Code block toolbar at the bottom-right of the code snippet demonstrates the new borderless design - notice there's no border above the toolbar icons (copy, insert above, insert below, replace cell buttons)
  • The input field at bottom shows the same clean design with the square send button

Screenshot 3: Attachment Preview (Input with File)

screenshot3

What you're seeing: The new attachment chip design in the input field:

  • Modern chip-style attachment showing "README.md" with a clean bordered design
  • Small "X" close button on the right side of the attachment chip for easy removal
  • The attachment has subtle background color and border styling
  • Blue square send button is now enabled (colored blue) since there's content to send
  • The attachment preview is integrated cleanly into the input area above the text field

Screenshot 4: Full Conversation with Attachment

screenshot4

What you're seeing: A complete view showing:

  • User's message bubble at the top displaying the question along with the attachment chip inline - the "README.md" file appears as a clean, bordered chip within the message
  • AI's detailed response from Jupyternaut below
  • The scroll indicator button in the bottom-right (circular button with down arrow) for navigating long conversations
  • Input field at the bottom showing the consistent clean design

Screenshot 5: Sidebar Chat View

screenshot5

What you're seeing: The chat interface in sidebar mode (narrower layout):

  • Demonstrates how the responsive design adapts to constrained spaces
  • Same clean message bubbles and code formatting work well in the sidebar
  • The layout intelligently adjusts spacing and sizing for the sidebar context
  • All UI improvements (code toolbar, message formatting, input design) remain consistent

Motivation & UX Benefits

1. Modernized Chat Input Design

The chat input has been completely redesigned with a focus on clarity and modern UX patterns:

  • Square send button with arrow icon: Follows modern messaging app conventions (similar to iMessage, WhatsApp, Slack), making the primary action immediately recognizable. The button is:
    • Grayed out/disabled when there's no content
    • Blue and enabled when there's text or attachments to send
  • Simplified button design: Replaced verbose buttons with clean icon buttons, reducing visual noise
  • Removed top border: Eliminated the border separating the input from the message area for a cleaner, more integrated feel
  • Better placeholder text: Clear instruction to "Enter a chat message, @ to mention..." guides users

2. Enhanced Attachment Experience

Attachments received significant UX improvements to make them more useful and visually appealing:

  • Modern chip-style design: Attachments now appear as clean, bordered chips with subtle background colors
  • Better visual hierarchy: Clear distinction between the filename and the close button
  • Improved remove functionality: Small, unobtrusive "X" button with hover states for easy removal
  • Inline display: Attachments appear both in the input area (before sending) and within sent messages as integrated chips
  • Tooltips: Full file paths shown on hover to help users understand what's attached

3. Cleaner Code Block Toolbar

  • Removed redundant border: Eliminated the border above code toolbars which created unnecessary visual separation and clutter
  • Consistent button styling: All toolbar buttons (copy, insert above, insert below, replace cell) use consistent icon button patterns
  • Better visual feedback: Improved hover and disabled states make button availability clearer

4. Improved Message Display

  • Asymmetric message headers: Your own messages no longer show redundant headers or avatars, creating a cleaner conversation flow similar to modern chat apps (iMessage, WhatsApp, Slack)
  • AI messages show full context: Messages from AI assistants (like Jupyternaut) include avatar and timestamp for clarity
  • Better visual hierarchy: Reduced clutter helps users focus on the actual content of conversations
  • Flexible layout: Support for different chat areas (main vs. sidebar) with appropriate spacing

5. Better Autocomplete Experience

Multiple improvements to the @ mention autocomplete functionality:

  • Simplified styling: Cleaner, more focused autocomplete dropdown
  • Fixed Enter key behavior: Pressing Enter now properly selects autocomplete items instead of submitting incomplete input
  • Multiple mentions support: Users can now use @ mentions anywhere in their message, not just at the start
  • Improved focus management: Better keyboard navigation and selection behavior

6. Responsive Design

  • Sidebar optimization: The chat interface works beautifully in both full-width and sidebar layouts
  • Adaptive spacing: Appropriate padding and margins adjust based on the chat area
  • Consistent experience: All improvements work seamlessly across different layout contexts

Technical Changes

  • Replaced custom tooltip button components with standard MUI Tooltip + IconButton/Button patterns
  • Modernized button styling using MUI sx prop with CSS variables for theme consistency
  • Added ChatArea type to track whether chat is in main area or sidebar
  • Improved focus and keyboard navigation throughout the input system
  • Enhanced attachment rendering with chip-style design
  • Streamlined CSS by moving inline and reducing custom classes
  • Removed custom MUI wrapper components (TooltippedButton, TooltippedIconButton, ContrastingTooltip)
  • Removed 58 lines from input.css and significantly simplified chat.css

Files Changed

  • 32 files changed: 814 insertions(+), 961 deletions(-)
  • Major refactoring of button components and styling
  • Simplified CSS architecture with better use of MUI theming

Accessibility Improvements

  • All buttons now have proper aria-label attributes
  • Tooltips provide context for icon-only buttons
  • Better keyboard navigation support
  • Clearer disabled states for better understanding of available actions
  • Improved contrast and visual feedback

Future Work

  • Message editing functionality is currently disabled (commented out) due to broken behavior and will be fixed in a follow-up PR
  • Stop button functionality is stubbed out and needs backend integration to halt AI response generation

@github-actions
Copy link
Contributor

Binder 👈 Launch a Binder on branch ellisonbg/jupyter-chat/ux-improvements

@Zsailer Zsailer added the enhancement New feature or request label Oct 23, 2025
@ellisonbg ellisonbg changed the title [WIP] Misc UI improvements. UX Improvements for Jupyter Chat Interface Oct 27, 2025
@ellisonbg ellisonbg marked this pull request as ready for review October 27, 2025 18:53
Copy link
Member

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)

Copy link
Collaborator Author

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?

@Zsailer
Copy link
Member

Zsailer commented Oct 28, 2025

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:

Screenshot 2025-10-27 at 8 42 03 PM

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants