Skip to content
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

feat(editor): Canvas chat UI & UX improvements #11924

Merged
merged 15 commits into from
Nov 29, 2024

Conversation

OlegIvaniv
Copy link
Contributor

@OlegIvaniv OlegIvaniv commented Nov 27, 2024

Summary

This PR introduces several improvements to the chat interface and workflow execution state handling

Changes

Chat UI Enhancements

  • Adjusted font sizes in the chat to better match the visual hierarchy
  • Reversed the color scheme of the chat button:
    • Now displays as filled-in red when closed
    • Changes to secondary color when open
  • Updated chat button text to "Hide chat" when the panel is open
  • Added a close button (x) to the right side of the chat panel, visible when the logs panel is not
  • Improved scroll behavior to automatically scroll to the bottom of the chat panel when new messages arrive
  • Fix allowedFilesMimeTypes property

Visual Improvements

  • Softened the background color of disabled node parameters

Workflow Execution and Loading State

  • Fixed the loading state to properly tie into the global workflow execution state
  • Enhanced chat logs to stream individual executions rather than waiting for the entire workflow to finish

Related Linear tickets, Github issues, and Community forum posts

Chat_wiki_stream.mov

Review / Merge checklist

  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with release/backport (if the PR is an urgent fix that needs to be backported)

• Enhance chat input and layout
• Add left panel slot to chat input
• Update chat button labels and styles
• Adjust font sizes and spacings
• Improve message history navigation
• Implement createExecutionPromise function
• Remove waitForExecution polling interval, add processResult
• Update isLoading state management
• Clean up unused code and imports
• Add close button to ChatMessagesPanel
• Implement showCloseButton prop
• Adjust header button styling
• Emit close event from ChatMessagesPanel
- Enhance chat title and session display
- Update disabled input background color
- AI run content block styling
- Adjust chat button appearance in node view
@n8n-assistant n8n-assistant bot added n8n team Authored by the n8n team ui Enhancement in /editor-ui or /design-system labels Nov 27, 2024
@OlegIvaniv OlegIvaniv marked this pull request as ready for review November 28, 2024 07:12
Copy link

codecov bot commented Nov 28, 2024

Copy link
Contributor

@MiloradFilipovic MiloradFilipovic left a comment

Choose a reason for hiding this comment

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

Nice! I left one really small nit in the comments and have two more visual things to note:

  1. Is the chat button meant to be transparent when chat is open? It looks confusing to me
    image
  2. Execution status notice that appears on chat hover seems out of place to me:
    execution_notice

@MiloradFilipovic
Copy link
Contributor

@OlegIvaniv unrelated to this PR: How hard would it be to stream back these steps when agent is used with different trigger (webhook, telegram, ...)?

@OlegIvaniv
Copy link
Contributor Author

OlegIvaniv commented Nov 29, 2024

Nice! I left one really small nit in the comments and have two more visual things to note:

  1. Is the chat button meant to be transparent when chat is open? It looks confusing to me
    image
  2. Execution status notice that appears on chat hover seems out of place to me:
    execution_notice

Thanks! Both should be addressed. Can you please re-review?

@OlegIvaniv
Copy link
Contributor Author

@OlegIvaniv unrelated to this PR: How hard would it be to stream back these steps when agent is used with different trigger (webhook, telegram, ...)?

Here we're relying on the websocket push events that we get in the editor like "afterNodeExecuted" so if we'd like to stream those, it should be doable by reusing some of the same logic

Copy link
Contributor

@MiloradFilipovic MiloradFilipovic left a comment

Choose a reason for hiding this comment

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

Thanks for addressing! I would love to see just a bit more of left padding for that notice icon so it's not so flush with text edge but feel free to ignore 🙌🏻

Copy link

cypress bot commented Nov 29, 2024

n8n    Run #8152

Run Properties:  status check passed Passed #8152  •  git commit 1174d28f26: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 OlegIvaniv 🗃️ e2e/*
Project n8n
Branch Review ai-474-chat-panel-improvements
Run status status check passed Passed #8152
Run duration 04m 31s
Commit git commit 1174d28f26: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 OlegIvaniv 🗃️ e2e/*
Committer Oleg Ivaniv
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 1
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 478
View all changes introduced in this branch ↗︎

Copy link
Contributor

✅ All Cypress E2E specs passed

@OlegIvaniv OlegIvaniv merged commit 1e25774 into master Nov 29, 2024
35 checks passed
@OlegIvaniv OlegIvaniv deleted the ai-474-chat-panel-improvements branch November 29, 2024 10:24
@github-actions github-actions bot mentioned this pull request Dec 4, 2024
@janober
Copy link
Member

janober commented Dec 4, 2024

Got released with [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
n8n team Authored by the n8n team Released ui Enhancement in /editor-ui or /design-system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants