The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 23, 20:30 UTC
test(web): remove redundant thread sort fallback tests (#15095)
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
t3-code[bot] committed
Oct 3, 2026 at 16:29 UTC
cfdff56f7b3c9c931ae368224041aa14825649fd
1 file changed
-50
apps/web/src/lib/threadSort.test.ts
-50
@@ -117,56 +117,6 @@ describe("sortThreads", () => {
117
]);
118
});
119
120
- it("falls back to createdAt when updatedAt is invalid", () => {
121
- const sorted = sortThreads(
122
- [
123
- makeThread({
124
- id: ThreadId.make("thread-1"),
125
- createdAt: "2026-03-09T10:00:00.000Z",
126
- updatedAt: "invalid-date" as never,
127
- messages: [],
128
- }),
129
- makeThread({
130
- id: ThreadId.make("thread-2"),
131
- createdAt: "2026-03-09T09:00:00.000Z",
132
- updatedAt: "2026-03-09T09:30:00.000Z",
133
- messages: [],
134
- }),
135
- ],
136
- "updated_at",
137
- );
138
-
139
- expect(sorted.map((thread) => thread.id)).toEqual([
140
- ThreadId.make("thread-1"),
141
- ThreadId.make("thread-2"),
142
- ]);
143
- });
144
-
145
- it("falls back to id ordering when threads have no sortable timestamps", () => {
146
- const sorted = sortThreads(
147
- [
148
- makeThread({
149
- id: ThreadId.make("thread-1"),
150
- createdAt: "invalid-created-at" as never,
151
- updatedAt: "invalid-updated-at" as never,
152
- messages: [],
153
- }),
154
- makeThread({
155
- id: ThreadId.make("thread-2"),
156
- createdAt: "invalid-created-at" as never,
157
- updatedAt: "invalid-updated-at" as never,
158
- messages: [],
159
- }),
160
- ],
161
- "updated_at",
162
- );
163
-
164
- expect(sorted.map((thread) => thread.id)).toEqual([
165
- ThreadId.make("thread-2"),
166
- ThreadId.make("thread-1"),
167
- ]);
168
- });
169
-
120
it("can sort threads by createdAt when configured", () => {
121
const sorted = sortThreads(
122
[