Preview panel renders blank on open — fixes only after window minimize/restore

Resolved 💬 1 comment Opened May 7, 2026 by ipodprugin Closed Jun 4, 2026

Description

When opening the preview panel in Claude Code, the left portion of the panel stays black/empty, and the content (in this case, FastAPI Swagger UI at /docs) only appears in the right portion of the split view.

The issue resolves itself after minimizing and restoring the Claude Code window.

Steps to Reproduce

  1. Start a local FastAPI server (e.g. on port 8010)
  2. Configure .claude/launch.json with "url": "http://localhost:8010/docs"
  3. Call preview_start to open the preview panel
  4. Observe the preview panel — left side is black, content is clipped to the right

Expected Behavior

Preview panel renders the full content correctly on first open.

Actual Behavior

Left side of the preview panel is black. Content is partially visible on the right. After minimizing and restoring the Claude Code window, the panel renders correctly.

Root Cause (suspected)

The preview iframe likely does not receive a resize event when the panel is first opened. Minimizing/restoring the window triggers a resize event, which causes the iframe content to reflow and render correctly.

Environment

  • OS: macOS (Darwin 25.3.0)
  • App: Claude Code desktop
  • Server: FastAPI with Swagger UI (/docs)

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗