feat(HAI-100): add columnMovedAt timestamp and sort board tasks by move order
- Add columnMovedAt field to task types - Set columnMovedAt on task creation and column moves in store - Sort tasks by columnMovedAt descending in Board component - Add store tests for columnMovedAt behavior
This commit is contained in:
@@ -188,6 +188,7 @@ export class TaskStore extends EventEmitter<TaskStoreEvents> {
|
||||
steps: [],
|
||||
currentStep: 0,
|
||||
log: [{ timestamp: now, action: "Task created" }],
|
||||
columnMovedAt: now,
|
||||
createdAt: now,
|
||||
updatedAt: now,
|
||||
};
|
||||
@@ -263,7 +264,8 @@ export class TaskStore extends EventEmitter<TaskStoreEvents> {
|
||||
|
||||
const fromColumn = task.column;
|
||||
task.column = toColumn;
|
||||
task.updatedAt = new Date().toISOString();
|
||||
task.columnMovedAt = new Date().toISOString();
|
||||
task.updatedAt = task.columnMovedAt;
|
||||
|
||||
// Clear transient fields when moving to done (matches moveToDone behavior)
|
||||
if (toColumn === "done") {
|
||||
@@ -605,7 +607,8 @@ export class TaskStore extends EventEmitter<TaskStoreEvents> {
|
||||
task.worktree = undefined;
|
||||
task.status = undefined;
|
||||
task.blockedBy = undefined;
|
||||
task.updatedAt = new Date().toISOString();
|
||||
task.columnMovedAt = new Date().toISOString();
|
||||
task.updatedAt = task.columnMovedAt;
|
||||
|
||||
await this.atomicWriteTaskJson(dir, task);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user