Skip to content

fix(ai-builder): Fix session timeline/trace not showing on preview dock when full screen - #36930

Open
aaguirre-rdit wants to merge 2 commits into
masterfrom
agent-704-show-session-trace-on-full-screen
Open

fix(ai-builder): Fix session timeline/trace not showing on preview dock when full screen#36930
aaguirre-rdit wants to merge 2 commits into
masterfrom
agent-704-show-session-trace-on-full-screen

Conversation

@aaguirre-rdit

@aaguirre-rdit aaguirre-rdit commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Currently in the agent builder preview chat, when the preview layout is set to Full Screen (fullpage) instead of Docked, clicking the timeline icon (view session trace) does not switch the view to the session timeline.

Now we render the session trace timeline on the same full screen component rather than activating it on the docked component.

How to test

  1. Create an agent.
  2. Open said agent from "Personal" > "Agents" > "$name-of-agent" view.
  3. Start a preview chat with the agent. Change the layout to "Full Screen". Send a message to the agent.
  4. Click on the "View Session Trace" button (list-tree icon).
  5. If the timeline appears, the issue is solved 😁

Related Linear tickets, Github issues, and Community forum posts

https://linear.app/n8n/issue/AGENT-704/bug-agent-builder-preview-timeline-icon-does-not-switch-to-timeline-in

Review / Merge checklist

  • I have seen this code, I have run this code, and I take responsibility for this code.
  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with Backport to Beta, Backport to Stable, or Backport to v1 (if the PR is an urgent fix that needs to be backported)

Review in cubic

@aaguirre-rdit
aaguirre-rdit requested a review from a team August 24, 2026 13:07
@n8n-assistant

n8n-assistant Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

PR review overview

Based on ownership of the 6 changed files in this PR:

Ownership Files owned Share Source code Test files Misc
@n8n-io/frontend 6 100% +73 / -3 +150 / -14 +0 / -0
Total 6 100% +73 / -3 +150 / -14 +0 / -0

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 3 files

Architecture diagram
sequenceDiagram
    participant User
    participant Dock as AgentPreviewDock
    participant Chat as AgentPreviewChatPage
    participant Timeline as AgentSessionTimelinePanel
    participant Parent as Agent Builder / Editor

    Note over User,Parent: Flow: User clicks "View Session Trace" (list-tree icon)

    User->>Dock: click viewTrace()
    
    alt Layout is Full Screen
        Dock->>Dock: NEW: Set dockView = 'timeline'
        Dock->>Chat: NEW: Hide via v-show
        Dock->>Timeline: NEW: Render AgentSessionTimelinePanel
    else Layout is Docked
        Dock->>Parent: CHANGED: emit('view-trace')
    end

    Note over User,Parent: Flow: Navigation within Full Screen Dock

    alt User clicks "Show Chat"
        User->>Dock: click showChat()
        Dock->>Dock: NEW: Set dockView = 'chat'
        Dock->>Timeline: NEW: Unmount component
        Dock->>Chat: NEW: Show via v-show
    else User clicks "New Chat"
        User->>Dock: click createNewSession()
        Dock->>Dock: NEW: Call showChat() internal reset
        Dock->>Parent: emit('new-session')
    end

    Note over Dock: Watchers for State Reset

    alt layout changed OR dock closed OR session lost
        Dock->>Dock: NEW: Reset dockView to 'chat'
        Dock->>Chat: Ensure chat is visible for next open
    end
Loading

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

@codecov

codecov Bot commented Aug 24, 2026

Copy link
Copy Markdown

Bundle Report

Changes will increase total bundle size by 5.44kB (0.01%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
editor-ui-esm 63.05MB 5.44kB (0.01%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: editor-ui-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/src-*.js 49 bytes 794.17kB 0.01%
assets/src-*.js 1.94kB 3.34MB 0.06%
assets/worker-*.js 3.2MB 3.21MB 17334.42% ⚠️
assets/worker-*.js -3.2MB 18.44kB -99.43%
assets/ParameterInputList-*.js 553 bytes 1.47MB 0.04%
assets/workflows.store-*.js 4.47kB 827.13kB 0.54%
assets/AgentBuilderView-*.js -32 bytes 784.36kB -0.0%
assets/InstanceAiThreadView-*.js -16 bytes 594.86kB -0.0%
assets/AgentPreviewDock-*.js 147.48kB 376.32kB 64.45% ⚠️
assets/AgentPreviewDock-*.css 133.04kB 374.1kB 55.19% ⚠️
assets/NodeView-*.js -8 bytes 339.85kB -0.0%
assets/markdown-*.js -3.64kB 263.31kB -1.36%
assets/useCanvasOperations-*.js 66 bytes 150.04kB 0.04%
assets/builder.store-*.js 30 bytes 111.75kB 0.03%
assets/agents.eventBus-*.js -8 bytes 99.72kB -0.01%
assets/CanvasRunWorkflowButton-*.js 222 bytes 97.09kB 0.23%
assets/TestRunDetailView-*.css 16 bytes 74.59kB 0.02%
assets/AgentVectorStoresModal-*.js -8 bytes 34.51kB -0.02%
assets/ChatLayout-*.js -8 bytes 7.06kB -0.11%
assets/AgentSessionTimelineView-*.js -146.07kB 22.75kB -86.52%
assets/N8nHoverCard-*.js 13.43kB 21.95kB 157.66% ⚠️
assets/AgentSessionTimelineView-*.css -133.06kB 19.48kB -87.23%
assets/NodeToolSettingsContent-*.js -8 bytes 18.02kB -0.04%
assets/useWorkflowInitialization-*.js -8 bytes 14.9kB -0.05%
assets/useCredentialOAuth-*.js 495 bytes 12.76kB 4.04%
assets/pushConnection.store-*.js 429 bytes 10.7kB 4.18%
assets/usePostMessageHandler-*.js -8 bytes 9.01kB -0.09%
assets/invite-*.utils-DiHoTASL.js (New) 809 bytes 809 bytes 100.0% 🚀
assets/HoverCardTrigger-*.js (Deleted) -13.91kB 0 bytes -100.0% 🗑️
assets/invite-*.utils-DGeyge-M.js (Deleted) -809 bytes 0 bytes -100.0% 🗑️

Files in assets/AgentPreviewDock-*.js:

  • ./src/features/agents/components/AgentPreviewDock.vue → Total Size: 347 bytes

Files in assets/pushConnection.store-*.js:

  • ./src/app/stores/pushConnection.store.ts → Total Size: 4.75kB

@codecov

codecov Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 84.61538% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...d/editor-ui/src/app/stores/pushConnection.store.ts 69.23% 2 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

@n8n-assistant n8n-assistant Bot added core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team labels Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant