Three card families: Collectibles (mint) + Agents (skill-bar back); New-card under cards
CI / policy (push) Has been cancelled
CI / backend (push) Has been cancelled
CI / profile (push) Has been cancelled
CI / mobile (push) Has been cancelled

- localCardsStore: cards gain `kind` (business/collectible/agent) + optional
  provenance (collectibles) and agent meta (agents); cardsOfKind() filter.
- Cards tab: "+ New card" moved to a footer below the cards (no floating FAB);
  filtered to business cards.
- Collectibles + Agents tabs: real grids (CardCollection) with empty states and
  a "+ New" footer that opens the creator pre-set to that kind.
- Creator (demo.tsx) is kind-aware: collectibles mint a provenance record on
  save (utils/provenance stub, mapped to the creator); agents capture flip-side
  details (AgentDetailsEditor: tagline, skill bars, tools, capabilities).
- Card back per kind: AgentBackTemplate (skill bars/tools/capabilities) for
  agents; CardBackTemplate gains a "Minted · #token · chain" footer for
  collectibles. Both reuse the AI image/video front workflow.
- tsc + 28 jest green.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This commit is contained in:
Omar Sobh
2026-06-06 00:16:06 -05:00
co-authored by Claude Opus 4.8
parent e77e812609
commit d30deaf857
10 changed files with 516 additions and 60 deletions
+8 -10
View File
@@ -6,7 +6,7 @@ import { useState } from "react";
import { FlatList, Pressable, StyleSheet, Text, View } from "react-native";
import { useSafeAreaInsets } from "react-native-safe-area-context";
import { CardThumb } from "../../src/components/CardThumb";
import { LocalCard, useLocalCardsStore } from "../../src/stores/localCardsStore";
import { cardsOfKind, LocalCard, useLocalCardsStore } from "../../src/stores/localCardsStore";
type ViewMode = "grid" | "showcase";
@@ -20,7 +20,10 @@ function columnsFor(count: number): number {
export default function Gallery() {
const router = useRouter();
const insets = useSafeAreaInsets();
const cards = useLocalCardsStore((s) => s.cards);
const cards = cardsOfKind(
useLocalCardsStore((s) => s.cards),
"business",
);
const [view, setView] = useState<ViewMode>("grid");
const columns = view === "showcase" ? 1 : columnsFor(cards.length);
@@ -44,11 +47,9 @@ export default function Gallery() {
</View>
}
ListFooterComponent={
view === "showcase" && cards.length > 0 ? (
<Pressable style={styles.addTile} onPress={() => router.push("/demo")}>
<Text style={styles.addTileText}>+ New card</Text>
</Pressable>
) : null
<Pressable style={styles.addTile} onPress={() => router.push("/demo")}>
<Text style={styles.addTileText}>+ New card</Text>
</Pressable>
}
renderItem={({ item }: { item: LocalCard }) =>
view === "showcase" ? (
@@ -83,9 +84,6 @@ export default function Gallery() {
}
/>
<Pressable style={[styles.fab, { bottom: insets.bottom + 80 }]} onPress={() => router.push("/demo")}>
<Text style={styles.fabText}>+ New card</Text>
</Pressable>
</View>
);
}