// The shortlist shapes and their validator, with NO server imports -- the same // client-boundary rule lib/note-types.ts and lib/phrase-types.ts follow. // // A shortlist is what turns a search into an EDIT. The console retrieves by // meaning; this is where the order gets decided, which is the part a renderer // downstream actually consumes. import { NOTE_LIMIT } from "./note-types"; export { NOTE_LIMIT }; /** * The one channel the two client components on /browse/find use to agree. * * The rows can star and the bar can unstar, and both must show the same list a * moment later. Every mutation returns the WHOLE list, so one event carrying it * keeps them exact -- where a router.refresh() would re-run the search, rebuild * the rows and throw away which row was focused, on every star. */ export const SHORTLIST_EVENT = "umtool:shortlist"; export const NAME_LIMIT = 120; export const SLUG_LIMIT = 60; /** * One starred moment. * * A SNAPSHOT, not a reference. Storing only the id would let a re-transcription * silently re-point a pick at a different word -- the word indices shift the * moment a chunk boundary moves, and nothing would say so. With the text and * the times written down, staleness can be DETECTED: the list still says what * it meant, and a mismatch against the corpus is visible rather than invisible. * * `q` is kept for the same reason. Six weeks later a list of 40 moments with no * record of what was asked for is a list that has to be re-derived by ear. */ export type Pick = { /** `