| ... | @@ -18,17 +18,14 @@ import { | ... | @@ -18,17 +18,14 @@ import { |
| 18 | environmentGroupsWithUpdates, | 18 | environmentGroupsWithUpdates, |
| 19 | firstFailedProviderUpdateMessage, | 19 | firstFailedProviderUpdateMessage, |
| 20 | firstRejectedProviderUpdateMessage, | 20 | firstRejectedProviderUpdateMessage, |
| 21 | firstUnsuccessfulSecondaryProviderOutcome, | | |
| 22 | getProviderUpdateInitialToastView, | 21 | getProviderUpdateInitialToastView, |
| 23 | getProviderUpdateProgressToastView, | 22 | getProviderUpdateProgressToastView, |
| 24 | getProviderUpdateRejectedToastView, | 23 | getProviderUpdateRejectedToastView, |
| 25 | getProviderUpdateSidebarPillView, | 24 | getProviderUpdateSidebarPillView, |
| 26 | getSingleProviderUpdateProgressToastView, | | |
| 27 | hasOneClickUpdateProviderCandidate, | 25 | hasOneClickUpdateProviderCandidate, |
| 28 | isProviderUpdateCandidate, | 26 | isProviderUpdateCandidate, |
| 29 | isTerminalProviderUpdatePhase, | 27 | isTerminalProviderUpdatePhase, |
| 30 | localEnvironmentUpdateNotificationKey, | 28 | localEnvironmentUpdateNotificationKey, |
| 31 | parseWslDistroFromInstanceId, | | |
| 32 | providerUpdateNotificationKey, | 29 | providerUpdateNotificationKey, |
| 33 | resolveEnvironmentUpdateRowStatus, | 30 | resolveEnvironmentUpdateRowStatus, |
| 34 | shouldShowPrimaryProviderUpdateToast, | 31 | shouldShowPrimaryProviderUpdateToast, |
| ... | @@ -368,28 +365,6 @@ describe("provider update launch notification logic", () => { | ... | @@ -368,28 +365,6 @@ describe("provider update launch notification logic", () => { |
| 368 | }); | 365 | }); |
| 369 | }); | 366 | }); |
| 370 | | 367 | |
| 371 | it("resolves a single-provider completion view from the returned provider snapshot", () => { | | |
| 372 | const view = getSingleProviderUpdateProgressToastView( | | |
| 373 | provider({ | | |
| 374 | driver: driver("codex"), | | |
| 375 | updateState: { | | |
| 376 | status: "failed", | | |
| 377 | startedAt: checkedAt, | | |
| 378 | finishedAt: checkedAt, | | |
| 379 | message: "command failed", | | |
| 380 | output: "stderr", | | |
| 381 | }, | | |
| 382 | }), | | |
| 383 | ); | | |
| 384 | | | |
| 385 | expect(view).toMatchObject({ | | |
| 386 | phase: "failed", | | |
| 387 | type: "error", | | |
| 388 | title: "Codex v1.1.0 update failed", | | |
| 389 | description: "command failed", | | |
| 390 | }); | | |
| 391 | }); | | |
| 392 | | | |
| 393 | it("keeps unchanged providers actionable from settings", () => { | 368 | it("keeps unchanged providers actionable from settings", () => { |
| 394 | const view = getProviderUpdateProgressToastView({ | 369 | const view = getProviderUpdateProgressToastView({ |
| 395 | providers: [ | 370 | providers: [ |
| ... | @@ -444,31 +419,6 @@ describe("provider update launch notification logic", () => { | ... | @@ -444,31 +419,6 @@ describe("provider update launch notification logic", () => { |
| 444 | }); | 419 | }); |
| 445 | }); | 420 | }); |
| 446 | | 421 | |
| 447 | it("uses the updated version in the single-provider success toast title", () => { | | |
| 448 | const view = getSingleProviderUpdateProgressToastView( | | |
| 449 | provider({ | | |
| 450 | driver: driver("codex"), | | |
| 451 | version: "1.1.0", | | |
| 452 | latestVersion: "1.1.0", | | |
| 453 | advisoryStatus: "current", | | |
| 454 | updateState: { | | |
| 455 | status: "succeeded", | | |
| 456 | startedAt: checkedAt, | | |
| 457 | finishedAt: checkedAt, | | |
| 458 | message: "Provider updated.", | | |
| 459 | output: null, | | |
| 460 | }, | | |
| 461 | }), | | |
| 462 | ); | | |
| 463 | | | |
| 464 | expect(view).toMatchObject({ | | |
| 465 | phase: "succeeded", | | |
| 466 | type: "success", | | |
| 467 | title: "Codex updated: v1.1.0", | | |
| 468 | description: "New sessions will use the updated provider.", | | |
| 469 | }); | | |
| 470 | }); | | |
| 471 | | | |
| 472 | it("falls back to a rejected RPC message for transport-level failures", () => { | 422 | it("falls back to a rejected RPC message for transport-level failures", () => { |
| 473 | const results = [AsyncResult.failure(Cause.die(new Error("WebSocket closed")))]; | 423 | const results = [AsyncResult.failure(Cause.die(new Error("WebSocket closed")))]; |
| 474 | | 424 | |
| ... | @@ -814,39 +764,6 @@ describe("provider update launch notification logic", () => { | ... | @@ -814,39 +764,6 @@ describe("provider update launch notification logic", () => { |
| 814 | expect(snapshots).toEqual([primary]); | 764 | expect(snapshots).toEqual([primary]); |
| 815 | }); | 765 | }); |
| 816 | | 766 | |
| 817 | it("flags the first unsuccessful secondary outcome, skipping the primary and successes", () => { | | |
| 818 | const primaryFailed = provider({ | | |
| 819 | driver: driver("codex"), | | |
| 820 | updateState: terminalState("failed", "primary boom"), | | |
| 821 | }); | | |
| 822 | | | |
| 823 | expect( | | |
| 824 | firstUnsuccessfulSecondaryProviderOutcome([ | | |
| 825 | fulfilledOutcome(true, primaryFailed), | | |
| 826 | fulfilledOutcome( | | |
| 827 | false, | | |
| 828 | provider({ | | |
| 829 | driver: driver("codex"), | | |
| 830 | updateState: terminalState("succeeded", "ok"), | | |
| 831 | }), | | |
| 832 | ), | | |
| 833 | ]), | | |
| 834 | ).toBeNull(); | | |
| 835 | | | |
| 836 | expect( | | |
| 837 | firstUnsuccessfulSecondaryProviderOutcome([ | | |
| 838 | fulfilledOutcome(true, primaryFailed), | | |
| 839 | fulfilledOutcome( | | |
| 840 | false, | | |
| 841 | provider({ | | |
| 842 | driver: driver("codex"), | | |
| 843 | updateState: terminalState("failed", "wsl boom"), | | |
| 844 | }), | | |
| 845 | ), | | |
| 846 | ]), | | |
| 847 | ).toMatchObject({ status: "failed", provider: { updateState: { message: "wsl boom" } } }); | | |
| 848 | }); | | |
| 849 | | | |
| 850 | it("treats a rejected dispatch as not contributing a snapshot", () => { | 767 | it("treats a rejected dispatch as not contributing a snapshot", () => { |
| 851 | const primary = provider({ | 768 | const primary = provider({ |
| 852 | driver: driver("codex"), | 769 | driver: driver("codex"), |
| ... | @@ -995,14 +912,6 @@ describe("provider update launch notification logic", () => { | ... | @@ -995,14 +912,6 @@ describe("provider update launch notification logic", () => { |
| 995 | }), | 912 | }), |
| 996 | ).toBe("My Device"); | 913 | ).toBe("My Device"); |
| 997 | }); | 914 | }); |
| 998 | | | |
| 999 | it("parses the WSL distro from the backend instance id", () => { | | |
| 1000 | expect(parseWslDistroFromInstanceId("wsl:ubuntu")).toBe("ubuntu"); | | |
| 1001 | expect(parseWslDistroFromInstanceId("wsl:default")).toBeNull(); | | |
| 1002 | expect(parseWslDistroFromInstanceId("wsl:")).toBeNull(); | | |
| 1003 | expect(parseWslDistroFromInstanceId("ssh:host")).toBeNull(); | | |
| 1004 | expect(parseWslDistroFromInstanceId(undefined)).toBeNull(); | | |
| 1005 | }); | | |
| 1006 | }); | 915 | }); |
| 1007 | | 916 | |
| 1008 | describe("isTerminalProviderUpdatePhase", () => { | 917 | describe("isTerminalProviderUpdatePhase", () => { |