Include join requests in inbox badge and auto-refresh via push
The sidebar badge count was missing join requests from its inbox total, and the live updates provider had no handler for join_request entity type, so new join requests wouldn't appear until manual page refresh. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -45,7 +45,7 @@ export function sidebarBadgeRoutes(db: Db) {
|
||||
const alertsCount =
|
||||
(summary.agents.error > 0 && !hasFailedRuns ? 1 : 0) +
|
||||
(summary.costs.monthBudgetCents > 0 && summary.costs.monthUtilizationPercent >= 80 ? 1 : 0);
|
||||
badges.inbox = badges.failedRuns + alertsCount + staleIssueCount;
|
||||
badges.inbox = badges.failedRuns + alertsCount + staleIssueCount + joinRequestCount;
|
||||
|
||||
res.json(badges);
|
||||
});
|
||||
|
||||
@@ -369,6 +369,11 @@ function invalidateActivityQueries(
|
||||
return;
|
||||
}
|
||||
|
||||
if (entityType === "join_request") {
|
||||
queryClient.invalidateQueries({ queryKey: queryKeys.access.joinRequests(companyId) });
|
||||
return;
|
||||
}
|
||||
|
||||
if (entityType === "cost_event") {
|
||||
queryClient.invalidateQueries({ queryKey: queryKeys.costs(companyId) });
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user