Phase 1 Foundations: onboarding profile, nav padding, backpack views, AI persona
- 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:
co-authored by
Claude Opus 4.8
parent
e0b6200091
commit
8865dc9683
@@ -17,6 +17,8 @@ import {
|
||||
import { pollVideo, startVideo } from "../src/api/ai";
|
||||
import { Chips, wizardInputStyle } from "../src/components/genwizard/Wizard";
|
||||
import { useDraftStore } from "../src/stores/draftStore";
|
||||
import { buildPersona } from "../src/stores/profileLogic";
|
||||
import { useProfileStore } from "../src/stores/profileStore";
|
||||
|
||||
const MOTION = ["Parallax", "Particles", "Slow zoom", "Liquid", "Aurora", "Glitch"];
|
||||
const LENGTH = ["3 seconds", "5 seconds", "8 seconds"];
|
||||
@@ -26,6 +28,7 @@ const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms));
|
||||
export default function GenerateVideo() {
|
||||
const router = useRouter();
|
||||
const setPendingVideoUri = useDraftStore((s) => s.setPendingVideoUri);
|
||||
const profile = useProfileStore((s) => s.profile);
|
||||
const [concept, setConcept] = useState("");
|
||||
const [motion, setMotion] = useState("");
|
||||
const [length, setLength] = useState("");
|
||||
@@ -38,7 +41,11 @@ export default function GenerateVideo() {
|
||||
}
|
||||
const m = motion ? `${motion.toLowerCase()} ` : "";
|
||||
const len = length ? ` (${length})` : "";
|
||||
const prompt = `A ${m}motion clip for a digital business card: ${concept}${len}.`
|
||||
const persona = buildPersona(profile);
|
||||
const personaPrefix = persona
|
||||
? `For a ${persona.role ?? "professional"}${persona.vibe ? ` (${persona.vibe} aesthetic)` : ""}: `
|
||||
: "";
|
||||
const prompt = `${personaPrefix}A ${m}motion clip for a digital business card: ${concept}${len}.`
|
||||
.replace(/\s+/g, " ")
|
||||
.trim();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user