Skip to content

Commit 5491ffc

Browse files
committed
Merge branch 'feat/dashboard-agent-flows-watch' into feat/agent-storybook-gallery
2 parents 31e939f + 5d90f56 commit 5491ffc

4 files changed

Lines changed: 14 additions & 6 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
);

apps/webapp/test/reportMetricDelta.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ describe("report layout — a metric's movement against its baseline", () => {
5555
expect(row.delta).toEqual({ text: `${REPORT_GLYPH.down} 20×`, dir: "down" });
5656
});
5757

58-
it("renders a collapse to zero as a bare down arrow", () => {
58+
it("says nothing about a collapse to zero, which has no multiplier", () => {
5959
const row = metricRow({
6060
id: "throughput",
6161
value: 0,
@@ -64,7 +64,7 @@ describe("report layout — a metric's movement against its baseline", () => {
6464
severity: "crit",
6565
});
6666

67-
expect(row.delta).toEqual({ text: REPORT_GLYPH.down, dir: "down" });
67+
expect(row.delta).toBeUndefined();
6868
});
6969

7070
it("leaves a dip that doesn't round past 1× reading as flat", () => {

0 commit comments

Comments
 (0)