File viewer: add preview (eye) button for .html files, same as Markdown

Open πŸ’¬ 0 comments Opened Jun 12, 2026 by JokerXxxxxx

Summary

The file viewer shows a preview (eye πŸ‘) button in the toolbar for .md files (renders Markdown inline). The same affordance is missing for .html files β€” their toolbar only has search / open-folder actions. As a result, previewing an HTML file requires manually starting a local static server, which is heavy for self-contained HTML.

Current behavior

  • Open a .md file β†’ toolbar has the πŸ‘ preview button β†’ click β†’ rendered Markdown.
  • Open a .html file β†’ no preview button β†’ to see it rendered you must spin up a local server (python -m http.server, a Node static server, etc.) or open it externally.

Requested behavior

Add a preview (eye πŸ‘) button for .html files, identical to the Markdown one. Clicking it renders the HTML inline.

  • For self-contained HTML (inline CSS/JS, no external fetch/relative assets), render directly via file:// β€” no server needed.
  • For HTML that references relative assets, fall back to / transparently spin up the existing preview mechanism.

Why

HTML demos, prototypes, and report files are a common deliverable. Right now .md is one-click-to-preview but .html β€” arguably the format that benefits most from rendering β€” is not. Closing this gap makes demo/prototype files instantly viewable and removes the "start a local server" friction.

Environment

  • Claude Code desktop/file-viewer
  • Platform: macOS (darwin)

View original on GitHub β†—