Some checks failed
build-images / web (push) Has been cancelled
vision2026-ci / Python SDK resource tests (push) Has been cancelled
build-images / api (push) Has been cancelled
build-images / worker-gpu (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (comfy-workflow-schema) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (effects-core) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (eventbus-types) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (growth-analytics) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (provider-adapter-kit) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (publishing-connectors) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (render-core) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (shot-template-schema) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (trends-schema) (push) Has been cancelled
vision2026-ci / Desktop engine crates (test + clippy + fmt) (push) Has been cancelled
codeql / Analyze (javascript-typescript) (push) Has been cancelled
codeql / Analyze (python) (push) Has been cancelled
perf / API hot-path micro-smoke (budgeted) (push) Has been cancelled
perf / Desktop engine crates (release build check) (push) Has been cancelled
vision2026-ci / API phase modules (ruff + pytest) (push) Has been cancelled
vision2026-ci / Alembic upgrade + drift check (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (caption-engine) (push) Has been cancelled
Paid, hosted product at menivor.com, now retired as a company project. Fresh squashed history of the cleaned working tree (secret-scanned, no .env, no customer data, no outreach logs). Built on MoneyPrinterTurbo (MIT, harry0703) — see NOTICE.
76 lines
2.2 KiB
TypeScript
76 lines
2.2 KiB
TypeScript
/**
|
|
* Horizontal picker of the caller's finished reels. The creator taps the job
|
|
* they posted, then logs its real-world metrics below. Purely presentational —
|
|
* the parent owns the job list and the selection state.
|
|
*/
|
|
|
|
import { Pressable, ScrollView, StyleSheet, Text, View } from "react-native";
|
|
|
|
import type { Job } from "@/lib/types";
|
|
|
|
import { colors } from "@/components/me/theme";
|
|
|
|
interface JobPickerProps {
|
|
jobs: Job[];
|
|
selectedJobId: string | null;
|
|
onSelect: (jobId: string) => void;
|
|
}
|
|
|
|
/** A short, stable label for a job id (last 6 chars, uppercased). */
|
|
function shortId(jobId: string): string {
|
|
const tail = jobId.length > 6 ? jobId.slice(-6) : jobId;
|
|
return tail.toUpperCase();
|
|
}
|
|
|
|
export function JobPicker({ jobs, selectedJobId, onSelect }: JobPickerProps) {
|
|
if (jobs.length === 0) {
|
|
return (
|
|
<Text style={styles.empty}>
|
|
No finished reels yet. Create and render a reel, then come back to log
|
|
how it performed.
|
|
</Text>
|
|
);
|
|
}
|
|
|
|
return (
|
|
<ScrollView
|
|
horizontal
|
|
showsHorizontalScrollIndicator={false}
|
|
contentContainerStyle={styles.row}
|
|
>
|
|
{jobs.map((job) => {
|
|
const active = job.job_id === selectedJobId;
|
|
return (
|
|
<Pressable
|
|
key={job.job_id}
|
|
style={[styles.chip, active && styles.chipActive]}
|
|
onPress={() => onSelect(job.job_id)}
|
|
>
|
|
<Text style={[styles.chipLabel, active && styles.chipLabelActive]}>
|
|
Reel {shortId(job.job_id)}
|
|
</Text>
|
|
</Pressable>
|
|
);
|
|
})}
|
|
<View style={styles.tail} />
|
|
</ScrollView>
|
|
);
|
|
}
|
|
|
|
const styles = StyleSheet.create({
|
|
row: { gap: 8, paddingRight: 4 },
|
|
chip: {
|
|
backgroundColor: colors.card,
|
|
borderColor: colors.border,
|
|
borderWidth: 1,
|
|
borderRadius: 999,
|
|
paddingHorizontal: 16,
|
|
paddingVertical: 9,
|
|
},
|
|
chipActive: { backgroundColor: colors.primary, borderColor: colors.primary },
|
|
chipLabel: { color: colors.textSecondary, fontSize: 13, fontWeight: "600" },
|
|
chipLabelActive: { color: colors.textPrimary, fontWeight: "700" },
|
|
empty: { color: colors.muted, fontSize: 13, lineHeight: 19 },
|
|
tail: { width: 4 },
|
|
});
|