Add repository:
- New remote verb `add-repo KEY OWNER/NAME`. Off unless config.toml has
[repo_add] (base_url + owners). Only listed owners; the dev box builds
the URL itself, checks it with `git ls-remote` (bot access), then
appends to [repos] under the lock. No URL crosses the SSH link.
- `repos` also reports where adding is allowed, so the page shows the
form only when it's on and rejects other hosts before calling SSH.
- set_toml_string inserts after the section's last key, not after
trailing blank lines / the next section's comments.
Responsiveness:
- web/static/app.js (progressive enhancement; every form still works
without JS): forms go via fetch and get a JSON answer instead of
POST-redirect-GET; buttons/cards show the change immediately; the
list refreshes itself (15 s, 3 s while something is starting).
- `repos` is cached for 5 min (refreshed on add-repo), so a page view
is one SSH call instead of two.
- `list` reads all unit states with one `systemctl show` instead of one
per session: 676 -> 374 ms on the dev box with 21 sessions.
- Static assets are content-hashed and cached immutably.
Design: slate greys, hairline borders, black primary action, tinted
status badges, monospace repo/branch, two columns on desktop, stacked
on phones, light and dark.
Docs: README security model, AGENTS.md (JS convention, add-repo
invariant), config.example.toml.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MCUMXh8zZConC75Mptbeou
Connection refused: the dev box's UFW `limit` rule refuses the 6th new
SSH connection from one address within 30 s. Every page view made two
calls (list, repos) and every button one more, so stopping two sessions
and refreshing hit it (kernel log: "UFW LIMIT BLOCK" from prod's IP).
The web app now multiplexes all calls over one connection
(ControlMaster=auto, ControlPersist=120), with the socket in its private
temp dir. compose.yaml gets `init: true` so the backgrounded master is
reaped; the app warns if it runs as PID 1.
Spaces in names: `create` now takes a title (letters, digits, '-',
single spaces, <= 48 chars). The slug used for the directory, branch,
unit and tmux socket is derived from it; the title is shown on the page
and passed to claude as --name. A plain slug still maps to itself.
Archive: new remote verbs `archive` (stop + flag, keeps checkout and
conversation) and `unarchive` (back to the list, still stopped). An
archived session refuses `start`. The page lists archived sessions in a
collapsible section. `list` re-reads state under the lock before saving
a Remote Control URL so it can't undo a concurrent archive.
Also: name/branch validation used re.match with `$`, which accepts a
trailing newline; it now uses fullmatch.
Tested end to end with a throwaway 127.0.0.1 key and the real container:
24 remote calls went over 1 TCP connection.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rog8S9b5qKaw6nUicxXLkM
Drop the app's own login (password hash, signed cookies, CSRF tokens, rate
limiting): Authelia via Caddy forward_auth is the login. The app refuses any
request without the Remote-User header (optionally limited to
SESSIONS_ALLOWED_USERS) and any cross-site POST (Sec-Fetch-Site / Origin).
The SSH key and the dev box host key now come from environment variables
printed by `sessions-ctl keygen`, so the container needs no secrets store or
mounts. Add compose.yaml so prod's panel can build and deploy it; remove the
Quadlet unit and the files it needed. README covers the panel deploy.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KKYfRST9cTJYae3f7Jf3ac
Stdlib-only Python app: password login (scrypt), signed SameSite=Strict
cookie, CSRF tokens, login rate limiting, strict CSP and no JavaScript. Every
action is one ssh call to sessions-ctl with a pinned host key. Ships a
Containerfile and a Podman Quadlet unit (rootless, read-only root, all
capabilities dropped, published on 127.0.0.1 only, secrets via podman secret).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>