feat(family): an idea links to the rule topic holding its norms - set_family_topic, the readouts name the rules, the idea row shows the link (milestone 463 step 1 gap, found in step 7, #4993)
CI & Build / Plugin hooks (push) Successful in 15s
CI & Build / Python lint (push) Successful in 2s
CI & Build / TypeScript typecheck (push) Successful in 1m9s
CI & Build / integration (push) Successful in 1m21s
CI & Build / Python tests (push) Successful in 2m2s
CI & Build / Build & push image (push) Successful in 1m29s

Step 1 added family_ideas.topic_id but nothing could set it, so the note<->topic
link the milestone promised existed only as a column. set_family_topic links or
unlinks (0) a topic in a rulebook the caller owns, one idea per topic; the
version does not move. get_family_idea and get_family_adoption list the topic's
rules; list_family_ideas and the Family page name the topic. The model
docstrings no longer claim the topic's rules are platform-scoped in retrieval.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-06 14:27:33 -04:00
co-authored by Claude Opus 5.5
parent b8efff43b4
commit 07169e1274
10 changed files with 195 additions and 8 deletions
+11
View File
@@ -17,12 +17,23 @@ export interface Criterion {
test: string;
}
export interface IdeaTopic {
id: number;
title: string;
rulebook_id: number;
/** Present on a single idea's read, not on the list. */
rules?: { id: number; title: string }[];
}
export interface FamilyIdea {
note_id: number;
status: IdeaStatus;
applies_when: string;
canon_version: number;
topic_id: number | null;
/** The rule topic holding the idea's binding norms; null when none is
* linked or the reader does not own its rulebook. */
topic: IdeaTopic | null;
title: string;
note_type: string;
is_task: boolean;
+7
View File
@@ -259,6 +259,12 @@ onMounted(load);
<div v-if="idea.platforms.length" class="fam-platforms">
<code v-for="p in idea.platforms" :key="p" class="fam-chip">{{ p }}</code>
</div>
<p v-if="idea.topic" class="fam-muted fam-topic">
Binding rules:
<router-link
:to="{ path: '/rules', query: { rb: String(idea.topic.rulebook_id), topic: String(idea.topic.id) } }"
>{{ idea.topic.title }}</router-link>
</p>
</div>
<button
v-if="idea.status !== 'retired'"
@@ -376,6 +382,7 @@ onMounted(load);
.fam-row-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.5rem; }
.fam-applies { margin: 0.3rem 0 0; font-size: 0.85rem; color: var(--fs-text-secondary); }
.fam-platforms { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.35rem; }
.fam-topic { margin: 0.35rem 0 0; }
.fam-chip {
font-family: var(--fs-font-mono);
font-size: 0.72rem;