@devries-cameron20 / t3code Mirror · read-only / commits / f15aa815f3
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 23, 04:15 UTC

fix(web): sidebar update pill shows updates on non-default provider instances (#14745)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

Abdurahmon committed Oct 19, 2026 at 00:14 UTC f15aa815f35c739497170f1d0f153ec4a1064732
2 files changed +85 -4
apps/web/src/components/ProviderUpdateLaunchNotification.logic.test.ts
+62
@@ -498,6 +498,68 @@ describe("provider update launch notification logic", () => {
498 });
499 });
500
501 + it("shows the active sidebar pill for an update on a non-default instance", () => {
502 + const view = getProviderUpdateSidebarPillView([
503 + provider({ driver: driver("claudeAgent") }),
504 + provider({
505 + driver: driver("claudeAgent"),
506 + instanceId: instanceId("claude_work"),
507 + updateState: {
508 + status: "running",
509 + startedAt: checkedAt,
510 + finishedAt: null,
511 + message: "Updating provider.",
512 + output: null,
513 + },
514 + }),
515 + ]);
516 +
517 + expect(view).toMatchObject({
518 + key: "loading:claudeAgent:running",
519 + tone: "loading",
520 + title: "Updating Claude",
521 + description: "Claude update in progress.",
522 + });
523 + });
524 +
525 + it("shows the latest terminal sidebar pill across instances of a driver", () => {
526 + const view = getProviderUpdateSidebarPillView(
527 + [
528 + provider({
529 + driver: driver("claudeAgent"),
530 + updateState: {
531 + status: "failed",
532 + startedAt: checkedAt,
533 + finishedAt: checkedAt,
534 + message: "Update command exited with code 1.",
535 + output: null,
536 + },
537 + }),
538 + provider({
539 + driver: driver("claudeAgent"),
540 + instanceId: instanceId("claude_work"),
541 + version: "1.1.0",
542 + latestVersion: "1.1.0",
543 + advisoryStatus: "current",
544 + updateState: {
545 + status: "succeeded",
546 + startedAt: laterCheckedAt,
547 + finishedAt: laterCheckedAt,
548 + message: "Provider updated.",
549 + output: null,
550 + },
551 + }),
552 + ],
553 + { visibleAfterIso: sessionStartedAt },
554 + );
555 +
556 + expect(view).toMatchObject({
557 + key: "succeeded:claudeAgent:2026-04-23T10:01:00.000Z:Provider updated.",
558 + tone: "success",
559 + title: "Claude updated: v1.1.0",
560 + });
561 + });
562 +
563 it("uses the provider name for single failed sidebar pill updates", () => {
564 const view = getProviderUpdateSidebarPillView(
565 [
apps/web/src/components/ProviderUpdateLaunchNotification.logic.ts
+23 -4
@@ -459,12 +459,31 @@ function latestFinishedAtForProviders(providers: ReadonlyArray<ServerProvider>):
459 }, null);
460 }
461
462 +/**
463 + * Collapses terminal update states to the most recently finished instance per
464 + * driver, so an update on a non-default instance is not hidden behind an
465 + * older outcome on the driver's default instance.
466 + */
467 +function latestTerminalProvidersByDriver(providers: ReadonlyArray<ServerProvider>) {
468 + const latestProviderByDriver = new Map<ProviderDriverKind, ServerProvider>();
469 +
470 + for (const provider of providers) {
471 + const current = latestProviderByDriver.get(provider.driver);
472 + if (!current || (getUpdateFinishedAt(provider) ?? "") >= (getUpdateFinishedAt(current) ?? "")) {
473 + latestProviderByDriver.set(provider.driver, provider);
474 + }
475 + }
476 +
477 + return [...latestProviderByDriver.values()];
478 +}
479 +
480 export function getProviderUpdateSidebarPillView(
481 providers: ReadonlyArray<ServerProvider>,
482 options?: ProviderUpdateSidebarPillOptions,
483 ): ProviderUpdateSidebarPillView | null {
466 - const dedupedProviders = dedupeProvidersByDriver(providers);
467 - const activeProviders = dedupedProviders.filter(isProviderUpdateActive);
484 + // Update state is recorded per instance, so pick the instances with an
485 + // update before collapsing to one entry per driver.
486 + const activeProviders = dedupeProvidersByDriver(providers.filter(isProviderUpdateActive));
487 if (activeProviders.length > 0) {
488 const activeProvider = activeProviders[0]!;
489 const activeProviderName =
@@ -486,8 +505,8 @@ export function getProviderUpdateSidebarPillView(
505 };
506 }
507
489 - const recentTerminalProviders = dedupedProviders.filter((provider) =>
490 - isRecentTerminalProvider(provider, options?.visibleAfterIso),
508 + const recentTerminalProviders = latestTerminalProvidersByDriver(
509 + providers.filter((provider) => isRecentTerminalProvider(provider, options?.visibleAfterIso)),
510 );
511 const terminalCandidates: ProviderUpdateSidebarPillView[] = [];
512