// THE CHANNEL COLUMN IDS AND PRESETS — plain data, deliberately NOT in the // "use client" registry (./channelColumns.tsx). A server component that imports // a value from a client module gets a client REFERENCE, not the value: the work // tables' server shell calling `WORK_COLUMNS.filter(...)` threw "filter is not // a function". So the ids, the sort keys, the pipeline-column shape and the // presets live here, importable from either side; the cells stay client-only. export type ChannelColumnId = | "select" | "slug" | "name" | "handling" | "build" | "tier" | "playlist" | "videos" | "digestReachable" | "count" | "extra" | "lastSync" | "lastSyncRelative" | "report" | "location" | "size" | "pipelines" | "actions"; // Sorting a pipeline column sorts by `reachable` — "which channel has the most // diarizable audio left right now". export type ChannelSortKey = | "slug" | "name" | "handling" | "build" | "tier" | "playlist" | "lastSync" | "report" | "location" | "size" | `op:${string}`; // A column heading for one pipeline. Comes off the operation registry on the // server (shortLabel, costBasis) rather than being abbreviated here — see // operations.ts. export type PipelineColumn = { id: string; shortLabel: string; label: string; costBasis: string; // The two externally-dispatched pipelines keep their existing count column // semantics: the cell's text node is the bare number the suite asserts on, // under this accessible name. The slug is appended by the cell, so this is // the prefix — `"downloads count"` becomes `"downloads count for foo"`, which // is the name channels-counts.spec.ts has always addressed these cells by. // Null for the derived operations, which have never had a count column and // get the band's sentence as their text. countLabel: string | null; }; // THE PRESETS. The rack draws everything; the dashboard and a work section // each name the handful they have always drawn. export const RACK_COLUMNS: readonly ChannelColumnId[] = [ "select", "slug", "name", "handling", "build", "tier", "playlist", "lastSync", "report", "location", "size", "pipelines", "actions", ]; export const DASHBOARD_COLUMNS: readonly ChannelColumnId[] = [ "slug", "handling", "videos", "digestReachable", "lastSyncRelative", "actions", ]; // `extra` is dropped by the caller when the section has no extra column. export const WORK_COLUMNS: readonly ChannelColumnId[] = [ "slug", "count", "extra", "report", "lastSync", "actions", ];