Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(clients): Working section keeps its order while agents finish and wake #15418

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/15418/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

Showing 10 changed files with 46 additions and 24 deletions (loading 7).

x
0 of 10 viewed, 10 left
3 additions and 2 deletionsapps/mobile/src/features/threads/threadListV2.tsModified
View file
@@ -15,6 +15,7 @@
createInboxReturnTracker,
isThreadWorking,
sortInboxThreadsByReturn,
+ sortWorkingThreadsBySend,
} from "@t3tools/client-runtime/state/thread-inbox";
import {
sortActiveThreadsByOrderKey,
@@ -728,8 +729,8 @@
const orderedActive = workingShelfEnabled
? sortInboxThreadsByReturn(active, input.inboxReturnAt)
: applyPendingThreadOrder(sortThreadsForListV2(active), "active", pending);
- // Newest work first, by the same clock as the inbox.
- const orderedWorking = sortInboxThreadsByReturn(working);
+ // Newest send first; finishing and waking again do not move a row.
+ const orderedWorking = sortWorkingThreadsBySend(working);
const orderedSnoozed = [...snoozed].sort(
(left, right) =>
parseTimestampMs(left.snoozedUntil ?? "") - parseTimestampMs(right.snoozedUntil ?? ""),
8 additions and 0 deletionsapps/server/src/orchestration-v2/ProjectionSettlement.test.tsModified
View file
@@ -343,6 +343,14 @@
DateTime.formatIso(candidate.latestUserAuthoredMessageAt!),
DateTime.formatIso(written),
+ // The shell carries the same stamp, which orders the Working section.
+ const shellThread = (yield* store.getShellSnapshot()).threads.find(