Problem
fetchApprovals casts the response unchecked, so malformed items ({id: null}) reach FlatList and crash keyExtractor.
Where
lib/api.ts (as { approvals?: Approval[] }, no per-item check) + app/index.tsx (keyExtractor={(i) => i.id}).
Acceptance
Add a failing test first with {approvals: [{id: null}, {title: 1}]}, expecting [] instead of garbage reaching the list. Then fix.
Note: this repo has no test runner configured yet. Setting up a minimal vitest (or equivalent) config is part of this issue.
Problem
fetchApprovalscasts the response unchecked, so malformed items ({id: null}) reachFlatListand crashkeyExtractor.Where
lib/api.ts(as { approvals?: Approval[] }, no per-item check) +app/index.tsx(keyExtractor={(i) => i.id}).Acceptance
Add a failing test first with
{approvals: [{id: null}, {title: 1}]}, expecting[]instead of garbage reaching the list. Then fix.Note: this repo has no test runner configured yet. Setting up a minimal vitest (or equivalent) config is part of this issue.