chore(insights): align the ambient-Coach file comments to the shipped version

The A1–A3 source files carried v1.22.0 docstrings from before the work was
re-cut as the v1.21.2 point release. Comment-only sweep so blame and the
in-file version tags read consistently with the shipped version.
This commit is contained in:
Marc-André Bombeck committed 2026-06-27 00:48:40 +02:00
1 parent 1de72d045e
commit 2c33faa648
14 files changed
+18 -18

No files matched your search

+1 -1
View File
@@ -1,5 +1,5 @@
/**
* v1.22.0 (A1) — "Coach read" strip route.
* v1.21.2 (A1) — "Coach read" strip route.
*
* `GET /api/insights/coach-read?metric=<MeasurementType>` serves the two
* server-authoritative lines a metric sub-page renders above its chart: the
@@ -2,7 +2,7 @@ import { describe, it, expect, vi, beforeEach } from "vitest";
import { NextRequest } from "next/server";
/**
* v1.22.0 (A3) — the seeded-question route resolves today's single most
* v1.21.2 (A3) — the seeded-question route resolves today's single most
* notable derived signal into a tappable Coach opener, server-side. When the
* confidence + notability gate yields nothing the route returns
* `{ signal: null }` and the hero keeps its neutral greeting — never a
@@ -1,5 +1,5 @@
/**
* v1.22.0 (A3) — pre-seeded relevance opener for the unscoped Coach.
* v1.21.2 (A3) — pre-seeded relevance opener for the unscoped Coach.
*
* `GET /api/insights/coach/seeded-question` resolves today's single most
* notable derived wellness signal (readiness / recovery shift, the same
@@ -13,7 +13,7 @@ function render(node: React.ReactNode, locale: "en" | "de" = "en") {
}
/**
* v1.22.0 (A2 + A3) — the visible scope/opener affordance.
* v1.21.2 (A2 + A3) — the visible scope/opener affordance.
*
* The component renders in the `node` test environment via static markup, so
* the tests assert the structural slots + the caller-resolved label / question
@@ -28,7 +28,7 @@ import { useTranslations } from "@/lib/i18n/context";
* in via `motion-safe` `animate-in` with capped delays; reduced-motion
* users get the layout instantly.
*
* v1.22.0 (A2 + A3) — the hero accepts an optional `scopeHint` slot
* v1.21.2 (A2 + A3) — the hero accepts an optional `scopeHint` slot
* (a `<ScopeHintBadge>`): the visible "the Coach is already on <metric>"
* pill + seed question when launched scoped (A2), or the pre-seeded
* notable-signal opener when launched unscoped (A3). When absent the hero
@@ -39,7 +39,7 @@ export interface CoachHeroProps {
/** The live `<CoachInput>` composer, re-parented into the hero. */
composer: React.ReactNode;
/**
* v1.22.0 — optional scope/opener affordance rendered above the
* v1.21.2 — optional scope/opener affordance rendered above the
* composer. The parent owns the data (launch scope / seeded signal) and
* passes a resolved `<ScopeHintBadge>`; null keeps the neutral hero.
*/
@@ -105,7 +105,7 @@ export function CoachHero({ composer, scopeHint }: CoachHeroProps) {
{composer}
</div>
{/* v1.22.0 (A2/A3) — visible scope pill + tappable opener, beneath
{/* v1.21.2 (A2/A3) — visible scope pill + tappable opener, beneath
the composer so the greeting → composer rhythm stays intact and
the opener reads as a follow-on suggestion. Renders only when the
parent resolved a scope or a notable signal. */}
@@ -6,7 +6,7 @@ import { cn } from "@/lib/utils";
import { useTranslations } from "@/lib/i18n/context";
/**
* v1.22.0 (A2 + A3) — the Coach's visible scope/opener affordance.
* v1.21.2 (A2 + A3) — the Coach's visible scope/opener affordance.
*
* Two modes, one surface:
*
@@ -55,7 +55,7 @@ const WINDOW_OPTIONS: ReadonlyArray<CoachDefaultWindow> = [
export interface SourcesRailProps {
className?: string;
/**
* v1.22.0 (A2) — the human label of the metric the current conversation
* v1.21.2 (A2) — the human label of the metric the current conversation
* was launched scoped to, or null for a generic (all-source) open. When
* set, the rail surfaces a small "the Coach is already on <metric>" line
* above the persisted-cluster toggles so the active narrowing is VISIBLE
@@ -132,7 +132,7 @@ export function SourcesRail({ className, activeScopeLabel }: SourcesRailProps) {
{t("insights.coach.sourcesTitle")}
</h3>
{/* v1.22.0 (A2) — the visible launch scope for this conversation. Only
{/* v1.21.2 (A2) — the visible launch scope for this conversation. Only
rendered when the Coach was opened narrowed to a metric; a generic
open omits it entirely so the rail is unchanged for the default
all-source case. */}
@@ -12,7 +12,7 @@ import { cn } from "@/lib/utils";
import type { CoachReadStripData } from "@/lib/insights/derived/coach-read-shape";
/**
* v1.22.0 (A1) — "Coach read" strip.
* v1.21.2 (A1) — "Coach read" strip.
*
* A compact two-line read rendered ABOVE the chart on each metric sub-page:
*
+2 -2
View File
@@ -97,7 +97,7 @@ export interface SubPageShellProps {
*/
statStrip?: ReactNode;
/**
* v1.22.0 (A1) — the "Coach read" strip, mounted between the stat strip and
* v1.21.2 (A1) — the "Coach read" strip, mounted between the stat strip and
* the chart. A compact two-line own-baseline + lagged-association read that
* makes the metric feel seen-in-context. Self-gating (renders nothing until
* its server read lands, and nothing at all when there is no baseline and no
@@ -389,7 +389,7 @@ export function SubPageShell({
strip so the numbers always reflect the range the chart paints. No
drag, no pill — the range tab is the single selector. */}
{statStrip}
{/* v1.22.0 (A1) — the "Coach read" strip sits between the numbers-first
{/* v1.21.2 (A1) — the "Coach read" strip sits between the numbers-first
stat strip and the chart, so the spine reads intro → numbers → Coach
read → chart → target → assessment. Self-gating, so the rhythm holds
when the strip has nothing to say. */}
@@ -8,7 +8,7 @@ import {
import type { CoachCorrelationDriver } from "@/lib/ai/coach/tools/correlations-read";
/**
* v1.22.0 (A1) — "Coach read" strip selection logic.
* v1.21.2 (A1) — "Coach read" strip selection logic.
*
* Covers the two decisions the strip turns on:
* 1. band-line placement (within / above / below), incl. the inclusive
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* v1.22.0 (A1) — "Coach read" strip: shared shapes + pure selection logic.
* v1.21.2 (A1) — "Coach read" strip: shared shapes + pure selection logic.
*
* Client-safe (no `server-only`, no Prisma): the DTO shapes the route returns
* and the strip renders, plus the two pure decisions the strip turns on —
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* v1.22.0 (A1) — "Coach read" strip data builder.
* v1.21.2 (A1) — "Coach read" strip data builder.
*
* Two server-authoritative lines for a single metric sub-page, computed
* here so web and iOS read the SAME resolved DTO (no client re-derivation):
+1 -1
View File
@@ -27,7 +27,7 @@ export const coachKeys = {
*/
coachConversation: (id: string | null) => ["coachConversation", id] as const,
/**
* v1.22.0 (A3) — today's most notable derived signal, resolved into the
* v1.21.2 (A3) — today's most notable derived signal, resolved into the
* Coach hero's pre-seeded relevance opener
* (`GET /api/insights/coach/seeded-question`).
*/
+1 -1
View File
@@ -128,7 +128,7 @@ export const insightsKeys = {
insightsTrendSeries: (types: string) => ["trend-series", types] as const,
/**
* v1.22.0 (A1) — per-metric "Coach read" strip
* v1.21.2 (A1) — per-metric "Coach read" strip
* (`/api/insights/coach-read?metric=<MeasurementType>`). One generic route
* backs every metric sub-page, so the key is parameterised by the
* MeasurementType. Pure compute over the baseline + correlation engines —