// The note shapes, with NO server imports. // // This file exists because of a real break: NoteField.tsx is a client component // and imported NOTE_LIMIT -- a VALUE, not a type -- from lib/notes.ts. Value // imports are not erased, so the bundler followed lib/notes.ts into lib/browse.ts // into node:fs/promises and refused to build the client chunk. // // `tsc --noEmit` cannot see that; only the bundler can. So anything a client // component needs at RUNTIME lives here, and lib/notes.ts re-exports it for the // server side. Type-only imports (`import type { NoteMap }`) are erased and can // keep coming from lib/notes.ts safely. /** * Generous on purpose. The verdict chip already has a one-line "why"; the whole * reason this exists is that terse fields pushed the reasoning into chat, where * it did not survive. */ export const NOTE_LIMIT = 8000; export type NoteEntry = { note: string; at: string }; export type NoteMap = Record;