Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

1.2 KB
Raw Blame
/**
 * How a measured local-model assessment describes a launch configuration that
 * did NOT take effect.
 *
 * `tuningApplied === false` covers two different failures, and they read as
 * opposite things to the person looking at the row:
 *
 *   - a TUNED run whose knobs never reached the daemon — the numbers describe
 *     some other configuration, not the one in the label;
 *   - an UNTUNED run PortOS could not put back on backend defaults, because the
 *     daemon was still carrying the previous run's tuning. Its label already
 *     says "backend defaults", so "tuning was not applied" reads as a
 *     contradiction unless the copy names what actually happened.
 *
 * `tuningKey` is what separates them: `''` is the untuned run.
 *
 * This is the SHORT form, for a dense table cell or a toast suffix. The full
 * sentence for a surface with room to say it is the server-side exclusion reason
 * in `getAssessmentReport` — keep the two in step.
 *
 * @returns {string|null} `null` when nothing is wrong with the reading.
 */
export function tuningNoticeChip(entry) {
  if (entry?.tuningApplied !== false) return null;
  return entry?.tuningKey ? 'tuning not applied' : 'not at defaults';
}