Phase 1 Foundations: onboarding profile, nav padding, backpack views, AI persona
CI / policy (push) Has been cancelled
CI / backend (push) Has been cancelled
CI / profile (push) Has been cancelled
CI / mobile (push) Has been cancelled

- profileStore (MMKV) + pure profileLogic (types, options, isProfileComplete,
  buildPersona). Rich first-run onboarding (app/onboarding.tsx): name/role,
  industry, vibes (multi), goal, brand colors, social links, inspirations.
- First-launch gate in (tabs)/_layout via <Redirect> guarded by a hydration
  flag; onboarding registered in the root stack.
- Bottom tab bar made taller with safe-area bottom padding.
- Backpack (Cards tab): Grid / Showcase view toggle + add-new entry.
- Business cards skip data entry: demo.tsx prefills name/title/links from the
  profile (creative tools lead).
- Persona → AI: SceneBrief/refine_prompt gain an optional persona (role/vibe/
  colors/goal); mobile generators pass buildPersona(profile). FakeAiClient
  echoes the role. genwizard gains MultiChips.
- Tests: mobile 28 (new profileLogic), backend 121 (new refine_includes_persona).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This commit is contained in:
Omar Sobh
2026-06-05 23:09:17 -05:00
co-authored by Claude Opus 4.8
parent e0b6200091
commit 8865dc9683
16 changed files with 655 additions and 36 deletions
+11 -4
View File
@@ -24,6 +24,7 @@ import { defaultLinks, LinksEditor } from "../src/components/LinksEditor";
import { newLayerId } from "../src/stores/cardStore";
import { useDraftStore } from "../src/stores/draftStore";
import { CardLink, useLocalCardsStore } from "../src/stores/localCardsStore";
import { useProfileStore } from "../src/stores/profileStore";
import { CardDefinition, DEFAULT_SETTINGS, TextLayer } from "../src/types/card";
import { deleteImage, persistImage, persistVideo } from "../src/utils/imageStore";
@@ -105,13 +106,18 @@ export default function CardEditorScreen() {
const getById = useLocalCardsStore((s) => s.getById);
// A stable id for the lifetime of this editor (new card or the one we're editing).
// New cards prefill from the user's profile (so there's no data entry); the
// edit path (cardId) overrides these in the effect below.
const profile = useProfileStore((s) => s.profile);
const [id] = useState(() => cardId ?? newLayerId());
const [imageUri, setImageUri] = useState<string | null>(null);
const [videoUri, setVideoUri] = useState<string | null>(null);
const [name, setName] = useState("Omar Sobh");
const [title, setTitle] = useState("Founder & CEO");
const [url, setUrl] = useState("https://cardclaws.com/omar");
const [links, setLinks] = useState<CardLink[]>(() => defaultLinks());
const [name, setName] = useState(() => (cardId ? "" : profile.displayName));
const [title, setTitle] = useState(() => (cardId ? "" : profile.title));
const [url, setUrl] = useState("");
const [links, setLinks] = useState<CardLink[]>(() =>
cardId ? [] : profile.socialLinks.length > 0 ? profile.socialLinks : defaultLinks(),
);
const [showing, setShowing] = useState(false);
const [onBack, setOnBack] = useState(false);
const [saving, setSaving] = useState(false);
@@ -303,6 +309,7 @@ export default function CardEditorScreen() {
</Pressable>
</View>
<Text style={styles.sectionLabel}>Details · prefilled from your profile</Text>
<Field label="Name" value={name} onChangeText={setName} />
<Field label="Title" value={title} onChangeText={setTitle} />
<Field label="QR link" value={url} onChangeText={setUrl} autoCapitalize="none" />