mock-threads.ts4.0 KBView on GitHub /**
* The sample feed the mock preview renders.
*
* `bucket` is what lets a mock thread land in the right tab when the user adds a
* sub-inbox: it names the kind of mail the thread is, and the preview matches it
* against the sub-inbox's name. Deliberately coarse — the mock is here to show
* the SHAPE of a split inbox, not to simulate the query compiler.
*/
export type MockBucket =
| 'personal'
| 'calendar'
| 'updates'
| 'newsletter'
| 'billing'
| 'starred'
| 'drafts';
export interface MockThread {
id: string;
sender: string;
subject: string;
snippet: string;
time: string;
unread: boolean;
starred?: boolean;
bucket: MockBucket;
/** Whether Gmail would file this under the Personal category. Drives the Important split. */
personal: boolean;
}
export const MOCK_THREADS: MockThread[] = [
{
id: 'm1',
sender: 'Alex Chen',
subject: 'Q3 planning doc',
snippet: 'Put together the planning doc for next quarter — can you take a look?',
time: '9:41',
unread: true,
bucket: 'personal',
personal: true,
},
{
id: 'm2',
sender: 'Sarah Kim',
subject: 'Re: pilot scope',
snippet: 'Legal cleared the DPA. We can start Monday if that still works.',
time: '9:12',
unread: true,
bucket: 'personal',
personal: true,
},
{
id: 'm3',
sender: 'Google Calendar',
subject: 'Invitation: Weekly sync',
snippet: 'Thursday 10:00 – 10:30 · 4 guests',
time: '8:55',
unread: false,
bucket: 'calendar',
personal: false,
},
{
id: 'm4',
sender: 'David Park',
subject: 'Re: API design review',
snippet: 'Good points on pagination. Cursor-based makes more sense for our case.',
time: '8:30',
unread: false,
starred: true,
bucket: 'starred',
personal: true,
},
{
id: 'm5',
sender: 'Stripe',
subject: 'Your invoice is available',
snippet: 'Invoice #4821 for August is ready to view.',
time: 'Tue',
unread: false,
bucket: 'billing',
personal: false,
},
{
id: 'm6',
sender: 'Maria Lopez',
subject: 'Design feedback',
snippet: 'Love the new onboarding flow. A few notes on spacing in settings.',
time: 'Tue',
unread: false,
bucket: 'personal',
personal: true,
},
{
id: 'm7',
sender: 'Calendly',
subject: 'New event: Intro call',
snippet: 'Jordan Ellis booked Intro call for Friday at 2:00pm.',
time: 'Mon',
unread: true,
bucket: 'calendar',
personal: false,
},
{
id: 'm8',
sender: 'LinkedIn',
subject: '8 new notifications',
snippet: 'See who viewed your profile this week.',
time: 'Mon',
unread: false,
bucket: 'updates',
personal: false,
},
{
id: 'm9',
sender: 'The Generalist',
subject: 'The quiet rise of vertical AI',
snippet: 'This week: why the wedge matters more than the model.',
time: 'Sun',
unread: false,
bucket: 'newsletter',
personal: false,
},
{
id: 'm10',
sender: 'Emily Zhang',
subject: 'Quick question about the roadmap',
snippet: 'Do we have a timeline for the v2 migration? Product wants an update.',
time: 'Sun',
unread: true,
bucket: 'personal',
personal: true,
},
];
/** Which buckets a sub-inbox called `name` should collect in the mock. */
export function bucketsForInboxName(name: string): MockBucket[] {
const key=[redacted];
if (key.includes('calendar') || key.includes('meeting')) return ['calendar'];
if (key.includes('star')) return ['starred'];
if (key.includes('news') || key.includes('read')) return ['newsletter'];
if (key.includes('bill') || key.includes('invoice') || key.includes('receipt'))
return ['billing'];
if (key.includes('update') || key.includes('notification') || key.includes('social'))
return ['updates'];
if (key.includes('draft') || key.includes('agent') || key.includes('follow'))
return ['drafts'];
if (key.includes('vip') || key.includes('team') || key.includes('pipeline'))
return ['personal'];
return [];
}