@devries-cameron20 / t3code-1 / commits / 1d7af6591b
Fork 0

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

fix(mobile): fork rows show a readable label instead of a thread ID (#22064)

Co-authored-by: Jeremiah Jordan <zanson@zanson.org> Co-authored-by: GPT-6.1-Sol <noreply@openai.com> Co-authored-by: maria-rcks <maria@kuuro.net>

Jeremiah Jordan committed Oct 29, 2026 at 12:45 UTC 1d7af6591b8d6011bc449596d2be6184ab6c5c67
2 files changed +36
apps/mobile/src/lib/threadActivity.test.ts
+35
@@ -24,6 +24,7 @@ import { describe, expect, it } from "vite-plus/test";
24
25 import {
26 buildThreadFeed,
27 + workEntryRowLabel,
28 threadFeedCompactionLabels,
29 createThreadFeedCache,
30 deriveThreadFeedPresentation,
@@ -731,6 +732,40 @@ describe("buildThreadFeed", () => {
732 expect(activities.at(-1)?.prominent).toBe(true);
733 });
734
735 + it.each([
736 + ["local", undefined],
737 + ["inherited", undefined],
738 + ["synthetic", undefined],
739 + ["synthetic", "Forked from conversation"],
740 + ] as const)(
741 + "labels a %s fork row with title %s without exposing its target ID",
742 + (visibility, title) => {
743 + const { providerThreadId: _providerThreadId, ...forkBase } = base(
744 + "item-fork",
745 + "2026-06-20T00:00:03.000Z",
746 + 2,
747 + );
748 + const activity = buildThreadFeed([
749 + projected(
750 + {
751 + ...forkBase,
752 + type: "fork",
753 + title: title ?? null,
754 + source: { type: "run", threadId: sourceThreadId, runId },
755 + targetThreadId: threadId,
756 + },
757 + 0,
758 + visibility,
759 + ),
760 + ]).flatMap((entry) => (entry.type === "activity-group" ? entry.activities : []))[0]!;
761 +
762 + expect(workEntryRowLabel(activity.workEntry)).toBe(title ?? "Thread forked");
763 + expect(workEntryRowLabel(activity.workEntry, true)).toBe(title ?? "Thread forked");
764 + expect(activity.canExpand).toBe(true);
765 + expect(activity.getFullDetail()).toContain(threadId);
766 + },
767 + );
768 +
769 it("names the fold that hides a progress message, with or without a run", () => {
770 const middle = {
771 ...assistantMessage("2026-06-20T00:00:02.500Z"),
apps/mobile/src/lib/threadActivity.ts
+1
@@ -253,6 +253,7 @@ function compactWorkEntryText(value: string): string {
253 }
254
255 export function workEntryRowLabel(entry: WorkLogPresentationEntry, expanded = false): string {
256 + if (entry.itemType === "fork") return entry.label;
257 if (expanded && entry.itemType === "reasoning")
258 return entry.toolLifecycleStatus === "inProgress" ? "Thinking" : "Thought";
259 const presentation = resolveWorkEntryToolPresentation(entry);