From e4b3bbd3a2d2b327ba84f528706cf12fd5ddc832 Mon Sep 17 00:00:00 2001 From: spoukyii <61633921+spoukyii@users.noreply.github.com> Date: Tue, 3 Nov 2026 12:17:47 -0800 Subject: [PATCH 1/2] test(mobile): cover a long untitled subagent prompt that ends on an emoji --- .../src/features/threads/threadAgentsPresentation.test.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/mobile/src/features/threads/threadAgentsPresentation.test.ts b/apps/mobile/src/features/threads/threadAgentsPresentation.test.ts index 171d73a148597..e0771be61c5eb 100644 --- a/apps/mobile/src/features/threads/threadAgentsPresentation.test.ts +++ b/apps/mobile/src/features/threads/threadAgentsPresentation.test.ts @@ -64,10 +64,15 @@ describe("resolveSubagentRowPresentation", () => { it("falls back to a trimmed prompt when the agent has no title", () => { const long = resolveSubagentRowPresentation({ ...base, prompt: "x".repeat(200) }); + const emoji = resolveSubagentRowPresentation({ + ...base, + prompt: `${"x".repeat(76)}😀 and more`, + }); const titled = resolveSubagentRowPresentation({ ...base, title: "Subagent: /root/my_worker" }); expect(long.title).toHaveLength(80); expect(long.title.endsWith("...")).toBe(true); + expect(emoji.title).toBe(`${"x".repeat(76)}...`); expect(titled.title).toBe("My Worker"); }); From 5a89ae6ceb6e60f76df96da8e965373bb1e316f7 Mon Sep 17 00:00:00 2001 From: spoukyii <61633921+spoukyii@users.noreply.github.com> Date: Tue, 3 Nov 2026 12:17:56 -0800 Subject: [PATCH 2/2] fix(mobile): untitled subagent rows no longer end in a broken character The Agents sheet titles a subagent that has no title of its own from its prompt, cut at 77 UTF-16 code units with "..." added. When an emoji straddled the cut, the title kept only its high surrogate and ended in a replacement character before the "...". The row itself is one line and cuts the title off well before that point, but the Stop confirmation dialog ("Stop