GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||
GeezerVison is showing github.com — fix: clean up pending permissions when session is deleted by hendem · Pull Request #7154 · anomalyco/opencode Conversation
|
|
The following comment was made by an LLM, it may be inaccurate: No duplicate PRs found |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This PR adds session cleanup functionality to the PermissionNext namespace to prevent memory leaks when sessions are deleted. It introduces init(), dispose(), and clearSession() methods that subscribe to session.deleted events and clean up orphaned pending permissions.
Key changes:
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| packages/opencode/src/permission/next.ts | Implements init(), dispose(), and clearSession() functions with session.deleted event subscription to clean up orphaned pending permissions |
| packages/opencode/test/permission/cleanup.test.ts | Adds comprehensive test coverage for the new cleanup functionality including session clearing, event subscription, disposal, and duplicate init handling |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Add init(), dispose(), and clearSession() to PermissionNext namespace to properly clean up pending permission requests when a session is deleted. This prevents memory accumulation from orphaned pending entries that would never be resolved. The fix subscribes to the session.deleted bus event and rejects all pending permissions for that session, allowing proper garbage collection.
- Move subscriptions to per-instance state instead of module-level - Add Event.Replied publishing in clearSession for consistency - Make init() and dispose() async to work with instance state - Remove unnecessary setTimeout delays in tests (Bus.publish awaits handlers)
Address Copilot review comments - import Session and use the proper Session.Event.Deleted event definition instead of bypassing type checking with manually constructed objects.
This reverts commit 7b9bc5370b08ec55c543de381b88eaf9c050a139. wip: zen Reapply "wip: zen" This reverts commit 09516ac8c3bb7c432b28cf63faa65c0e3b9f9684.
9f56615 to
a9f2024
Compare
00637c0 to
71e0ba2
Compare
f1ae801 to
08fa7f7
Compare
|
Closing this pull request because it has had no updates for more than 60 days. If you plan to continue working on it, feel free to reopen or open a new PR. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Uses a huge amount of memory
There was an error while loading. Please reload this page.