Skip to content

Conversation

@autologie
Copy link
Contributor

@autologie autologie commented Oct 31, 2025

Summary

This PR fixes several outstanding UI bugs in chat:

  • While sending chat message, wrong model selection is shown in the header
  • The agent's avatar icon next to the message is incorrect until you refresh the browser
  • When opening an old conversation, UI doesn't scroll to the bottom, also has unintentional animation effect
  • "Scroll to the bottom" is shown when the screen is high enough to show the whole conversation without scrolling

Related Linear tickets, Github issues, and Community forum posts

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)

messageId: ChatMessageId;
previousMessageId: ChatMessageId | null;
retryOfMessageId: ChatMessageId | null;
executionId: number | null;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This has no effect in this PR, but along with changes in #21393 this makes it possible to show the link to execution in the chat message action without refreshing the browser.

Copy link
Contributor

Choose a reason for hiding this comment

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

On base llm models the execution gets deleted right after the streaming is done, we should make sure we don't show those execution links as user won't be able to follow them 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, we'll show it for n8n workflow agent only.

Copy link
Contributor

Choose a reason for hiding this comment

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

(when the execution gets deleted the column also gets set to NULL on the db)

const b = messagesGraph[second];

// TODO: Disabled for now, messages retried don't get this at the FE before reload
// TOOD: Do we even need runIndex at all?
Copy link
Contributor Author

Choose a reason for hiding this comment

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

runIndex is already removed


const messages = linkMessages(Object.values(conversation.messages));

// TOOD: Do we need 'state' column at all?
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Turned out that we need the state column 😄

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah I made it actually somewhat accurate last week

@bundlemon
Copy link

bundlemon bot commented Oct 31, 2025

BundleMon

Unchanged files (2)
Status Path Size Limits
WASM Dependencies
tree-sitter-bash.wasm
181.26KB -
WASM Dependencies
tree-sitter.wasm
74.47KB -

No change in files bundle size

Groups updated (2)
Status Path Size Limits
**/*.js
5.89MB (+477.05KB +8.6%) -
**/*.css
218.13KB (+4.87KB +2.28%) -

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

@autologie autologie marked this pull request as ready for review October 31, 2025 08:34
@codecov
Copy link

codecov bot commented Oct 31, 2025

@autologie autologie requested a review from Cadiac October 31, 2025 08:36
@n8n-assistant n8n-assistant bot added core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team labels Oct 31, 2025
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

2 issues found across 8 files

Prompt for AI agents (all 2 issues)

Understand the root cause of the following 2 issues and fix them.


<file name="packages/frontend/editor-ui/src/features/ai/chatHub/chat.store.ts">

<violation number="1" location="packages/frontend/editor-ui/src/features/ai/chatHub/chat.store.ts:297">
onBeginMessage adds a duplicate session entry for every stream start. Guard against pushing when the session already exists to avoid duplicating chats in the sidebar.</violation>
</file>

<file name="packages/frontend/editor-ui/src/features/ai/chatHub/ChatView.vue">

<violation number="1" location="packages/frontend/editor-ui/src/features/ai/chatHub/ChatView.vue:186">
The new auto-scroll guard should only follow the streaming prompt when the streaming session matches this view; otherwise the fallback never runs and conversation history stays scrolled away from the latest messages if another chat is actively streaming.</violation>
</file>

React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.

Copy link
Contributor

@Cadiac Cadiac left a comment

Choose a reason for hiding this comment

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

🚀

@currents-bot
Copy link

currents-bot bot commented Oct 31, 2025

E2E Tests: n8n tests passed after 7m 22.4s

🟢 584 · 🔴 0 · ⚪️ 12 · 🟣 1

View Run Details

Run Details

  • Project: n8n

  • Groups: 2

  • Framework: Playwright

  • Run Status: Passed

  • Commit: 92ca527

  • Spec files: 96

  • Overall tests: 596

  • Duration: 7m 22.4s

  • Parallelization: 8

Groups

GroupId Results Spec Files Progress
ui 🟢 529 · 🔴 0 · ⚪️ 12 · 🟣 1 89 / 89
ui:isolated 🟢 55 · 🔴 0 · ⚪️ 0 7 / 7


This message was posted automatically by currents.dev | Integration Settings

@autologie autologie merged commit c46d121 into master Oct 31, 2025
86 of 87 checks passed
@autologie autologie deleted the chat-ui-bugs branch October 31, 2025 09:56
@n8n-assistant
Copy link

n8n-assistant bot commented Nov 3, 2025

Got released with [email protected]

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

Labels

core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team Released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants