Skip to content

fix(editor): Position chat welcome message to center with base LLM models#26442

Merged
Cadiac merged 1 commit intomasterfrom
cha-154-bug-position-chat-greetings-text-to-the-middle
Mar 3, 2026
Merged

fix(editor): Position chat welcome message to center with base LLM models#26442
Cadiac merged 1 commit intomasterfrom
cha-154-bug-position-chat-greetings-text-to-the-middle

Conversation

@Cadiac
Copy link
Contributor

@Cadiac Cadiac commented Mar 2, 2026

Summary

image

Now that chat suggested prompts are out we (accidentally?) changed the layout also on base LLM chats, positioning the chat greeting to the top. This looks pretty empty, lets position it to the center instead.

Perhaps we'll add suggested prompts for base LLM chats too later, but as we don't have them now lets make this look slightly better.

Related Linear tickets, Github issues, and Community forum posts

https://linear.app/n8n/issue/CHA-154/bug-position-chat-greetings-text-to-the-middle

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)

@n8n-assistant n8n-assistant bot added the n8n team Authored by the n8n team label Mar 2, 2026
@codecov
Copy link

codecov bot commented Mar 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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.

cubic analysis

No issues found across 1 file

Linked issue analysis

Linked issue: CHA-154: Bug - Position chat greetings text to the middle

Status Acceptance criteria Notes
Center the chat greetings prompt for base LLM chats (non-agent models). Applied greetingsCentered class when not an agent model
Keep agent models' greetings positioned at the top (do not center agent chats). Introduced isAgentModel and isAgentNewSession layout class
Only apply centering when showing the greeting for a new session. ChatGreetings is rendered only when isNewSession (v-if)
Add computed detection for agent vs base LLM models. Added isAgentModel computed using selectedModel and isLlmProvider
Add CSS rules to center the greetings (flex centering) and maintain agent spacing. Added .greetingsCentered flex center and .isAgentNewSession padding-top
Architecture diagram
sequenceDiagram
    participant CV as ChatView (Vue Component)
    participant CS as ChatStore (State)
    participant CG as ChatGreetings (Sub-component)

    Note over CV,CS: Runtime Layout Initialization
    CV->>CS: Access selectedModel property
    CS-->>CV: Return ChatModelDto

    CV->>CV: NEW: Compute isAgentModel (Boolean)
    Note right of CV: Checks if provider is NOT a standard LLM

    alt isNewSession is TRUE
        CV->>CV: CHANGED: Determine Layout Class
        
        alt isAgentModel is TRUE
            CV->>CV: Apply .isAgentNewSession (Padding-top)
        else isAgentModel is FALSE (Base LLM)
            CV->>CV: NEW: Apply .greetingsCentered (Flex-center)
        end

        CV->>CG: Render Greetings Component
        Note over CV,CG: NEW: Inject .greetingsCentered class via props
    else isExistingSession
        CV->>CV: Apply .isExistingSession (Standard layout)
    end

    Note over CV: Browser applies CSS Flexbox rules based on dynamic classes
Loading

@Cadiac Cadiac requested a review from autologie March 2, 2026 16:32
@Moses-main

This comment was marked as spam.

@codecov
Copy link

codecov bot commented Mar 2, 2026

Bundle Report

Changes will increase total bundle size by 607 bytes (0.0%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
editor-ui-esm 42.4MB 607 bytes (0.0%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: editor-ui-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/worker-*.js -2.91MB 13.37kB -99.54%
assets/worker-*.js 2.91MB 2.92MB 21725.55% ⚠️
assets/ChatView-*.js 438 bytes 675.22kB 0.06%
assets/ChatView-*.css 169 bytes 94.22kB 0.18%

Files in assets/ChatView-*.js:

  • ./src/features/ai/chatHub/ChatView.vue → Total Size: 309 bytes

Copy link
Contributor

@autologie autologie left a comment

Choose a reason for hiding this comment

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

Perhaps we'll add suggested prompts for base LLM chats too later

Maybe we haven't settled yet, but I believe this is the plan
https://www.figma.com/design/RVJgBrL0fXTCvreYqfWAlL/ChatHub-Scratchpad-2026?node-id=245-2132&t=JEnFftR79LH9v78l-0

@Cadiac Cadiac added this pull request to the merge queue Mar 3, 2026
Merged via the queue into master with commit 1cc7e8d Mar 3, 2026
47 checks passed
@Cadiac Cadiac deleted the cha-154-bug-position-chat-greetings-text-to-the-middle branch March 3, 2026 09:41
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants