The best way to control Claude Code, Codex and more from any computer or phone
fix(mobile): finished threads leave Working once the grace ends (#28169)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Shawn committed
Oct 31, 2026 at 22:46 UTC
be58795d37a6d70b9480f63d9a03f132e820124f
1 file changed
+12
-2
apps/mobile/src/features/threads/useThreadListV2.ts
+12
-2
@@ -27,6 +27,17 @@ function useKeySet(newlineSeparatedKeys: string): ReadonlySet<string> {
27
28
type LayoutInput = Parameters<typeof buildThreadListV2Items>[0];
29
30
+/**
31
+ * The React Compiler memoizes on the values a callback reads and drops unread entries from a
32
+ * dependency list, so the version that marks an expired grace must be read to rebuild the list.
33
+ */
34
+function observeInbox(
35
+ threads: Parameters<typeof threadListInboxReturns.observe>[0],
36
+ _expiredGraceVersion: number,
37
+) {
38
+ return threadListInboxReturns.observe(threads);
39
+}
40
+
41
/**
42
* Home's and the thread sidebar's thread list. Its result is one value a screen only reads:
43
* built inline, the list's inputs stayed open to mutation across the screen's other hooks, so
@@ -62,8 +73,7 @@ export function useThreadListV2(input: {
73
threadListInboxReturns.getSnapshot,
74
);
75
const inbox = useMemo(
65
- () => threadListInboxReturns.observe(workingShelfEnabled ? threads : null),
66
- // oxlint-disable-next-line react/memo-dependencies -- the version signals an expired grace
76
+ () => observeInbox(workingShelfEnabled ? threads : null, inboxVersion),
77
[threads, workingShelfEnabled, inboxVersion],
78
);
79
// Up/down menu availability for every card, computed once per section per