Skip to content

feat: add unloading of AgentClient on switch - #67

Merged
imadofficial merged 2 commits into
mainfrom
refactor/unload
Jan 9, 2026
Merged

feat: add unloading of AgentClient on switch#67
imadofficial merged 2 commits into
mainfrom
refactor/unload

Conversation

@HublackBE

Copy link
Copy Markdown
Contributor

Replaced exception throw on null GetAllUnitsAsync response with a user-facing error message via ShowErrorInfoBarAsync. This prevents application crashes and provides clearer feedback to the user when the agent returns no data.

Replaced exception throw on null GetAllUnitsAsync response with a user-facing error message via ShowErrorInfoBarAsync. This prevents application crashes and provides clearer feedback to the user when the agent returns no data.
AgentClient now supports IAsyncDisposable for proper async resource cleanup, including gRPC channel shutdown. ServerMainPage.xaml.cs disposes and deregisters AgentClient asynchronously on navigation, improving resource management and preventing leaks.

@imadofficial imadofficial left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@imadofficial
imadofficial merged commit db5a9e1 into main Jan 9, 2026
1 check passed
@HublackBE HublackBE changed the title Handle null GetAllUnitsAsync response with user error feat: add unloading of AgentClient on switch Jan 9, 2026
@HublackBE
HublackBE deleted the refactor/unload branch January 9, 2026 10:33
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.

2 participants