Track pin timestamps for projects and threads
- replace boolean pin state with pinnedAt timestamps - update orchestration, persistence, and sidebar sorting
This commit is contained in:
1 parent
f48fcb8afe
commit
3a199bc719
31 files changed
+200
-127
No files matched your search
@@ -118,7 +118,7 @@ it.effect("decodes historical project.created payloads with a default provider",
|
||||
updatedAt: "2026-01-01T00:00:00.000Z",
|
||||
});
|
||||
assert.strictEqual(parsed.defaultModelSelection?.provider, "codex");
|
||||
assert.strictEqual(parsed.pinned, false);
|
||||
assert.strictEqual(parsed.pinnedAt, null);
|
||||
}),
|
||||
);
|
||||
|
||||
@@ -216,7 +216,7 @@ it.effect("decodes thread.created runtime mode for historical events", () =>
|
||||
|
||||
assert.strictEqual(parsed.runtimeMode, DEFAULT_RUNTIME_MODE);
|
||||
assert.strictEqual(parsed.modelSelection.provider, "codex");
|
||||
assert.strictEqual(parsed.pinned, false);
|
||||
assert.strictEqual(parsed.pinnedAt, null);
|
||||
}),
|
||||
);
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@ export const OrchestrationProject = Schema.Struct({
|
||||
id: ProjectId,
|
||||
title: TrimmedNonEmptyString,
|
||||
workspaceRoot: TrimmedNonEmptyString,
|
||||
pinned: Schema.Boolean.pipe(Schema.withDecodingDefault(() => false)),
|
||||
pinnedAt: Schema.NullOr(IsoDateTime).pipe(Schema.withDecodingDefault(() => null)),
|
||||
defaultModelSelection: Schema.NullOr(ModelSelection),
|
||||
scripts: Schema.Array(ProjectScript),
|
||||
createdAt: IsoDateTime,
|
||||
@@ -275,7 +275,7 @@ export const OrchestrationThread = Schema.Struct({
|
||||
id: ThreadId,
|
||||
projectId: ProjectId,
|
||||
title: TrimmedNonEmptyString,
|
||||
pinned: Schema.Boolean.pipe(Schema.withDecodingDefault(() => false)),
|
||||
pinnedAt: Schema.NullOr(IsoDateTime).pipe(Schema.withDecodingDefault(() => null)),
|
||||
modelSelection: ModelSelection,
|
||||
runtimeMode: RuntimeMode,
|
||||
interactionMode: ProviderInteractionMode.pipe(
|
||||
@@ -630,7 +630,7 @@ export const ProjectCreatedPayload = Schema.Struct({
|
||||
projectId: ProjectId,
|
||||
title: TrimmedNonEmptyString,
|
||||
workspaceRoot: TrimmedNonEmptyString,
|
||||
pinned: Schema.Boolean.pipe(Schema.withDecodingDefault(() => false)),
|
||||
pinnedAt: Schema.NullOr(IsoDateTime).pipe(Schema.withDecodingDefault(() => null)),
|
||||
defaultModelSelection: Schema.NullOr(ModelSelection),
|
||||
scripts: Schema.Array(ProjectScript),
|
||||
createdAt: IsoDateTime,
|
||||
@@ -641,7 +641,7 @@ export const ProjectMetaUpdatedPayload = Schema.Struct({
|
||||
projectId: ProjectId,
|
||||
title: Schema.optional(TrimmedNonEmptyString),
|
||||
workspaceRoot: Schema.optional(TrimmedNonEmptyString),
|
||||
pinned: Schema.optional(Schema.Boolean),
|
||||
pinnedAt: Schema.optional(Schema.NullOr(IsoDateTime)),
|
||||
defaultModelSelection: Schema.optional(Schema.NullOr(ModelSelection)),
|
||||
scripts: Schema.optional(Schema.Array(ProjectScript)),
|
||||
updatedAt: IsoDateTime,
|
||||
@@ -656,7 +656,7 @@ export const ThreadCreatedPayload = Schema.Struct({
|
||||
threadId: ThreadId,
|
||||
projectId: ProjectId,
|
||||
title: TrimmedNonEmptyString,
|
||||
pinned: Schema.Boolean.pipe(Schema.withDecodingDefault(() => false)),
|
||||
pinnedAt: Schema.NullOr(IsoDateTime).pipe(Schema.withDecodingDefault(() => null)),
|
||||
modelSelection: ModelSelection,
|
||||
runtimeMode: RuntimeMode.pipe(Schema.withDecodingDefault(() => DEFAULT_RUNTIME_MODE)),
|
||||
interactionMode: ProviderInteractionMode.pipe(
|
||||
@@ -687,7 +687,7 @@ export const ThreadUnarchivedPayload = Schema.Struct({
|
||||
export const ThreadMetaUpdatedPayload = Schema.Struct({
|
||||
threadId: ThreadId,
|
||||
title: Schema.optional(TrimmedNonEmptyString),
|
||||
pinned: Schema.optional(Schema.Boolean),
|
||||
pinnedAt: Schema.optional(Schema.NullOr(IsoDateTime)),
|
||||
modelSelection: Schema.optional(ModelSelection),
|
||||
branch: Schema.optional(Schema.NullOr(TrimmedNonEmptyString)),
|
||||
worktreePath: Schema.optional(Schema.NullOr(TrimmedNonEmptyString)),
|
||||
|
||||
Reference in new issue
Block a user