File viewer: add preview (eye) button for .html files, same as Markdown
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
.mdfile โ toolbar has the ๐ preview button โ click โ rendered Markdown. - Open a
.htmlfile โ 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 viafile://โ 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)
This issue has 1 comment on GitHub. Read the full discussion on GitHub โ