diff --git a/frontend/src/api/designSystems.ts b/frontend/src/api/designSystems.ts index e3d7f21..7641ccf 100644 --- a/frontend/src/api/designSystems.ts +++ b/frontend/src/api/designSystems.ts @@ -200,6 +200,14 @@ export interface SnippetCheck { findings: SnippetFinding[]; } -/** Which recorded snippets disagree with this design system's sheet. */ -export const checkSnippets = (id: number) => - apiGet(`/api/design-systems/${id}/snippet-check`); +/** Which recorded snippets disagree with this design system's sheet. + * + * `projectId` narrows to the snippets one project owns — which is how a + * project asks about its OWN code. Omit it to check every project, which is + * the right default from the system's side: a component recorded elsewhere + * still has to use the same tags. */ +export const checkSnippets = (id: number, projectId?: number) => + apiGet( + `/api/design-systems/${id}/snippet-check` + + (projectId ? `?project_id=${projectId}` : ""), + ); diff --git a/frontend/src/components/ProjectDesignTab.vue b/frontend/src/components/ProjectDesignTab.vue new file mode 100644 index 0000000..01f9bd4 --- /dev/null +++ b/frontend/src/components/ProjectDesignTab.vue @@ -0,0 +1,234 @@ + + + + + diff --git a/frontend/src/views/ProjectView.vue b/frontend/src/views/ProjectView.vue index df691ba..538c01d 100644 --- a/frontend/src/views/ProjectView.vue +++ b/frontend/src/views/ProjectView.vue @@ -7,6 +7,7 @@ import { useTasksStore } from "@/stores/tasks"; import { relativeTime } from "@/composables/useRelativeTime"; import { renderMarkdown } from "@/utils/markdown"; import ShareDialog from "@/components/ShareDialog.vue"; +import ProjectDesignTab from "@/components/ProjectDesignTab.vue"; import ProjectRulesTab from "@/components/rules/ProjectRulesTab.vue"; import SystemsSection from "@/components/SystemsSection.vue"; import { @@ -108,7 +109,7 @@ async function confirmStartPlanning() { const saving = ref(false); const error = ref(null); -const activeTab = ref<"tasks" | "notes" | "systems" | "rules">("tasks"); +const activeTab = ref<"tasks" | "notes" | "systems" | "rules" | "design">("tasks"); const tasks = ref([]); const notes = ref([]); @@ -570,6 +571,9 @@ async function confirmDelete() { + @@ -784,6 +788,16 @@ async function confirmDelete() { + + +