Merged
Size
M
Change Breakdown
Feature85%
Maintenance15%
#28202feat(core): Persist open artifact preview on instance AI threads (no-changelog)

Preview tab state now persists across AI thread reloads

Preview tab state now persists across AI thread reloads

AI thread preview tabs stay open after page refresh. The active preview state is saved to thread metadata and automatically restored when the thread reloads.

AI thread users no longer lose their open preview tab when navigating away or refreshing the page. Preview state is now stored with each thread and restored on reload.

When a user clicks through different artifact previews in an AI thread, that selection is saved. Returning to the thread — whether after closing the browser or navigating to a different workflow — restores the exact preview that was open.

The implementation extends thread metadata to carry arbitrary key-value pairs, with the active preview tab stored under the activePreviewTab key. Changes are debounced to avoid excessive saves, and the restore logic checks that the saved tab still exists before applying it. This approach is designed to accommodate additional metadata fields in the future without schema changes.

The change touches the instance AI module in the CLI backend, the frontend store, and the canvas preview composable that manages tab state.

View Original GitHub Description

Summary

Save which artifact is open at every instance AI thread, and restore the open artifact preview on reload if it was open.

This mechanism should work too if we add more artifact types in the future.

Related Linear tickets, Github issues, and Community forum posts

https://www.notion.so/n8n/aef5b6e0c94f82159cc58164aa417607?v=7965b6e0c94f823c918f88516500cb86&p=3365b6e0c94f80159840c26fd7ef1606&pm=s

<!-- 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

  • PR title and summary are descriptive. (conventions) <!-- **Remember, the title automatically goes into the changelog. Use `(no-changelog)` otherwise.** -->
  • Docs updated 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 Backport to Beta, Backport to Stable, or Backport to v1 (if the PR is an urgent fix that needs to be backported)
© 2026 · via Gitpulse