CI & Build / Python lint (push) Successful in 2s
CI & Build / Plugin hooks (push) Successful in 12s
CI & Build / TypeScript typecheck (push) Successful in 53s
CI & Build / integration (push) Successful in 1m9s
CI & Build / Python tests (push) Successful in 1m55s
CI & Build / Build & push image (push) Successful in 34s
The acceptance greps found what the per-area passes missed: - src/scribe: "Phase 7/8" removal notes in projects, settings and user_profile; a paragraph promising an auto-summary side effect that no longer exists; user_profile's claim that "upcoming MCP profile tools" read the profile, which nothing does; an instance count and instance rule titles in plugin_context; "MILESTONE 323 DECIDED" in rulebooks. - scripts/: check_plugin's header and inline comments were a history of the incidents behind each guard, with issue numbers in two failure messages; check_dangling_styles named this app's classes as its examples; check_design_tokens, measure_duplication and mint_plugin_version cited issues and checklists. - frontend/src: forty-odd comments with four-digit issue numbers that the earlier frontend scan filtered out as hex colours, plus "used to" and "Phase N" notes. Kept: illustrative ids (`#4181` as a bare-id example, `PR #198`), migration Create Date headers and one migration's dated data floor, and the plugin skills' worked examples of how to cite a record. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
197 lines
5.2 KiB
TypeScript
197 lines
5.2 KiB
TypeScript
import { createRouter, createWebHistory } from "vue-router";
|
|
import { useAuthStore } from "@/stores/auth";
|
|
|
|
const router = createRouter({
|
|
history: createWebHistory(),
|
|
routes: [
|
|
{
|
|
// The dashboard ("what to work on") is the landing page; Knowledge
|
|
// remains as the exhaustive "Browse" surface.
|
|
path: "/",
|
|
redirect: "/dashboard",
|
|
},
|
|
{
|
|
path: "/dashboard",
|
|
name: "dashboard",
|
|
component: () => import("@/views/DashboardView.vue"),
|
|
},
|
|
{
|
|
path: "/knowledge",
|
|
name: "knowledge",
|
|
component: () => import("@/views/KnowledgeView.vue"),
|
|
},
|
|
{
|
|
path: "/login",
|
|
name: "login",
|
|
component: () => import("@/views/LoginView.vue"),
|
|
meta: { public: true },
|
|
},
|
|
{
|
|
path: "/register",
|
|
name: "register",
|
|
component: () => import("@/views/RegisterView.vue"),
|
|
meta: { public: true },
|
|
},
|
|
{
|
|
path: "/forgot-password",
|
|
name: "forgot-password",
|
|
component: () => import("@/views/ForgotPasswordView.vue"),
|
|
meta: { public: true },
|
|
},
|
|
{
|
|
path: "/reset-password",
|
|
name: "reset-password",
|
|
component: () => import("@/views/ResetPasswordView.vue"),
|
|
meta: { public: true },
|
|
},
|
|
{
|
|
path: "/register-invite",
|
|
name: "register-invite",
|
|
component: () => import("@/views/RegisterInviteView.vue"),
|
|
meta: { public: true },
|
|
},
|
|
{
|
|
path: "/notes",
|
|
redirect: "/knowledge",
|
|
},
|
|
{
|
|
path: "/notes/new",
|
|
name: "note-new",
|
|
component: () => import("@/views/NoteEditorView.vue"),
|
|
},
|
|
{
|
|
path: "/notes/:id",
|
|
name: "note-view",
|
|
component: () => import("@/views/NoteViewerView.vue"),
|
|
},
|
|
{
|
|
path: "/notes/:id/edit",
|
|
name: "note-edit",
|
|
component: () => import("@/views/NoteEditorView.vue"),
|
|
},
|
|
{
|
|
// Lessons have no list view of their own: the Knowledge browse surface
|
|
// is where every kind is enumerated, and a second list would be a
|
|
// second vocabulary to keep in step with it. `/knowledge?type=lesson` is
|
|
// the list.
|
|
path: "/lessons/new",
|
|
name: "lesson-new",
|
|
component: () => import("@/views/LessonEditorView.vue"),
|
|
},
|
|
{
|
|
path: "/lessons/:id",
|
|
name: "lesson-view",
|
|
component: () => import("@/views/LessonDetailView.vue"),
|
|
},
|
|
{
|
|
path: "/lessons/:id/edit",
|
|
name: "lesson-edit",
|
|
component: () => import("@/views/LessonEditorView.vue"),
|
|
},
|
|
{
|
|
path: "/snippets",
|
|
name: "snippets",
|
|
component: () => import("@/views/SnippetListView.vue"),
|
|
},
|
|
{
|
|
path: "/snippets/new",
|
|
name: "snippet-new",
|
|
component: () => import("@/views/SnippetEditorView.vue"),
|
|
},
|
|
{
|
|
path: "/snippets/:id",
|
|
name: "snippet-view",
|
|
component: () => import("@/views/SnippetDetailView.vue"),
|
|
},
|
|
{
|
|
path: "/snippets/:id/edit",
|
|
name: "snippet-edit",
|
|
component: () => import("@/views/SnippetEditorView.vue"),
|
|
},
|
|
{
|
|
path: "/graph",
|
|
name: "graph",
|
|
component: () => import("@/views/GraphView.vue"),
|
|
},
|
|
{
|
|
path: "/projects",
|
|
name: "projects",
|
|
component: () => import("@/views/ProjectListView.vue"),
|
|
},
|
|
{
|
|
path: "/projects/:id",
|
|
name: "project-view",
|
|
component: () => import("@/views/ProjectView.vue"),
|
|
},
|
|
{
|
|
path: "/rules",
|
|
name: "rules",
|
|
component: () => import("@/views/RulesView.vue"),
|
|
},
|
|
{
|
|
// Family canon: ideas shared across every project on a
|
|
// platform, and the log of every decision about them.
|
|
path: "/family",
|
|
name: "family",
|
|
component: () => import("@/views/FamilyView.vue"),
|
|
},
|
|
{
|
|
// The design systems this install RECORDS — for the projects it tracks,
|
|
// not for the install itself. A page reading the running app's own
|
|
// stylesheet out of the browser could only inspect the instance it was
|
|
// served from, a mirror rather than a tool.
|
|
path: "/design-systems",
|
|
name: "design-systems",
|
|
component: () => import("@/views/DesignSystemsView.vue"),
|
|
},
|
|
{
|
|
path: "/tasks",
|
|
redirect: "/",
|
|
},
|
|
{
|
|
path: "/tasks/new",
|
|
name: "task-new",
|
|
component: () => import("@/views/TaskEditorView.vue"),
|
|
},
|
|
{
|
|
path: "/tasks/:id",
|
|
name: "task-edit",
|
|
component: () => import("@/views/TaskEditorView.vue"),
|
|
},
|
|
{
|
|
path: "/shared",
|
|
name: "shared-with-me",
|
|
component: () => import("@/views/SharedWithMeView.vue"),
|
|
},
|
|
{
|
|
path: "/settings",
|
|
name: "settings",
|
|
component: () => import("@/views/SettingsView.vue"),
|
|
},
|
|
{
|
|
path: "/trash",
|
|
name: "trash",
|
|
component: () => import("@/views/TrashView.vue"),
|
|
},
|
|
{ path: "/admin/users", redirect: "/settings" },
|
|
{ path: "/admin/logs", redirect: "/settings" },
|
|
],
|
|
});
|
|
|
|
router.beforeEach(async (to) => {
|
|
if (to.meta.public) return;
|
|
|
|
const authStore = useAuthStore();
|
|
|
|
// Wait for initial auth check if still loading
|
|
if (authStore.loading && !authStore.isAuthenticated) {
|
|
await authStore.checkAuth();
|
|
}
|
|
|
|
if (!authStore.isAuthenticated) {
|
|
return { name: "login", query: { redirect: to.fullPath } };
|
|
}
|
|
});
|
|
|
|
export default router;
|