@@ -31,7 +31,7 @@ import { PresenceAvatars, type PresenceUser } from '@object-ui/collaboration';
3131import { ModeToggle } from './mode-toggle' ;
3232import { LocaleSwitcher } from './LocaleSwitcher' ;
3333import { ConnectionStatus } from './ConnectionStatus' ;
34- import { ActivityFeed } from './ActivityFeed' ;
34+ import { ActivityFeed , type ActivityItem } from './ActivityFeed' ;
3535import type { ConnectionState } from '../dataSource' ;
3636
3737/** Convert a slug like "crm_dashboard" or "audit-log" to "Crm Dashboard" / "Audit Log" */
@@ -48,6 +48,15 @@ const MOCK_PRESENCE_USERS: PresenceUser[] = [
4848 { userId : 'u3' , userName : 'Carol Li' , color : '#e74c3c' , status : 'active' , lastActivity : new Date ( ) . toISOString ( ) } ,
4949] ;
5050
51+ // Demo activity items for local/mock mode
52+ const DEMO_ACTIVITIES : ActivityItem [ ] = [
53+ { id : 'a1' , type : 'create' , objectName : 'Contact' , recordId : 'c-101' , user : 'Alice Chen' , description : 'Created new contact "Acme Corp"' , timestamp : new Date ( Date . now ( ) - 2 * 60 * 1000 ) . toISOString ( ) } ,
54+ { id : 'a2' , type : 'update' , objectName : 'Deal' , recordId : 'd-42' , user : 'Bob Smith' , description : 'Updated deal stage to "Negotiation"' , timestamp : new Date ( Date . now ( ) - 15 * 60 * 1000 ) . toISOString ( ) } ,
55+ { id : 'a3' , type : 'comment' , objectName : 'Task' , recordId : 't-88' , user : 'Carol Li' , description : 'Commented on task "Q4 Review"' , timestamp : new Date ( Date . now ( ) - 45 * 60 * 1000 ) . toISOString ( ) } ,
56+ { id : 'a4' , type : 'delete' , objectName : 'Lead' , recordId : 'l-7' , user : 'Alice Chen' , description : 'Deleted duplicate lead "Test Lead"' , timestamp : new Date ( Date . now ( ) - 2 * 60 * 60 * 1000 ) . toISOString ( ) } ,
57+ { id : 'a5' , type : 'update' , objectName : 'Contact' , recordId : 'c-55' , user : 'Bob Smith' , description : 'Updated email for "Jane Doe"' , timestamp : new Date ( Date . now ( ) - 5 * 60 * 60 * 1000 ) . toISOString ( ) } ,
58+ ] ;
59+
5160export function AppHeader ( { appName, objects, connectionState, presenceUsers } : { appName : string , objects : any [ ] , connectionState ?: ConnectionState , presenceUsers ?: PresenceUser [ ] } ) {
5261 const location = useLocation ( ) ;
5362 const params = useParams ( ) ;
@@ -218,7 +227,7 @@ export function AppHeader({ appName, objects, connectionState, presenceUsers }:
218227
219228 { /* Activity Feed */ }
220229 < div className = "hidden sm:flex shrink-0 relative" >
221- < ActivityFeed />
230+ < ActivityFeed activities = { DEMO_ACTIVITIES } />
222231 </ div >
223232
224233 { /* Help */ }
0 commit comments