Skip to content

Commit 57db029

Browse files
fix(ui): stabilize archived task story timestamps
Generated-By: PostHog Code Task-Id: b21ae89d-1bf8-49fa-a781-cb96dae2e61f
1 parent f640f6f commit 57db029

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

packages/ui/src/features/archive/ArchivedTasksView.stories.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,13 @@ import {
77
import { Box } from "@radix-ui/themes";
88
import type { Meta, StoryObj } from "@storybook/react-vite";
99

10+
const STORY_NOW = Date.parse("2026-07-01T10:30:00Z");
11+
const DAY_IN_MS = 86_400_000;
12+
1013
function createArchivedTask(id: string, daysAgo: number): ArchivedTask {
1114
return {
1215
taskId: id,
13-
archivedAt: new Date(Date.now() - daysAgo * 86400000).toISOString(),
16+
archivedAt: new Date(STORY_NOW - daysAgo * DAY_IN_MS).toISOString(),
1417
folderId: "folder-1",
1518
mode: "worktree",
1619
worktreeName: "feature-wt",
@@ -25,7 +28,7 @@ function createTask(
2528
daysAgo: number,
2629
repo: string,
2730
): Task {
28-
const now = new Date(Date.now() - daysAgo * 86400000).toISOString();
31+
const now = new Date(STORY_NOW - daysAgo * DAY_IN_MS).toISOString();
2932
return {
3033
id,
3134
task_number: null,

0 commit comments

Comments
 (0)