From eae3fb6e7f6c9715265c18708a2f2ff6140a9967 Mon Sep 17 00:00:00 2001 From: fixfon <12512757+fixfon@users.noreply.github.com> Date: Tue, 13 Oct 2026 13:39:30 +0300 Subject: [PATCH 1/3] fix(mobile): compact Dynamic Island opens the Live Activity's thread --- apps/mobile/src/widgets/AgentActivity.test.ts | 42 +++++++++++++++++++ apps/mobile/src/widgets/AgentActivity.tsx | 35 ++++++++++++---- 2 files changed, 69 insertions(+), 8 deletions(-) diff --git a/apps/mobile/src/widgets/AgentActivity.test.ts b/apps/mobile/src/widgets/AgentActivity.test.ts index 5585ff4237e75..a802ae93ce2e7 100644 --- a/apps/mobile/src/widgets/AgentActivity.test.ts +++ b/apps/mobile/src/widgets/AgentActivity.test.ts @@ -206,6 +206,48 @@ describe("AgentActivity widget layout", () => { ); }); + it("deep links the compact and minimal island to the row that needs attention", () => { + const layout = AgentActivity( + { + ...props, + activeCount: 2, + activities: [ + makeRow({}), + makeRow({ + threadId: "thread-2", + phase: "waiting_for_approval", + status: "Approval", + deepLink: "/threads/env-1/thread-2", + }), + ], + }, + environment as never, + ); + for (const region of [layout.compactLeading, layout.compactTrailing, layout.minimal]) { + const serialized = JSON.stringify(region); + expect(serialized).toContain('"widgetURL":"t3code://threads/env-1/thread-2"'); + expect(serialized.match(/widgetURL/g)).toHaveLength(1); + } + }); + + it("deep links the compact and minimal island to the lead row when nothing needs attention", () => { + const layout = AgentActivity( + { + ...props, + activities: [ + makeRow({ phase: "completed", status: "Done" }), + makeRow({ threadId: "thread-2", deepLink: "/threads/env-1/thread-2" }), + ], + }, + environment as never, + ); + for (const region of [layout.compactLeading, layout.compactTrailing, layout.minimal]) { + const serialized = JSON.stringify(region); + expect(serialized).toContain('"widgetURL":"t3code://threads/env-1/thread-2"'); + expect(serialized).not.toContain("thread-1"); + } + }); + it("omits the deep link for unsafe paths and empty aggregates", () => { expect(JSON.stringify(AgentActivity(props, environment as never))).not.toContain("widgetURL"); expect( diff --git a/apps/mobile/src/widgets/AgentActivity.tsx b/apps/mobile/src/widgets/AgentActivity.tsx index 02c2a13930695..129375100fa5e 100644 --- a/apps/mobile/src/widgets/AgentActivity.tsx +++ b/apps/mobile/src/widgets/AgentActivity.tsx @@ -158,6 +158,10 @@ export function AgentActivity( deepLinkRow && deepLinkRow.deepLink.startsWith("/") && !deepLinkRow.deepLink.startsWith("//") ? `t3code://${deepLinkRow.deepLink.slice(1)}` : null; + // iOS gives each compact / minimal island region a single tap target (no + // per-region Link). The activity's attributes URL can't serve it: it's fixed + // at start, while the target thread changes with every update. + const linkModifiers = deepLink ? [widgetURL(deepLink)] : []; type SFName = NonNullable["systemName"]>; const phaseSymbol = (phase: AgentActivityPhase): SFName => { @@ -182,8 +186,15 @@ export function AgentActivity( // SF Symbols, like the logo, ignore frame/foregroundStyle applied directly to // the image; size + tint them through a container the resizable symbol fills. - const renderGlyph = (systemName: SFName, size: number, color: Foreground) => ( - + const renderGlyph = ( + systemName: SFName, + size: number, + color: Foreground, + modifiers: typeof linkModifiers = [], + ) => ( + ); @@ -223,8 +234,10 @@ export function AgentActivity( // dropped), so we size it via a container frame the resizable image fills and // tint it through the container's foreground style, which the template image // inherits. - const renderLogo = (height: number, color: Foreground) => ( - + const renderLogo = (height: number, color: Foreground, modifiers: typeof linkModifiers = []) => ( + ); @@ -315,9 +328,15 @@ export function AgentActivity( ) : null} ), - compactLeading: renderLogo(14, tint), + compactLeading: renderLogo(14, tint, linkModifiers), compactTrailing: ( - + {attentionRow ? attentionRow.phase === "waiting_for_approval" ? "Approval" @@ -327,8 +346,8 @@ export function AgentActivity( ), minimal: (attentionRow || failedRow || allDone) && heroRow - ? renderGlyph(phaseSymbol(heroRow.phase), 13, phaseTint(heroRow.phase)) - : renderLogo(11, tint), + ? renderGlyph(phaseSymbol(heroRow.phase), 13, phaseTint(heroRow.phase), linkModifiers) + : renderLogo(11, tint, linkModifiers), expandedLeading: ( {renderLogo(15, tint)} From abf83427b7abd1ea191a134bd9b42a3540ba59e1 Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Mon, 19 Oct 2026 04:12:29 +0000 Subject: [PATCH 2/3] fix(mobile): keep compact activity links focused on current thread --- apps/mobile/src/widgets/AgentActivity.test.ts | 42 ------------------- apps/mobile/src/widgets/AgentActivity.tsx | 3 -- 2 files changed, 45 deletions(-) diff --git a/apps/mobile/src/widgets/AgentActivity.test.ts b/apps/mobile/src/widgets/AgentActivity.test.ts index a802ae93ce2e7..5585ff4237e75 100644 --- a/apps/mobile/src/widgets/AgentActivity.test.ts +++ b/apps/mobile/src/widgets/AgentActivity.test.ts @@ -206,48 +206,6 @@ describe("AgentActivity widget layout", () => { ); }); - it("deep links the compact and minimal island to the row that needs attention", () => { - const layout = AgentActivity( - { - ...props, - activeCount: 2, - activities: [ - makeRow({}), - makeRow({ - threadId: "thread-2", - phase: "waiting_for_approval", - status: "Approval", - deepLink: "/threads/env-1/thread-2", - }), - ], - }, - environment as never, - ); - for (const region of [layout.compactLeading, layout.compactTrailing, layout.minimal]) { - const serialized = JSON.stringify(region); - expect(serialized).toContain('"widgetURL":"t3code://threads/env-1/thread-2"'); - expect(serialized.match(/widgetURL/g)).toHaveLength(1); - } - }); - - it("deep links the compact and minimal island to the lead row when nothing needs attention", () => { - const layout = AgentActivity( - { - ...props, - activities: [ - makeRow({ phase: "completed", status: "Done" }), - makeRow({ threadId: "thread-2", deepLink: "/threads/env-1/thread-2" }), - ], - }, - environment as never, - ); - for (const region of [layout.compactLeading, layout.compactTrailing, layout.minimal]) { - const serialized = JSON.stringify(region); - expect(serialized).toContain('"widgetURL":"t3code://threads/env-1/thread-2"'); - expect(serialized).not.toContain("thread-1"); - } - }); - it("omits the deep link for unsafe paths and empty aggregates", () => { expect(JSON.stringify(AgentActivity(props, environment as never))).not.toContain("widgetURL"); expect( diff --git a/apps/mobile/src/widgets/AgentActivity.tsx b/apps/mobile/src/widgets/AgentActivity.tsx index 129375100fa5e..4c28fb0d8f745 100644 --- a/apps/mobile/src/widgets/AgentActivity.tsx +++ b/apps/mobile/src/widgets/AgentActivity.tsx @@ -158,9 +158,6 @@ export function AgentActivity( deepLinkRow && deepLinkRow.deepLink.startsWith("/") && !deepLinkRow.deepLink.startsWith("//") ? `t3code://${deepLinkRow.deepLink.slice(1)}` : null; - // iOS gives each compact / minimal island region a single tap target (no - // per-region Link). The activity's attributes URL can't serve it: it's fixed - // at start, while the target thread changes with every update. const linkModifiers = deepLink ? [widgetURL(deepLink)] : []; type SFName = NonNullable["systemName"]>; From 73b4b39ec4344a701c18bae0e25abaf6d6b1cfc5 Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Mon, 19 Oct 2026 04:18:28 +0000 Subject: [PATCH 3/3] chore(mobile): retrigger checks for compact activity links