| @@ -18,17 +18,14 @@ import { · 17 unmodified lines |
| 18 | 18 | environmentGroupsWithUpdates, |
| 19 | 19 | firstFailedProviderUpdateMessage, |
| 20 | 20 | firstRejectedProviderUpdateMessage, |
| 21 | | − firstUnsuccessfulSecondaryProviderOutcome, |
| 22 | 21 | getProviderUpdateInitialToastView, |
| 23 | 22 | getProviderUpdateProgressToastView, |
| 24 | 23 | getProviderUpdateRejectedToastView, |
| 25 | 24 | getProviderUpdateSidebarPillView, |
| 26 | | − getSingleProviderUpdateProgressToastView, |
| 27 | 25 | hasOneClickUpdateProviderCandidate, |
| 28 | 26 | isProviderUpdateCandidate, |
| 29 | 27 | isTerminalProviderUpdatePhase, |
| 30 | 28 | localEnvironmentUpdateNotificationKey, |
| 31 | | − parseWslDistroFromInstanceId, |
| 32 | 29 | providerUpdateNotificationKey, |
| 33 | 30 | resolveEnvironmentUpdateRowStatus, |
| 34 | 31 | shouldShowPrimaryProviderUpdateToast, |
| @@ -368,28 +365,6 @@ describe("provider update launch notification logic", () => { · 333 unmodified lines |
| 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 | 368 | it("keeps unchanged providers actionable from settings", () => { |
| 394 | 369 | const view = getProviderUpdateProgressToastView({ |
| 395 | 370 | providers: [ |
| @@ -444,31 +419,6 @@ describe("provider update launch notification logic", () => { · 48 unmodified lines |
| 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 | 422 | it("falls back to a rejected RPC message for transport-level failures", () => { |
| 473 | 423 | const results = [AsyncResult.failure(Cause.die(new Error("WebSocket closed")))]; |
| 474 | 424 | |
| @@ -814,39 +764,6 @@ describe("provider update launch notification logic", () => { · 339 unmodified lines |
| 814 | 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 | 767 | it("treats a rejected dispatch as not contributing a snapshot", () => { |
| 851 | 768 | const primary = provider({ |
| 852 | 769 | driver: driver("codex"), |
| @@ -995,14 +912,6 @@ describe("provider update launch notification logic", () => { · 142 unmodified lines |
| 995 | 912 | }), |
| 996 | 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 | 917 | describe("isTerminalProviderUpdatePhase", () => { |