Home

mweinbach / agent-coworker

publicmweinbach/agent-coworker
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

fix: preserve A2UI surfaces across rejected overflow envelopes

6 months ago

654383e
Authored
mweinbach4/19/2026, 1:47:33 AM
This closes the remaining PR #83 cap-handling regressions in the A2UI
surface manager. Rejected oversized updates now keep the last valid
surface revision instead of dropping server-side state, and oversized
createSurface requests no longer evict an older surface before the new
surface is proven acceptable.

Constraint: Overflow guards must keep server and client A2UI state in sync under the 256 KiB cap
Rejected: Emit synthetic delete events on rejected overflow updates | hides the real bug and still destroys a previously valid surface
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Any future cap-handling change must preserve rollback semantics for updates and validate new surfaces before eviction
Tested: bun test test/a2ui/surfaceManager.test.ts; bun run typecheck; bun test --max-concurrency 1
Not-tested: GitHub Actions on the new commit

Parent567686b

2 files changed
  • src/server/session/A2uiSurfaceManager.ts+36−25
  • test/a2ui/surfaceManager.test.ts+43−2