feat: add static previews to the room pane

The preview tool could only name a port, so a static build needed a
server the terminal had to keep alive. `preview` now accepts a path:
the app reads the file or folder over the room's ssh sandbox and serves
it from a signed host, with `..` and dotfiles refused and a 16 MiB cap.

The target is stored with the room and replayed as a durable event. The
pane shows a static path with a reload control and keeps the port field
as a local fallback.
This commit is contained in:
vhaudiquet committed 2026-11-28 11:24:57 +01:00
1 parent 5be17cf4ef
commit 36de0aace7
20 files changed
+1046 -145

No files matched your search

+13
View File
@@ -27,6 +27,19 @@ reading, searching, editing, and running tests. Leave the tree in a state
someone else can pick up. When you finish, say which files changed and which
checks you ran.
## Preview
When what you changed is visible, point the room at it with the `preview`
tool. Use `path` for a static page: an HTML file, or a folder with an
`index.html`. The app reads it over ssh and serves it, so there is no server
to start and nothing to keep alive. Point at a build folder, not the whole
repository, unless every file in the tree is meant to be readable through the
preview link.
Use `port` for a dev server that is already listening on 127.0.0.1 in the
sandbox. Set one of `path` or `port`, never both. The pane opens it for
everyone in the room.
{% if tools %}
## Tools