Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions examples/system-test-route/src/shared/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ export function createAndStartServer(
setInterval(() => {
tickIndex++;
console.log("Tick", tickIndex);
console.log(
JSON.stringify({ level: "info", message: "tick", tickIndex }),
);
console.log(`level=info message=tick tickIndex=${tickIndex}`);
}, 1000);

// Get port from environment
Expand All @@ -37,14 +41,16 @@ export function createAndStartServer(
const app = new Hono();

app.get("/health", (c) => c.text("ok"));

// Add a catch-all route to handle any other path (for testing routeSubpaths)
app.all("*", (c) => {
console.log(`Received request to ${c.req.url} from ${c.req.header("x-forwarded-for") || "unknown"}`);
return c.json({
actorId,
console.log(
`Received request to ${c.req.url} from ${c.req.header("x-forwarded-for") || "unknown"}`,
);
return c.json({
actorId,
path: c.req.path,
query: c.req.query()
query: c.req.query(),
});
});

Expand Down
3 changes: 2 additions & 1 deletion frontend/apps/hub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@tanstack/react-query-devtools": "^5.58.0",
"@tanstack/react-query-persist-client": "^5.56.2",
"@tanstack/react-router": "^1.114.25",
"@tanstack/react-table": "^8.20.6",
"@tanstack/react-table": "^8.21.2",
"@tanstack/router-devtools": "^1.114.25",
"@tanstack/router-plugin": "^1.114.25",
"@tanstack/zod-adapter": "^1.114.25",
Expand All @@ -40,6 +40,7 @@
"framer-motion": "^11.2.11",
"jotai": "^2.12.2",
"lodash": "^4.17.21",
"nanoid": "^5.1.5",
"posthog-js": "^1.144.2",
"react": "^19.0.0",
"react-dom": "^19.0.0",
Expand Down
2 changes: 1 addition & 1 deletion frontend/apps/hub/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ declare module "@tanstack/react-router" {
router: typeof router;
}
interface StaticDataRouteOption {
layout?: "full" | "compact" | "onboarding" | "actors";
layout?: "full" | "compact" | "onboarding" | "actors" | "v2";
}
}

Expand Down
12 changes: 10 additions & 2 deletions frontend/apps/hub/src/components/header/header-sub-nav.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
import { useAuth } from "@/domains/auth/contexts/auth";
import { Skeleton, cn } from "@rivet-gg/components";
import { ErrorBoundary } from "@sentry/react";
import { useMatchRoute } from "@tanstack/react-router";
import {
useMatches,
useMatchRoute,
useRouterState,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: useRouterState is imported but never used in the code

Suggested change
useRouterState,
useMatches,
useMatchRoute,

} from "@tanstack/react-router";
import { Suspense, useContext } from "react";
import { MobileBreadcrumbsContext } from "../breadcrumbs/mobile-breadcrumbs";
import { HeaderEnvironmentLinks } from "./links/header-environment-links";
import { HeaderGroupLinks } from "./links/header-group-links";
import { HeaderProjectLinks } from "./links/header-project-links";

function Content() {
const allMatches = useMatches();

const v2Envs = allMatches.find((match) => match.id.includes("/_v2/"));

const matchRoute = useMatchRoute();

const { profile } = useAuth();

if (!profile?.identity.isRegistered) {
if (!profile?.identity.isRegistered || v2Envs) {
return null;
}

Expand Down
Loading
Loading