Skip to content

perf(ui): bound session memory across workspaces - #626

Open
pascalandr wants to merge 1 commit into
NeuralNomadsAI:devfrom
pascalandr:perf/session-memory-eviction
Open

perf(ui): bound session memory across workspaces#626
pascalandr wants to merge 1 commit into
NeuralNomadsAI:devfrom
pascalandr:perf/session-memory-eviction

Conversation

@pascalandr

Copy link
Copy Markdown
Contributor

Summary

  • persist completed session history in a paged, budgeted IndexedDB cache and restore it without blocking authoritative HTTP/SSE state
  • enforce a global byte-aware resident-session budget across workspaces and subagents while preserving visible, active, and input-blocked work
  • bound tool, diff, diagnostics, speech, search, and nested-task rendering, with lazy full-copy paths for oversized content
  • fence cache writes, reverts, deltas, deletions, and instance reopen work against stale asynchronous state

Validation

  • 406 UI tests pass after rebasing onto current dev
  • UI TypeScript typecheck passes
  • production UI build passes
  • independent memory, cache-concurrency, and rendering gatekeepers returned SHIP

Discord report: https://discord.com/channels/1391832426048651334/1458412028325793887/1527610433844805673

Closes #553

Keep inactive workspace and subagent histories in a paged IndexedDB cache while enforcing a global byte-aware hot-memory budget. Visible, streaming, compacting, and input-blocked sessions retain authority, and nested task sessions load only while their owning pane is visible.

Bound tool, diff, diagnostic, speech, search, and nested-task rendering so large outputs cannot create unbounded parser or DOM work. Full large inputs and patches remain available through lazy copy actions.

Harden HTTP, SSE, revert, deletion, and instance-reopen ordering with revision and lifecycle fences. Coalesce cache writes without retaining queued snapshots, preserve orphan deltas through an authoritative reload, and version cache invalidations across shared workspace keys.

Validated with 395 UI tests, UI typecheck, production build, and independent memory, cache-concurrency, and rendering gatekeepers.
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.

[Bug]: WebKit renderer memory grows to 2.5 GB over 24h+ runtime — tool outputs fully rendered with no eviction

1 participant