// X'S LOGIN SOURCE AS A PAGE MAY DRAW IT (round 2 review): the browser spec // can name a profile PATH ("firefox:/home/…/x.default"), and XSessionSection // draws it in the source select's option ("Browser login (…)"), the "In use" // line and the Check line. So every view of the source a client receives — // /settings', /cookies', and each X session action's answer — carries the spec, // its label and the Check summary through settings.privacy's displayText, on // the server. The client never ACTS on the spec: the select's value is the // source kind and whether it was chosen, the actions take only that choice, // and the spec's presence (all "Automatic" needs) survives the masking. import { displayText } from "yt-dlp-transcript-common/lib/privacy/privacy-server"; import type { XCookieSourceView } from "yt-dlp-transcript-common/social/xCookieSource"; export function xSourceForDisplay(v: T): T { return { ...v, label: displayText(v.label), ...(v.browserSpec ? { browserSpec: displayText(v.browserSpec) } : {}), ...(typeof v.summary === "string" ? { summary: displayText(v.summary) } : {}), }; }