AppView in a box as a Vite plugin thing hatk.dev

fix: reshape search results into Row<T> for consistency

searchRecords was returning raw flat rows while all other context methods
(resolve, lookup, getRecords) return shaped Row<T> with .value. Now
search results are reshaped before returning.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

+5 -2
+5 -2
packages/hatk/src/database/db.ts
··· 1334 1334 } 1335 1335 } 1336 1336 1337 - // Remove score columns from results 1338 - const records = bm25Results.map(({ score: _score, fuzzy_score: _fuzzy_score, ...rest }: any) => rest) 1337 + // Remove score columns and reshape into Row<T> with value 1338 + const rawRecords = bm25Results.map(({ score: _score, fuzzy_score: _fuzzy_score, ...rest }: any) => rest) 1339 + const records = rawRecords 1340 + .map((r: any) => reshapeRow(r, r?.__childData, r?.__unionData)) 1341 + .filter((r: any): r is Row<unknown> => r != null) 1339 1342 1340 1343 const lastRow = bm25Results[bm25Results.length - 1] 1341 1344 const nextCursor = hasMore && lastRow?.score != null ? packCursor(lastRow.score, lastRow.cid) : undefined