feat: order streams by last child creation

This commit is contained in:
talksik
2026-03-19 10:46:19 -07:00
parent 0723afc412
commit 71dd0149bc
7 changed files with 76 additions and 35 deletions
+3
View File
@@ -138,6 +138,9 @@ export const ParticleSchema = z.discriminatedUnion("type", [
visible_to: z.array(z.string()),
// Marks emails to their `playback_position_at`: where they left off in a conversation
markers: z.record(z.string(), z.coerce.date()).optional(),
// Timestamp of the most recent child particle
// used for sorting streams by recent activity without needing to query subcollections
last_child_created_at: z.coerce.date().optional(),
}),
ParticleBaseSchema.extend({
type: z.literal("folder"), properties: FolderPropertiesSchema,