import type { User } from '@/types/user'; /** * The shape of a signed-in user, before the server has answered. * * This is a **default shape, not a record**. The user lives in PostgreSQL and * arrives from `GET /me`; what is here is the set of keys that must resolve * during the first render, in the fraction of a second before that response * lands. * * It exists as its own module for one reason: `base44Client.js` needs exactly * this, and it used to reach into `api/seed.js` to get it — a 1,900-line * fixture of demo positions, candidates, interviews, staff and shift records, * every byte of which was then in the production bundle so that three booleans * could be defaulted. The fixture is still the right thing for the test scripts * that read it (`scripts/skill-check.mjs`, `scripts/owliver-capture.mjs`); it * was never the right thing for the running app. `seed.js` re-exports this * constant, so those scripts are unchanged and the production import chain no * longer reaches them. * * Nothing here is a source of truth for anything. `preferences` is the one part * that is read: `auth.preferences()` is synchronous — `AssistantPanelContext` * decides whether Owliver starts open in a `useState` initialiser — so a key * the server has never stored still has to resolve to something rather than to * `undefined`. */ export const DEMO_USER: User = { id: 'user_demo', full_name: 'Alex Rivera', email: 'demo@krow.app', role: 'admin', account_type: 'employer', created_date: '2026-06-01T09:00:00.000Z', /* Product preferences travel with the account rather than in a store of their own, so there is one record to persist and one thing to read. */ preferences: { owliverDefault: true, compactDensity: false, emailDigest: true, }, }; /** * The employer account, and the reason there is a second one at all. * * `policy.go` has always had three roles — admin, employer, talent — and the * fixture had one administrator, so two thirds of the authorization table was * never exercised and there was nobody to sign in as to reach the employer * console. This account is what makes that path reachable. * * Unlike `DEMO_USER` this is not a default shape for the first render: nothing * in the running app reads it. It exists so that `seedData.User` names both * accounts, which is what the backend seeder writes. See `seed.ts`. */ export const EMPLOYER_USER: User = { id: 'user_employer', full_name: 'Jordan Blake', email: 'employer@krow.app', role: 'employer', account_type: 'employer', created_date: '2026-06-01T09:00:00.000Z', preferences: { owliverDefault: true, compactDensity: false, emailDigest: true, }, };