fix(app): reduce workspace screen re-renders and fix archived agent handling

Replace greedy agents Map subscription with a Zustand selector that
derives workspace agent visibility (ID sets only) with custom equality,
so the workspace screen only re-renders when agents are added, removed,
or archived — not on every status/activity update.

Fix tab pruning to check against all known agents (including archived)
instead of only active agents, so archived agent tabs survive
reconciliation. Remove the auto-unarchive effect that called
refreshAgent() as a workaround. Hide input area for archived agents.
This commit is contained in:
Mohamed Boudra
2026-03-20 21:07:51 +07:00
parent 72ea9b7a72
commit 48924626df
4 changed files with 95 additions and 152 deletions
+1 -1
View File
@@ -802,7 +802,7 @@ function AgentPanelBody({
</ReanimatedAnimated.View>
</View>
{agentId && !isArchivingCurrentAgent ? (
{agentId && !isArchivingCurrentAgent && !agent?.archivedAt ? (
<AgentInputArea
agentId={agentId}
serverId={serverId}