Skip to content

Add storage retention, fix reverse proxy port and replay freeze - #107

Merged
adn8naiagent merged 1 commit into
stagingfrom
dev
Aug 30, 2026
Merged

adn8naiagent merged 1 commit into
stagingfrom
dev

Conversation

@adn8naiagent

Copy link
Copy Markdown
Owner

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 ([Bug] UI freezes at ~4:45 behind reverse proxies (Regression in v2.1.2) #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

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>
@adn8naiagent
adn8naiagent merged commit bab3646 into staging Aug 30, 2026
1 check failed
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