fix(files): an HTML file in the Changes panel shows as the page only on Preview

Changes stays the default view and Whole file shows the source, as for any
file. A Preview button — offered on the Changes diff too, where it was
missing — opens the page; Raw, Changes or Whole file go back to the source.
This commit is contained in:
2026-10-29 10:38:15 +07:00
parent 38ea78b489
commit 364fe4a286
3 changed files with 57 additions and 13 deletions
+3 -2
View File
@@ -678,8 +678,9 @@ reads the workspace's git surface in five modes:
least one line tall (`MIN_ROW`), so an empty filler row keeps the two
columns aligned. An image file (png, jpg, gif, webp, avif, bmp, ico, svg) is
shown as the picture (`/git/raw`), an HTML file (`.html`/`.htm`) opens
as the page itself — **Raw** shows its source in the editor, **Preview**
brings the page back — and a conflicted file opens in the
like any file (Changes, or Whole file as source) with a **Preview**
button — on Changes too — that shows it as the page; **Raw** goes back to
its source — and a conflicted file opens in the
conflict view. The page (here, in a Chat file preview, and on a
double-click in the File Explorer, whose right-click menu keeps
**Download**) runs in the chat artifact's sandbox (`HtmlFrame.tsx`: