Skip to content

Commit 6334137

Browse files
committed
fix(webapp): watch-branch typing after the cross-org and report-offer merges
1 parent 7ce8bc2 commit 6334137

3 files changed

Lines changed: 12 additions & 4 deletions

File tree

apps/webapp/app/components/dashboard-agent/DashboardAgentPanel.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,12 @@ export function DashboardAgentPanel({
416416
} else {
417417
claimChatSlot();
418418
// No session: nothing is streaming and the records are the whole chat.
419-
setActive({ chatId: data.chatId, messages, session: null });
419+
setActive({
420+
chatId: data.chatId,
421+
messages,
422+
session: null,
423+
organizationId: organization.id,
424+
});
420425
}
421426
void loadHistory();
422427
} catch (error) {

apps/webapp/app/components/dashboard-agent/ReportView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ export function ReportView({
326326
spec: {
327327
kind: "health_recovery",
328328
report: "health",
329-
fromSeverity: severity,
329+
fromSeverity: vm.summary.severity,
330330
note: `${vm.scope} health back to normal`,
331331
...RECOVERY_WATCH,
332332
},

apps/webapp/app/components/dashboard-agent/view-actions.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,12 @@ export function cardAlreadyOffersWatch(blocks: ViewBlock[]): boolean {
3535
/**
3636
* The report card's watch button isn't in the block — `ReportView` grows it from the
3737
* view model, for a health report with something to recover from. Same condition here,
38-
* so the button the user will see is the one the guard counts.
38+
* so the button the user will see is the one the guard counts. A predicate, so a caller
39+
* building the recovery spec keeps the narrowed severity.
3940
*/
40-
export function reportOffersRecoveryWatch(vm: ReportViewModelPayload): boolean {
41+
export function reportOffersRecoveryWatch(
42+
vm: ReportViewModelPayload
43+
): vm is ReportViewModelPayload & { summary: { severity: "warn" | "crit" } } {
4144
return (
4245
vm.title === "health" && (vm.summary.severity === "warn" || vm.summary.severity === "crit")
4346
);

0 commit comments

Comments
 (0)