Reduce unnecessary re-renders in agent panel and input components

Narrow zustand selectors to only subscribe to fields each component
actually uses. Split nested objects (availableModes, projectPlacement)
into separate selectors with structural equality checks. Remove the
updatedAt processing-spinner hack in agent-input-area — the server
already guarantees agent status is "running" before ACKing the send
request, so isProcessing can clear on submit success directly.
This commit is contained in:
Mohamed Boudra
2026-03-25 13:09:17 +07:00
parent c2c5bc815e
commit 81ee887d03
10 changed files with 150 additions and 185 deletions
@@ -46,6 +46,7 @@ export async function submitAgentInput<TImage>(
try {
await input.submitMessage({ message: trimmedMessage, imageAttachments });
input.clearDraft("sent");
input.setIsProcessing(false);
return "submitted";
} catch (error) {
input.onSubmitError?.(error);