authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-09-05 01:19:42-07:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-09-05 01:19:42-07:00
log37bf4e6ec4f18fb94e7ec04436a947d14642a5b6
tree7b6059faaa7eddced9cd67d6d7941a487ffb0c99
parent31fb21009024e9476bda4705355d55491d7fd2ef
signature Signed by PGP key B5690EEEBB952194

refactor(mobile): remove unused awareness relay URL normalizer (#10029)


2 files changed, 0 insertions(+), 18 deletions(-)

apps/mobile/src/features/agent-awareness/remoteRegistration.test.ts-8
...@@ -33,7 +33,6 @@ import {...@@ -33,7 +33,6 @@ import {
33 mergeAgentAwarenessRegistrationPreferences,33 mergeAgentAwarenessRegistrationPreferences,
34 refreshActiveLiveActivityRemoteRegistration,34 refreshActiveLiveActivityRemoteRegistration,
35 refreshAgentAwarenessRegistration,35 refreshAgentAwarenessRegistration,
36 normalizeAgentAwarenessRelayBaseUrl,
37 registerAgentAwarenessConnection,36 registerAgentAwarenessConnection,
38 registerLiveActivityPushToken,37 registerLiveActivityPushToken,
39 releaseAgentAwarenessRelayTokenProvider,38 releaseAgentAwarenessRelayTokenProvider,
...@@ -363,13 +362,6 @@ describe("makeRelayDeviceRegistrationRequest", () => {...@@ -363,13 +362,6 @@ describe("makeRelayDeviceRegistrationRequest", () => {
363 });362 });
364 });363 });
365364
366 it("normalizes relay base URLs for APNs registration requests", () => {
367 expect(normalizeAgentAwarenessRelayBaseUrl(" https://relay.example.test/// ")).toBe(
368 "https://relay.example.test",
369 );
370 expect(normalizeAgentAwarenessRelayBaseUrl(" ")).toBeNull();
371 });
372
373 it("overrides persisted preferences for an in-flight registration", () => {365 it("overrides persisted preferences for an in-flight registration", () => {
374 expect(366 expect(
375 mergeAgentAwarenessRegistrationPreferences(367 mergeAgentAwarenessRegistrationPreferences(
apps/mobile/src/features/agent-awareness/remoteRegistration.ts-10
...@@ -139,16 +139,6 @@ export function mergeAgentAwarenessRegistrationPreferences(...@@ -139,16 +139,6 @@ export function mergeAgentAwarenessRegistrationPreferences(
139 return { ...stored, ...override };139 return { ...stored, ...override };
140}140}
141141
142export function normalizeAgentAwarenessRelayBaseUrl(
143 value: string | null | undefined,
144): string | null {
145 const trimmed = value?.trim();
146 if (!trimmed) {
147 return null;
148 }
149 return trimmed.replace(/\/+$/g, "");
150}
151
152function readRelayConfig(): { readonly url: string } | null {142function readRelayConfig(): { readonly url: string } | null {
153 const relayUrl = resolveCloudPublicConfig().relay.url;143 const relayUrl = resolveCloudPublicConfig().relay.url;
154 if (!relayUrl) {144 if (!relayUrl) {