From 682bea525708430e5b97c58038e236c29241d286 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Wed, 26 Aug 2026 14:26:20 -0400 Subject: [PATCH] =?UTF-8?q?fix(rules):=20the=20third=20row=20literal=20?= =?UTF-8?q?=E2=80=94=20fetchRules=20builds=20a=20list=20row=20too=20(#3029?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit vue-tsc caught what I missed: there were THREE places hand-building a rule list row, not two. fetchRules mapped full rules down to the same four fields in a spot far from the other two, so consolidating the pair I could see left this one behind — which is precisely how the server side ended up with three divergent trim dicts in the first place. All three now go through toHeader. Co-Authored-By: Claude Opus 5 (1M context) --- frontend/src/stores/rulebooks.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/frontend/src/stores/rulebooks.ts b/frontend/src/stores/rulebooks.ts index 4943e91..cfaa8ea 100644 --- a/frontend/src/stores/rulebooks.ts +++ b/frontend/src/stores/rulebooks.ts @@ -35,9 +35,7 @@ export const useRulebooksStore = defineStore("rulebooks", () => { async function fetchRules(topicId: number) { try { const rules = await api.listRules({ topic_id: topicId }); - rulesByTopic.value[topicId] = rules.map((r) => ({ - id: r.id, title: r.title, statement: r.statement, topic_id: r.topic_id, - })); + rulesByTopic.value[topicId] = rules.map(toHeader); } catch (e) { useToastStore().show("Failed to load rules", "error"); throw e;