Repository navigation
fix(wework): bound pane memory usage - #2132
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (10)
📝 WalkthroughWalkthroughThe desktop workbench now applies bounded ordinary-pane caching with Terminal/browser retention, clears inactive pane state, windows offscreen chat messages, and adds related tests, memory diagnostics, screenshots, and lifecycle documentation. ChangesPane lifecycle and memory behavior
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant MessageList
participant WindowedMessageArticle
participant IntersectionObserver
User->>MessageList: scroll through messages
MessageList->>WindowedMessageArticle: render message article
WindowedMessageArticle->>IntersectionObserver: observe viewport proximity
IntersectionObserver->>WindowedMessageArticle: report visibility
WindowedMessageArticle->>MessageList: mount or unmount message content
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
Summary
Root cause
Every runtime pane was passed to the cache as pinned, so the configured pane limit never applied. Each pane retained its complete React transcript tree and expanded processing state, causing memory to scale with the number and length of opened conversations.
Verification
pnpm --filter wework exec tsc --noEmitpnpm --filter wework test(199 files, 1982 tests)pnpm --filter wework e2e:desktoppnpm --filter wework e2e:desktop:memoryCI's first memory run measured 203889 KiB peak growth, 137089 KiB settled growth, and -26544 KiB settled drift. The settled budget was calibrated to 160 MiB to allow cold-start baseline variance while remaining 37.5% below the previous 256 MiB limit; the peak and post-completion drift limits remain strict.
Screenshot evidence
Desktop E2E artifacts cover local model responses, reconnect recovery, request-user-input, background window lifecycle, and the four memory phases. Paths are reported in the task handoff because generated E2E artifacts are intentionally gitignored.
Summary by CodeRabbit
Performance
Usability
Documentation