[PR #22039] perf(editor): Render chat sidebar faster (no-changelog) #22006

Open
opened 2025-11-20 06:22:31 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/n8n-io/n8n/pull/22039
Author: @autologie
Created: 11/19/2025
Status: 🔄 Open

Base: masterHead: conversation-list-pagination


📝 Commits (9)

  • c293ba3 change error message styling
  • 9e9ca96 cleanup
  • a96733b feat: paginate conversation list
  • 7c091a9 refactor
  • 6431e1e fix: reset sessionsLoadingMore when request fails
  • 23685a0 fix query and add integration tests
  • c08554c specify null handling explicitly
  • c5293c1 change the approach of null handling
  • a836a80 fix string literal quotation for postgres

📊 Changes

15 files changed (+464 additions, -97 deletions)

View changed files

📝 packages/@n8n/api-types/src/chat-hub.ts (+10 -1)
📝 packages/@n8n/api-types/src/index.ts (+1 -0)
📝 packages/cli/src/modules/chat-hub/__tests__/chat-hub.service.integration.test.ts (+178 -7)
📝 packages/cli/src/modules/chat-hub/chat-hub.controller.ts (+4 -1)
📝 packages/cli/src/modules/chat-hub/chat-hub.service.ts (+30 -18)
📝 packages/cli/src/modules/chat-hub/chat-session.repository.ts (+29 -5)
📝 packages/frontend/editor-ui/src/features/ai/chatHub/ChatView.vue (+8 -8)
📝 packages/frontend/editor-ui/src/features/ai/chatHub/chat.api.ts (+9 -1)
📝 packages/frontend/editor-ui/src/features/ai/chatHub/chat.store.ts (+77 -27)
📝 packages/frontend/editor-ui/src/features/ai/chatHub/components/AgentEditorModal.vue (+1 -1)
📝 packages/frontend/editor-ui/src/features/ai/chatHub/components/ChatMessage.vue (+8 -4)
📝 packages/frontend/editor-ui/src/features/ai/chatHub/components/ChatSessionMenuItem.vue (+25 -5)
📝 packages/frontend/editor-ui/src/features/ai/chatHub/components/ChatSidebarContent.vue (+38 -4)
packages/frontend/editor-ui/src/features/ai/chatHub/components/SkeletonMenuItem.vue (+46 -0)
packages/frontend/editor-ui/src/features/ai/chatHub/composables/useAgent.ts (+0 -15)

📄 Description

Summary

This PR improves chat sidebar performance by introducing pagination of the conversation list and optimizing the UI logic for rendering to reduce dependent API responses. Also adds skeleton to provide clear feedback to users while loading.

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)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/n8n-io/n8n/pull/22039 **Author:** [@autologie](https://github.com/autologie) **Created:** 11/19/2025 **Status:** 🔄 Open **Base:** `master` ← **Head:** `conversation-list-pagination` --- ### 📝 Commits (9) - [`c293ba3`](https://github.com/n8n-io/n8n/commit/c293ba32cf187a067b6a1e41f99f650a4110609d) change error message styling - [`9e9ca96`](https://github.com/n8n-io/n8n/commit/9e9ca96896a8eaf7ae7ec09b50be5f656186cced) cleanup - [`a96733b`](https://github.com/n8n-io/n8n/commit/a96733bd08de4ed1af5742d30fd31d9989b493b5) feat: paginate conversation list - [`7c091a9`](https://github.com/n8n-io/n8n/commit/7c091a9e6e42e686dcf5c77a7d21046ca4fd1246) refactor - [`6431e1e`](https://github.com/n8n-io/n8n/commit/6431e1ea10581efe9c680c5b3ddc8861c14fab32) fix: reset sessionsLoadingMore when request fails - [`23685a0`](https://github.com/n8n-io/n8n/commit/23685a0be5efc885f8963a6fa7048d700f46bfd0) fix query and add integration tests - [`c08554c`](https://github.com/n8n-io/n8n/commit/c08554ca4ae3a74071256f66f780fa61a421d3a8) specify null handling explicitly - [`c5293c1`](https://github.com/n8n-io/n8n/commit/c5293c14e7b560d5a37603c385f600605ffe607b) change the approach of null handling - [`a836a80`](https://github.com/n8n-io/n8n/commit/a836a808de259925bee83b773ddf2defc522a46e) fix string literal quotation for postgres ### 📊 Changes **15 files changed** (+464 additions, -97 deletions) <details> <summary>View changed files</summary> 📝 `packages/@n8n/api-types/src/chat-hub.ts` (+10 -1) 📝 `packages/@n8n/api-types/src/index.ts` (+1 -0) 📝 `packages/cli/src/modules/chat-hub/__tests__/chat-hub.service.integration.test.ts` (+178 -7) 📝 `packages/cli/src/modules/chat-hub/chat-hub.controller.ts` (+4 -1) 📝 `packages/cli/src/modules/chat-hub/chat-hub.service.ts` (+30 -18) 📝 `packages/cli/src/modules/chat-hub/chat-session.repository.ts` (+29 -5) 📝 `packages/frontend/editor-ui/src/features/ai/chatHub/ChatView.vue` (+8 -8) 📝 `packages/frontend/editor-ui/src/features/ai/chatHub/chat.api.ts` (+9 -1) 📝 `packages/frontend/editor-ui/src/features/ai/chatHub/chat.store.ts` (+77 -27) 📝 `packages/frontend/editor-ui/src/features/ai/chatHub/components/AgentEditorModal.vue` (+1 -1) 📝 `packages/frontend/editor-ui/src/features/ai/chatHub/components/ChatMessage.vue` (+8 -4) 📝 `packages/frontend/editor-ui/src/features/ai/chatHub/components/ChatSessionMenuItem.vue` (+25 -5) 📝 `packages/frontend/editor-ui/src/features/ai/chatHub/components/ChatSidebarContent.vue` (+38 -4) ➕ `packages/frontend/editor-ui/src/features/ai/chatHub/components/SkeletonMenuItem.vue` (+46 -0) ➖ `packages/frontend/editor-ui/src/features/ai/chatHub/composables/useAgent.ts` (+0 -15) </details> ### 📄 Description ## Summary This PR improves chat sidebar performance by introducing pagination of the conversation list and optimizing the UI logic for rendering to reduce dependent API responses. Also adds skeleton to provide clear feedback to users while loading. ## Related Linear tickets, Github issues, and Community forum posts <!-- Include links to **Linear ticket** or Github issue or Community forum post. Important in order to close *automatically* and provide context to reviewers. https://linear.app/n8n/issue/ --> <!-- Use "closes #<issue-number>", "fixes #<issue-number>", or "resolves #<issue-number>" to automatically close issues when the PR is merged. --> ## Review / Merge checklist - [x] PR title and summary are descriptive. ([conventions](../blob/master/.github/pull_request_title_conventions.md)) <!-- **Remember, the title automatically goes into the changelog. Use `(no-changelog)` otherwise.** --> - [ ] [Docs updated](https://github.com/n8n-io/n8n-docs) or follow-up ticket created. - [ ] Tests included. <!-- A bug is not considered fixed, unless a test is added to prevent it from happening again. A feature is not complete without tests. --> - [ ] PR Labeled with `release/backport` (if the PR is an urgent fix that needs to be backported) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the
pull-request
label 2025-11-20 06:22:31 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/n8n#22006
No description provided.