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 device diagnostics migration, failed-delivery display, and per-de… · pingdotgg/t3code@a97e0b6

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • apps/mobile/src/features/agent-awareness
    • deviceDiagnostics.test.ts
    • deviceDiagnostics.ts
  • infra/relay
    • migrations/postgres/20260704031500_add_mobile_device_apns_route
      • migration.sql
      • snapshot.json
    • src/agentActivity
      • Devices.test.ts
      • Devices.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎apps/mobile/src/features/agent-awareness/deviceDiagnostics.test.ts‎

Copy file name to clipboardExpand all lines: apps/mobile/src/features/agent-awareness/deviceDiagnostics.test.ts
+22Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,28 @@ describe("formatDeviceDiagnosticsRows", () => {
6969
]);
7070
});
7171

72+
it("treats a non-2xx delivery status without a reason as a failure", () => {
73+
const rows = formatDeviceDiagnosticsRows(
74+
makeDevice({
75+
bundleId: "com.t3tools.t3code.preview",
76+
apsEnvironment: "production",
77+
hasPushToken: true,
78+
hasPushToStartToken: true,
79+
hasLiveActivityToken: true,
80+
lastDeliveryAt: "2026-06-05T01:02:59.566Z",
81+
lastDeliveryKind: "live_activity_end",
82+
lastDeliveryStatus: 400,
83+
lastDeliveryError: null,
84+
}),
85+
);
86+
87+
expect(rows[4]).toEqual({
88+
label: "Last Delivery",
89+
value: "Delivery failed (400)",
90+
tone: "warn",
91+
});
92+
});
93+
7294
it("reports healthy registrations with a successful delivery", () => {
7395
const rows = formatDeviceDiagnosticsRows(
7496
makeDevice({
Collapse file

‎apps/mobile/src/features/agent-awareness/deviceDiagnostics.ts‎

Copy file name to clipboardExpand all lines: apps/mobile/src/features/agent-awareness/deviceDiagnostics.ts
+9-2Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,21 @@ export function formatDeviceDiagnosticsRows(
7373
});
7474
}
7575

76+
// APNs can fail with a non-2xx status without a reason body, so a null
77+
// error alone does not mean the delivery succeeded.
78+
const deliveryFailed =
79+
diagnostics.lastDeliveryError !== null ||
80+
(diagnostics.lastDeliveryStatus !== null &&
81+
(diagnostics.lastDeliveryStatus < 200 || diagnostics.lastDeliveryStatus >= 300));
82+
7683
if (diagnostics.lastDeliveryAt === null) {
7784
rows.push({ label: "Last Delivery", value: "None yet", tone: "muted" });
78-
} else if (diagnostics.lastDeliveryError !== null) {
85+
} else if (deliveryFailed) {
7986
const status =
8087
diagnostics.lastDeliveryStatus === null ? "" : ` (${diagnostics.lastDeliveryStatus})`;
8188
rows.push({
8289
label: "Last Delivery",
83-
value: `${diagnostics.lastDeliveryError}${status}`,
90+
value: `${diagnostics.lastDeliveryError ?? "Delivery failed"}${status}`,
8491
tone: "warn",
8592
});
8693
} else {
Collapse file

‎infra/relay/migrations/postgres/20260704031500_add_mobile_device_apns_route/migration.sql‎

Copy file name to clipboard
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ALTER TABLE "relay_mobile_devices" ADD COLUMN "bundle_id" varchar(255);
2+
--> statement-breakpoint
3+
ALTER TABLE "relay_mobile_devices" ADD COLUMN "aps_environment" varchar(16);

0 commit comments

Comments
0 (0)
You are visitor 01402775 — 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.