← Files DataARCHIVED FILE
templates/data-app/base/examples/reports/adoption-retention/annotation-stories.mjs
994 Bytes · Oct 3, 2026 · 06:03 UTC
const retiredStoryLabels = {
"latest-above-target": "Growth keeps pulling ahead of plan",
"latest-activation": "Activation improves week after week",
"search-retention-tension": "Search grows, but retention trails",
};
// These comparisons are already visible in the figures. The bundled evidence
// supplies no additional contextual fact that needs an annotation.
export function operatingStoryAnnotations() {
return { growth: [], activation: [], retention: [] };
}
export function withOperatingStory(base, saved, current, storyId) {
const spec = saved ?? base;
// Retire only this example's original wording. Preserve custom wording even
// when its author reused an old ID, as well as unrelated notes and explicit [].
const annotations = Object.hasOwn(spec, "annotations")
? spec.annotations ?? []
: current;
return { ...spec, annotations: annotations.filter((annotation) =>
annotation.id !== storyId || annotation.label !== retiredStoryLabels[storyId]) };
}
SHA-256: 5bb9cec7f7f9ace99f2063a541301cb0fd65e75b40340b215ebf5ee2d7f040a3