From 699a4cd98696a5477d72801673b1d420a6058a4d Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Wed, 21 Oct 2026 21:10:45 -0400 Subject: [PATCH] docs(6208): ProjectView, KnowledgeView, SnippetListView and components.css comments drop citations and stories components.css says why shared recipes live there without the five-copy .btn-primary count; KnowledgeView's editor-routing and chip comments state the present reason instead of the bug that once routed snippets wrong. Co-Authored-By: Claude Opus 5.5 --- frontend/src/assets/components.css | 27 ++++++++----------- frontend/src/views/KnowledgeView.vue | 37 ++++++++++---------------- frontend/src/views/ProjectView.vue | 24 ++++++++--------- frontend/src/views/SnippetListView.vue | 4 +-- 4 files changed, 39 insertions(+), 53 deletions(-) diff --git a/frontend/src/assets/components.css b/frontend/src/assets/components.css index c886ef0c..a1ee3684 100644 --- a/frontend/src/assets/components.css +++ b/frontend/src/assets/components.css @@ -3,11 +3,10 @@ * * WHY THIS FILE EXISTS * - * `.btn-primary` was defined five times, in five scoped stylesheets, and all - * five had drifted: three paddings, three font sizes, three disabled opacities, - * and one view with no disabled style at all (#2273). Nothing detected that, - * because a scoped duplicate is invisible to every tool — it isn't a rule - * violation, isn't a broken reference, and isn't a recorded snippet. + * A recipe copied into several scoped stylesheets drifts — paddings, font + * sizes, disabled states — and nothing detects it, because a scoped duplicate + * is invisible to every tool: it isn't a rule violation, isn't a broken + * reference, and isn't a recorded snippet. Shared recipes live here instead. * * GEOMETRY LIVES HERE. Every value is a design-system token, so a palette or * scale change moves the buttons rather than stranding a copy that no longer @@ -301,9 +300,7 @@ /* ── Page container ───────────────────────────────────────────────────────── The one wrapper a top-level view sits in: page width from the layout tokens, centred, clipped horizontally so a wide child (a kanban, a table) - scrolls inside itself instead of the page. ProjectListView, ProjectView and - SnippetListView each carried this rule under their own name until #2903 - (milestone 299). */ + scrolls inside itself instead of the page. */ .page-container { max-width: var(--fs-layout-page-max); margin: 2rem auto; @@ -311,12 +308,11 @@ overflow-x: clip; } -/* ── Form input (fs-surfaces, snippet #2336) ──────────────────────────────── +/* ── Form input (fs-surfaces) ─────────────────────────────────────────────── Inputs sit DARKER than the page they're on — an inset well rather than a raised panel; that inversion is what makes a field read as writable. The design system's recipe, verbatim; width/box-sizing stay the caller's - (an inline select and a full-width textarea differ there). Three scoped - copies of an older input recipe were folded into this in #2903. */ + (an inline select and a full-width textarea differ there). */ .fs-input { background: var(--fs-surface-page); border: var(--fs-border); @@ -331,8 +327,8 @@ .fs-input:focus { outline: none; box-shadow: var(--fs-focus-ring); } .fs-input:disabled { opacity: var(--fs-disabled-opacity); cursor: not-allowed; } -/* Page scaffold + feedback text recipes (milestone 302, note 2917): name - families the consumer map showed to be one recipe living in many views. +/* Page scaffold + feedback text recipes: families that are one recipe + living in many views. A view keeps only its deviation as a scoped remainder/override. */ .page-header { display: flex; @@ -355,9 +351,8 @@ /* --- usage badge ---------------------------------------------------------- "surfaced N×, opened M×" on a list row, for any record kind the retrieval surfaces can choose: snippets and notes from note_usage_events, rules from - rule_usage_events. Promoted here from SnippetListView's scoped block when - the rule list needed the same chip (milestone 333 step 5) — a second scoped - copy is how the ninth duplicated CSS family starts (#3207). + rule_usage_events. Shared here because a second scoped copy is how a + duplicated CSS family starts. Geometry and colour only. A view keeps its own spacing as a scoped remainder, the way it does for every other recipe in this file. */ diff --git a/frontend/src/views/KnowledgeView.vue b/frontend/src/views/KnowledgeView.vue index ea84fd5c..4a48021e 100644 --- a/frontend/src/views/KnowledgeView.vue +++ b/frontend/src/views/KnowledgeView.vue @@ -48,7 +48,7 @@ interface KnowledgeItem { created_at: string; updated_at: string; /** Surfaced-vs-opened counts, zero-filled by the route for EVERY row, so - * "never surfaced" is a value here rather than a missing field (#4230). + * "never surfaced" is a value here rather than a missing field. * `UsageBadge` renders nothing at all below one surfacing. */ usage?: RecordUsage | null; // Set only when another user owns this record — their suggestion, not one of @@ -69,10 +69,9 @@ interface KnowledgeItem { // a task KIND (`task` for any, else issue / spike) — because that is what this // feed actually holds. // -// `plan` is still a valid facet at the API, for the 90 legacy plan-tasks, but -// it has no chip: retired in 0066, it kept a chip of its own for longer than -// `issue` — 17% of every task here — went without one (#3128). Those rows are -// still reachable under Tasks, wearing a Plan badge. +// `plan` is still a valid facet at the API, for legacy plan-tasks, but it has +// no chip: plans are milestones now. Those rows are still reachable under +// Tasks, wearing a Plan badge. type Facet = "" | "note" | "task" | "issue" | "spike" | "snippet" | "process" | "lesson"; // The facets that select TASKS. Kinds are subsets of `task`, so any of them @@ -93,7 +92,7 @@ const FACET_CHIPS: [Exclude, string][] = [ // The sweep is cross-cutting — a note that has gone false does not care which // facet it sits under — so it REPLACES the browse list rather than filtering // it. Filtering would mean the answer depended on which chip was active, which -// is the under-reporting the sweep exists to prevent (milestone 317 step 4). +// is the under-reporting the sweep exists to prevent. const sweepActive = ref(false); // ─── Filter state ───────────────────────────────────────────────────────────── @@ -201,8 +200,8 @@ const items = ref([]); // True only when a search actually returned matched passages — not merely when // the box has text in it. A keyword-only result set, or an embedder that is -// down, carries `body_opening` rows, and claiming otherwise would be the same -// species of lie this whole change is about (#4243). +// down, carries `body_opening` rows, and labelling those as matched passages +// would misstate why the row is there. const showsMatchedPassages = computed( () => searchQuery.value.trim().length > 0 && @@ -351,12 +350,8 @@ function isOverdue(item: KnowledgeItem): boolean { return new Date(item.due_date) < new Date(new Date().toDateString()); } -// Each record kind opens in ITS OWN editor. A snippet used to fall through to -// /notes/:id, whose save is a plain PATCH of the body — which left the snippet's -// derived `data` mirror describing the previous version (#3128). The service now -// recomposes the mirror either way, so this is no longer the guard; it is simply -// that the note editor cannot edit a snippet's signature, language or locations, -// and offering it as the way in was always wrong. Processes stay here on +// Each record kind opens in ITS OWN editor: the note editor cannot edit a +// snippet's signature, language or locations, so it is not the way in. Processes stay here on // purpose: they have no editor of their own and the note editor knows the type. function openItem(item: KnowledgeItem) { if (item.note_type === 'task') { @@ -666,7 +661,7 @@ onUnmounted(() => { class="shared-tag" :title="`Shared by ${item.owner ?? 'another user'} — their record, not yours`" >by {{ item.owner ?? "another user" }} - -
@@ -874,7 +874,7 @@ async function confirmDelete() { the shape ledger and reports how many are classified against canon.

{{ coverageError }}

-
@@ -1200,7 +1200,7 @@ async function confirmDelete() { :design-system-id="project.design_system_id ?? null" /> - + (null); const merging = ref(false); -// Near-duplicate report (#2088). Loaded on demand, not with the list: it's a +// Near-duplicate report. Loaded on demand, not with the list: it's a // pairwise scan and most visits to this page aren't a tidy-up. const duplicateGroups = ref([]); const dupLoading = ref(false);