@@ -5,6 +5,9 @@ import type { ProjectConfig } from "./config";
55import type { FrontendWorkspaceMetadata } from "./types/workspace" ;
66import type { IPCApi } from "./types/ipc" ;
77
8+ // Stable timestamp for visual testing (Apple demo time: Jan 24, 2024, 9:41 AM PST)
9+ const STABLE_TIMESTAMP = new Date ( '2024-01-24T09:41:00-08:00' ) . getTime ( ) ;
10+
811// Mock window.api for App component
912function setupMockAPI ( options : {
1013 projects ?: Map < string , ProjectConfig > ;
@@ -374,7 +377,7 @@ export const ActiveWorkspaceWithChat: Story = {
374377 parts : [ { type : "text" , text : "Add authentication to the user API endpoint" } ] ,
375378 metadata : {
376379 historySequence : 1 ,
377- timestamp : Date . now ( ) - 300000 ,
380+ timestamp : STABLE_TIMESTAMP - 300000 ,
378381 } ,
379382 } ) ;
380383
@@ -402,7 +405,7 @@ export const ActiveWorkspaceWithChat: Story = {
402405 ] ,
403406 metadata : {
404407 historySequence : 2 ,
405- timestamp : Date . now ( ) - 290000 ,
408+ timestamp : STABLE_TIMESTAMP - 290000 ,
406409 model : "claude-sonnet-4-20250514" ,
407410 usage : {
408411 inputTokens : 1250 ,
@@ -420,7 +423,7 @@ export const ActiveWorkspaceWithChat: Story = {
420423 parts : [ { type : "text" , text : "Yes, add JWT token validation" } ] ,
421424 metadata : {
422425 historySequence : 3 ,
423- timestamp : Date . now ( ) - 280000 ,
426+ timestamp : STABLE_TIMESTAMP - 280000 ,
424427 } ,
425428 } ) ;
426429
@@ -452,7 +455,7 @@ export const ActiveWorkspaceWithChat: Story = {
452455 ] ,
453456 metadata : {
454457 historySequence : 4 ,
455- timestamp : Date . now ( ) - 270000 ,
458+ timestamp : STABLE_TIMESTAMP - 270000 ,
456459 model : "claude-sonnet-4-20250514" ,
457460 usage : {
458461 inputTokens : 2100 ,
@@ -470,7 +473,7 @@ export const ActiveWorkspaceWithChat: Story = {
470473 parts : [ { type : "text" , text : "Can you run the tests to make sure it works?" } ] ,
471474 metadata : {
472475 historySequence : 5 ,
473- timestamp : Date . now ( ) - 240000 ,
476+ timestamp : STABLE_TIMESTAMP - 240000 ,
474477 } ,
475478 } ) ;
476479
@@ -502,7 +505,7 @@ export const ActiveWorkspaceWithChat: Story = {
502505 ] ,
503506 metadata : {
504507 historySequence : 6 ,
505- timestamp : Date . now ( ) - 230000 ,
508+ timestamp : STABLE_TIMESTAMP - 230000 ,
506509 model : "claude-sonnet-4-20250514" ,
507510 usage : {
508511 inputTokens : 2800 ,
@@ -525,7 +528,7 @@ export const ActiveWorkspaceWithChat: Story = {
525528 ] ,
526529 metadata : {
527530 historySequence : 7 ,
528- timestamp : Date . now ( ) - 180000 ,
531+ timestamp : STABLE_TIMESTAMP - 180000 ,
529532 } ,
530533 } ) ;
531534
@@ -562,7 +565,7 @@ export const ActiveWorkspaceWithChat: Story = {
562565 ] ,
563566 metadata : {
564567 historySequence : 8 ,
565- timestamp : Date . now ( ) - 170000 ,
568+ timestamp : STABLE_TIMESTAMP - 170000 ,
566569 model : "claude-sonnet-4-20250514" ,
567570 usage : {
568571 inputTokens : 3500 ,
0 commit comments