diff --git a/frontend/src/api/lessons.ts b/frontend/src/api/lessons.ts index 4de28443..b17c22e5 100644 --- a/frontend/src/api/lessons.ts +++ b/frontend/src/api/lessons.ts @@ -11,8 +11,8 @@ import type { RuleKind } from "@/api/rulebooks"; * another one fits. */ export type RuleJudgment = "linked" | "no_rule" | "unjudged"; -/** A link's state (`models/lesson_rule_link.py` LINK_STATES). */ -export type LinkState = "suggested" | "confirmed" | "rejected"; +/** A judged link's state; the reads list only these two. */ +export type LinkState = "confirmed" | "rejected"; /** One link from a lesson to a rule, in the reader's view: only rules the * reader owns are listed (`rules_for_lessons`). */ @@ -20,14 +20,11 @@ export interface LessonRuleLink { id: number; title: string; kind: RuleKind; - /** `suggested` carries nothing in retrieval until it is judged; only - * `confirmed` changes what surfaces; `rejected` is kept so the pair is - * never proposed again. */ + /** `confirmed` changes what surfaces; `rejected` is kept so the reason + * stays readable. */ state: LinkState; /** Why it was confirmed or rejected. */ note: string; - /** What a suggestion rests on — sent on suggested links only. */ - evidence?: { situations: number; projects: number; co_surfaced: number }; } /** A lesson: a transferable insight, retrievable by the SITUATION it applies @@ -79,7 +76,7 @@ export interface Lesson { updated_at: string | null; systems?: { id: number; name: string }[]; usage?: RecordUsage; - /** The rules this lesson points at, confirmed first, then suggested, then + /** The rules this lesson was judged against, confirmed first, then * rejected. Absent (with `rule_judgment`) when the links could not be read * — which is "not attached", never "no rule". */ rules?: LessonRuleLink[]; diff --git a/frontend/src/api/rulebooks.ts b/frontend/src/api/rulebooks.ts index e38fff40..9bf03581 100644 --- a/frontend/src/api/rulebooks.ts +++ b/frontend/src/api/rulebooks.ts @@ -120,9 +120,9 @@ export interface Rule { /** Present only when the rule has triggers. */ triggers?: RuleTrigger[]; relations?: RuleRelation[]; - /** The lessons that point at this rule — the concrete - * situations judged instances of it, plus any suggested and awaiting a - * judgment. Readable lessons only; omitted when there are none. */ + /** The lessons judged against this rule — confirmed instances of it + * first, then those judged not to be. Readable lessons only; omitted when + * there are none. */ lessons?: { id: number; title: string; state: LinkState; note: string }[]; } diff --git a/frontend/src/components/rules/RuleEditorSlideOver.vue b/frontend/src/components/rules/RuleEditorSlideOver.vue index 41d6c76b..baf88863 100644 --- a/frontend/src/components/rules/RuleEditorSlideOver.vue +++ b/frontend/src/components/rules/RuleEditorSlideOver.vue @@ -570,13 +570,13 @@ watch(() => props.ruleId, load);

The situations that keep proving this rule. A confirmed lesson brings the rule along - when it surfaces; a suggested one waits for a judgment on the lesson's page. + when it surfaces, and arrives with the rule when you open it.

@@ -603,7 +603,7 @@ watch(() => props.ruleId, load); -