Skip to content

v2.1.3 - #109

Merged
adn8naiagent merged 4 commits into
mainfrom
staging
Aug 30, 2026
Merged

v2.1.3#109
adn8naiagent merged 4 commits into
mainfrom
staging

Conversation

@adn8naiagent

Copy link
Copy Markdown
Owner

2.1.3

Improvements

  • Storage management — a Storage button in the header shows total disk use and sets a retention policy: sessions older than a chosen number of weeks or months are deleted, immediately and then daily. Individual sessions can be deleted by right-clicking them in the session picker. (requested by @db-can)

Fixes

  • Replay froze after a dropped connection — an idle replay sent no data, so proxies could close the socket and the client never reconnected. The server now sends a keep-alive every 20s, and the client reconnects and resumes where it left off. (#106, reported by @nbolland)

  • App unreachable behind a reverse proxy when PORT was set — 2.1.2 passed PORT into the container, moving the port proxies point at (Traefik, nginx and cloudflared all target 8000). The container now always listens on 8000; PORT sets the published host port only. (found while investigating #106, reported by @nbolland)

adn8naiagent and others added 4 commits August 30, 2026 11:03
Storage management (requested by @db-can):
- storage.delete/delete_prefix for local and R2 (batched at 1000 keys)
- delete_session removes replay.json first, so an interrupted delete reads
  as "not downloaded" and reprocesses cleanly instead of half-removed
- retention.py: policy stored in config/retention.json, applied on save and
  swept daily by its own task. Not in auto_precompute_loop, which only runs
  Fri-Mon and isn't started at all when AUTO_PRECOMPUTE=off
- a delete tombstone stops auto-precompute re-downloading a removed session
- evict_cached_session frees replay frames from memory on delete
- Storage panel in the picker header; per-session delete on right-click

Fixes:
- docker-compose: container always listens on 8000 so reverse proxies have a
  stable target; PORT now sets the published host port only. 2.1.2 passed
  PORT into the container, moving the port Traefik/nginx/cloudflared target
- replay websocket sends a keep-alive every 20s, and the client reconnects
  with backoff and resumes in place, so a dropped socket no longer freezes
  the UI permanently (#106)
- replace the 50ms receive_text cancellation with a queue-fed reader task
- clear the events cache after processing so downloaded markers appear
  immediately rather than after the 5 minute TTL

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Add storage retention, fix reverse proxy port and replay freeze
A first sweep over a large backlog appeared to hang: delete_session made
about five sequential R2 round trips per session, so deleting 134 sessions
meant ~670 calls held open behind one request with nothing on screen.
Measured against the bucket, 100 objects one at a time took 24.5s; the same
100 in bulk take 0.9s.

- storage.keys_under lists once from the shared root; delete_keys removes
  exactly those keys in batches of 1000, reporting progress per batch
- sweep uses them instead of per-session deletes, and skips tombstones:
  they exist to stop auto_precompute re-downloading a removed session, and
  it only looks at the last 7 days, which retention never touches
- the sweep now runs in the background via start_sweep, with
  GET /api/storage/retention/status for progress, so the request no longer
  blocks and a refresh mid-delete doesn't lose it
- the panel polls that status and shows a progress bar over files deleted
- the retention controls stay hidden until usage has loaded, so a threshold
  can't be set against a total that hasn't arrived

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Make retention delete fast and show progress
@adn8naiagent
adn8naiagent merged commit 0a93d68 into main Aug 30, 2026
1 of 2 checks passed

This branch was successfully deployed

1 active deployment
F1ReplayTiming / staging — 3604b1bd Deployed Aug 30, 2026 by railway-app[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant