From c6ba7bc617411522a11bfd8f5a5d9fb6e75c8730 Mon Sep 17 00:00:00 2001 From: hurryup52 Date: Sun, 26 Jul 2026 08:30:40 +0200 Subject: [PATCH 1/2] fix(ui): point roadmap owner-console card at the dedicated /app/owner route The "Phase 3: repo owner intake console" card linked to /app/repos, which defaults to the Maintainer console tab when no search param is given -- the opposite surface from what the card describes. Every other phase already links to its own dedicated route; this does the same for Phase 3. Closes #8669 --- apps/loopover-ui/src/routes/roadmap.test.tsx | 42 ++++++++++++++++++++ apps/loopover-ui/src/routes/roadmap.tsx | 4 +- 2 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 apps/loopover-ui/src/routes/roadmap.test.tsx diff --git a/apps/loopover-ui/src/routes/roadmap.test.tsx b/apps/loopover-ui/src/routes/roadmap.test.tsx new file mode 100644 index 0000000000..fe36fc6c4f --- /dev/null +++ b/apps/loopover-ui/src/routes/roadmap.test.tsx @@ -0,0 +1,42 @@ +import { render, screen } from "@testing-library/react"; +import { describe, expect, it } from "vitest"; +import type { ReactNode } from "react"; +import { vi } from "vitest"; + +// jsdom has no IntersectionObserver; RoadmapPage wraps its content in , a framer-motion +// viewport-triggered animation that needs one to mount. No other test in this file tree renders +// Reveal yet, so there's no existing global stub to reuse -- a minimal no-op observer is enough, +// since the tests here only assert on rendered link hrefs, not the reveal animation itself. +class MockIntersectionObserver { + observe() {} + unobserve() {} + disconnect() {} +} +vi.stubGlobal("IntersectionObserver", MockIntersectionObserver); + +// Stub TanStack Router the same way install.permissions.test.tsx does: Link becomes a plain +// carrying the resolved `to` as its href, so the rendered destination can be asserted directly. +vi.mock("@tanstack/react-router", () => ({ + createFileRoute: () => () => ({}), + Link: ({ to, children }: { to: string; children: ReactNode }) => {children}, +})); + +import { RoadmapPage } from "./roadmap"; + +// #8669: the "Phase 3: repo owner intake console" card linked to /app/repos, which defaults to the +// Maintainer console tab (app.repos.tsx:27) with no search param -- the opposite surface from what +// the card describes. Locks in the fix to the dedicated /app/owner route, and guards that no other +// phase's link moved as a side effect. +describe("RoadmapPage phase links (#8669)", () => { + it("routes the repo owner intake console card to the dedicated Owner workspace, not the Maintainer tab", () => { + render(); + const link = screen.getByRole("link", { name: /Open repos console/i }); + expect(link.getAttribute("href")).toBe("/app/owner"); + }); + + it("leaves the maintainer trust card's link unchanged (sibling regression guard)", () => { + render(); + const link = screen.getByRole("link", { name: /Open maintainer console/i }); + expect(link.getAttribute("href")).toBe("/app/maintainer"); + }); +}); diff --git a/apps/loopover-ui/src/routes/roadmap.tsx b/apps/loopover-ui/src/routes/roadmap.tsx index 1b1accfd08..3527116240 100644 --- a/apps/loopover-ui/src/routes/roadmap.tsx +++ b/apps/loopover-ui/src/routes/roadmap.tsx @@ -100,7 +100,7 @@ const LINK_MAP: Record = { to: "/app/maintainer", label: "Open maintainer console", }, - "Phase 3: repo owner intake console": { to: "/app/repos", label: "Open repos console" }, + "Phase 3: repo owner intake console": { to: "/app/owner", label: "Open repos console" }, "Phase 4: adoption analytics and launch system": { to: "/app/analytics", label: "Open analytics", @@ -108,7 +108,7 @@ const LINK_MAP: Record = { "Phase 5: ecosystem distribution": { to: "/app/digest", label: "Preview the digest" }, }; -function RoadmapPage() { +export function RoadmapPage() { const grouped = COLUMNS.map((c) => ({ ...c, items: ROADMAP_ITEMS.filter((r) => r.status === c.key), From ac5886da7bb973ef31c0f102bb727b947cf55d43 Mon Sep 17 00:00:00 2001 From: hurryup52 Date: Sun, 26 Jul 2026 08:34:21 +0200 Subject: [PATCH 2/2] chore(ui): merge duplicate vitest import in roadmap test --- apps/loopover-ui/src/routes/roadmap.test.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/loopover-ui/src/routes/roadmap.test.tsx b/apps/loopover-ui/src/routes/roadmap.test.tsx index fe36fc6c4f..eb32492653 100644 --- a/apps/loopover-ui/src/routes/roadmap.test.tsx +++ b/apps/loopover-ui/src/routes/roadmap.test.tsx @@ -1,7 +1,6 @@ import { render, screen } from "@testing-library/react"; -import { describe, expect, it } from "vitest"; +import { describe, expect, it, vi } from "vitest"; import type { ReactNode } from "react"; -import { vi } from "vitest"; // jsdom has no IntersectionObserver; RoadmapPage wraps its content in , a framer-motion // viewport-triggered animation that needs one to mount. No other test in this file tree renders