Skip to content

fix(cockpit): preserve iframe across tab switches#112

Merged
blove merged 1 commit into
mainfrom
fix/cockpit-iframe-persistence
Apr 11, 2026
Merged

fix(cockpit): preserve iframe across tab switches#112
blove merged 1 commit into
mainfrom
fix/cockpit-iframe-persistence

Conversation

@blove
Copy link
Copy Markdown
Contributor

@blove blove commented Apr 11, 2026

Summary

  • Keep RunMode mounted when switching between Run/Code/Docs/API tabs so the iframe isn't destroyed and recreated
  • Use invisible absolute CSS to hide RunMode when another tab is active, preserving iframe state
  • Navigating to a different example still unmounts the entire shell, cleaning up the old iframe

Test plan

  • Open any example in Run mode, interact with it
  • Switch to Code tab, then back to Run — iframe state should be preserved
  • Navigate to a different example — iframe should load fresh
  • Verify no layout issues with the hidden iframe layer

🤖 Generated with Claude Code

RunMode was conditionally rendered, causing the iframe to unmount and
remount every time the user switched tabs. Now RunMode stays mounted
but is hidden with CSS when another tab is active. Navigating to a
different example still unmounts the old shell and creates a fresh one.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cacheplane Ready Ready Preview, Comment Apr 11, 2026 4:20pm

Request Review

@blove blove merged commit c84b576 into main Apr 11, 2026
14 checks passed
@blove blove deleted the fix/cockpit-iframe-persistence branch April 11, 2026 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant