GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(notifications): keep multi-thread Android alerts visible · pingdotgg/t3code@06dcb14

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • infra/relay/src/agentActivity
    • FcmDeliveries.test.ts
    • FcmDeliveries.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎infra/relay/src/agentActivity/FcmDeliveries.test.ts‎

Copy file name to clipboardExpand all lines: infra/relay/src/agentActivity/FcmDeliveries.test.ts
+25-22Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -225,28 +225,31 @@ describe("Android delivery routing", () => {
225225
["waiting_for_approval", "waiting_for_input", "2 agents need attention", "true"],
226226
["completed", "failed", "2 agents finished", "false"],
227227
] as const) {
228-
it.effect(`groups ${firstPhase} and ${secondPhase} once across their queued jobs`, () => {
229-
const h = harness();
230-
h.current.otherStates = [secondState];
231-
return Effect.gen(function* () {
232-
const delivery = yield* FcmDeliveries;
233-
yield* delivery.process(h.job);
234-
h.current.state = { ...state, phase: firstPhase };
235-
h.current.otherStates = [{ ...secondState, phase: secondPhase }];
236-
yield* delivery.process({ ...h.job, state: h.current.state });
237-
yield* delivery.process({ ...h.job, state: h.current.otherStates[0] });
238-
yield* delivery.process({ ...h.job, state: h.current.state });
239-
const alerts = h.sent.filter((message) => message.alert);
240-
expect(alerts).toHaveLength(1);
241-
expect(alerts[0]?.data).toMatchObject({
242-
alert_title: title,
243-
alert_body: "Fix notifications, Second thread",
244-
alert_path: firstPhase === "completed" ? secondState.deepLink : state.deepLink,
245-
active,
246-
});
247-
expect(h.marked.at(-1)?.aggregate?.activities).toHaveLength(2);
248-
}).pipe(Effect.provide(h.layer));
249-
});
228+
it.effect(
229+
`routes grouped ${firstPhase} and ${secondPhase} to the overview once across their queued jobs`,
230+
() => {
231+
const h = harness();
232+
h.current.otherStates = [secondState];
233+
return Effect.gen(function* () {
234+
const delivery = yield* FcmDeliveries;
235+
yield* delivery.process(h.job);
236+
h.current.state = { ...state, phase: firstPhase };
237+
h.current.otherStates = [{ ...secondState, phase: secondPhase }];
238+
yield* delivery.process({ ...h.job, state: h.current.state });
239+
yield* delivery.process({ ...h.job, state: h.current.otherStates[0] });
240+
yield* delivery.process({ ...h.job, state: h.current.state });
241+
const alerts = h.sent.filter((message) => message.alert);
242+
expect(alerts).toHaveLength(1);
243+
expect(alerts[0]?.data).toMatchObject({
244+
alert_title: title,
245+
alert_body: "Fix notifications, Second thread",
246+
alert_path: "/",
247+
active,
248+
});
249+
expect(h.marked.at(-1)?.aggregate?.activities).toHaveLength(2);
250+
}).pipe(Effect.provide(h.layer));
251+
},
252+
);
250253
}
251254

252255
it.effect("filters disabled event types before counting a group", () => {
Collapse file

‎infra/relay/src/agentActivity/FcmDeliveries.ts‎

Copy file name to clipboardExpand all lines: infra/relay/src/agentActivity/FcmDeliveries.ts
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import * as AgentActivityRows from "./AgentActivityRows.ts";
2222
import * as LiveActivities from "./LiveActivities.ts";
2323
import * as FcmDeliveryQueueSender from "./FcmDeliveryQueueSender.ts";
2424
import * as FcmClient from "./FcmClient.ts";
25-
import { androidActivityData, androidActivityHero, fitFcmData } from "./fcmPayloads.ts";
25+
import { androidActivityData, fitFcmData } from "./fcmPayloads.ts";
2626
import { makeAggregateState, statusForPhase } from "./agentActivityAggregate.ts";
2727
import { isExpiredAgentActivityState, notificationForActivity } from "./agentActivityPayloads.ts";
2828
import {
@@ -109,7 +109,9 @@ export function androidAlertForAggregate(input: {
109109
),
110110
alert_title: alert.title,
111111
alert_body: alert.body,
112-
alert_path: androidActivityHero(input.nextAggregate)?.deepLink ?? "/",
112+
// A multi-thread alert targets the overview so one visible thread cannot
113+
// suppress notifications for the other threads in the group.
114+
alert_path: "/",
113115
};
114116
}
115117

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.