diff --git a/app/Dockerfile b/app/Dockerfile
index 044fe16..3ef59e3 100644
--- a/app/Dockerfile
+++ b/app/Dockerfile
@@ -23,6 +23,7 @@ ARG NEXT_PUBLIC_SOCKET_URL
ARG NEXT_PUBLIC_HOST
ARG NEXT_PUBLIC_SENTRY_DSN
ARG SENTRY_AUTH_TOKEN
+ARG NEXT_PUBLIC_FF_SHOW_LOGGED_CALLS
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
diff --git a/app/src/components/nav/AppShell.tsx b/app/src/components/nav/AppShell.tsx
index db29c73..7070d1d 100644
--- a/app/src/components/nav/AppShell.tsx
+++ b/app/src/components/nav/AppShell.tsx
@@ -52,7 +52,9 @@ const NavSidebar = () => {
<>
-
+ {env.NEXT_PUBLIC_FF_SHOW_LOGGED_CALLS && (
+
+ )}
{env.NEXT_PUBLIC_SHOW_DATA && (
diff --git a/app/src/components/nav/ProjectMenu.tsx b/app/src/components/nav/ProjectMenu.tsx
index aa67a34..6e5852e 100644
--- a/app/src/components/nav/ProjectMenu.tsx
+++ b/app/src/components/nav/ProjectMenu.tsx
@@ -12,9 +12,8 @@ import {
Button,
useDisclosure,
Spinner,
- useBreakpointValue,
} from "@chakra-ui/react";
-import React, { useCallback, useEffect, useState } from "react";
+import React, { useEffect, useState } from "react";
import Link from "next/link";
import { AiFillCaretDown } from "react-icons/ai";
import { BsGear, BsPlus } from "react-icons/bs";
@@ -44,8 +43,6 @@ export default function ProjectMenu() {
const { data: selectedOrg } = useSelectedOrg();
- const [expandButtonHovered, setExpandButtonHovered] = useState(false);
-
const popover = useDisclosure();
const createMutation = api.organizations.create.useMutation();
@@ -56,113 +53,84 @@ export default function ProjectMenu() {
await router.push({ pathname: "/project/settings" });
}, [createMutation, router]);
- const openMenu = useCallback(
- (event: React.MouseEvent) => {
- event.preventDefault();
- popover.onToggle();
- },
- [popover],
- );
-
- const sidebarExpanded = useBreakpointValue({ base: false, md: true });
-
return (
- <>
-
+
-
-
- PROJECT
-
-
-
-
-
-
- {selectedOrg?.name[0]?.toUpperCase()}
-
-
- {selectedOrg?.name}
-
-
-
- }
- size="xs"
- colorScheme="gray"
- color="gray.500"
- variant="ghost"
- mr={2}
- borderRadius={4}
- onMouseEnter={() => setExpandButtonHovered(true)}
- onMouseLeave={() => setExpandButtonHovered(false)}
- _hover={{ bgColor: isActive ? "gray.300" : "gray.200", transitionDelay: 0 }}
- onClick={openMenu}
- />
-
-
-
-
-
-
+
+
-
-
- PROJECTS
-
-
-
- {orgs?.map((org) => (
-
- ))}
-
-
-
- New project
+
+
+
+ {selectedOrg?.name[0]?.toUpperCase()}
+
+
+ {selectedOrg?.name}
+
+
-
-
-
- >
+
+
+
+
+ PROJECTS
+
+
+
+ {orgs?.map((org) => (
+
+ ))}
+
+
+
+ New project
+
+
+
+
+
+
);
}
@@ -180,7 +148,7 @@ const ProjectOption = ({
return (
{
setSelectedOrgId(org.id);
onClose();
@@ -190,7 +158,6 @@ const ProjectOption = ({
bgColor={isActive ? "gray.100" : "transparent"}
_hover={gearHovered ? undefined : { bgColor: "gray.200", textDecoration: "none" }}
p={2}
- borderRadius={4}
>
{org.name}
{
return {
redirect: {
- destination: "/logged-calls",
+ destination: "/experiments",
permanent: false,
},
};
diff --git a/app/src/pages/project/settings/index.tsx b/app/src/pages/project/settings/index.tsx
index 1e8a184..6083e69 100644
--- a/app/src/pages/project/settings/index.tsx
+++ b/app/src/pages/project/settings/index.tsx
@@ -111,7 +111,7 @@ export default function Settings() {
your code.
-
+
{selectedOrg?.personalOrgUserId ? (
diff --git a/app/src/server/api/routers/dashboard.router.ts b/app/src/server/api/routers/dashboard.router.ts
index ac11dbb..a97ce6f 100644
--- a/app/src/server/api/routers/dashboard.router.ts
+++ b/app/src/server/api/routers/dashboard.router.ts
@@ -34,9 +34,12 @@ export const dashboardRouter = createTRPCRouter({
let originalDataIndex = periods.length - 1;
// *SLAMS DOWN GLASS OF WHISKEY* timezones, amirite?
- let dayToMatch = dayjs(input.startDate || new Date())
+ let dayToMatch = dayjs(input.startDate || new Date());
// Ensure that the initial date we're matching against is never before the first period
- if (periods[originalDataIndex] && dayToMatch.isBefore(periods[originalDataIndex]?.period, "day")) {
+ if (
+ periods[originalDataIndex] &&
+ dayToMatch.isBefore(periods[originalDataIndex]?.period, "day")
+ ) {
dayToMatch = dayjs(periods[originalDataIndex]?.period);
}
const backfilledPeriods: typeof periods = [];
diff --git a/app/src/server/scripts/client-codegen.ts b/app/src/server/scripts/client-codegen.ts
index 997df8c..78d1262 100644
--- a/app/src/server/scripts/client-codegen.ts
+++ b/app/src/server/scripts/client-codegen.ts
@@ -16,7 +16,7 @@ fs.writeFileSync(schemaPath, JSON.stringify(openApiDocument, null, 2), "utf-8");
console.log("Generating Typescript client");
-const tsClientPath = path.join(clientLibsPath, "js/codegen");
+const tsClientPath = path.join(clientLibsPath, "typescript/codegen");
fs.rmSync(tsClientPath, { recursive: true, force: true });
diff --git a/app/src/server/tasks/queryModel.task.ts b/app/src/server/tasks/queryModel.task.ts
index 9b32d9d..d7a5dc8 100644
--- a/app/src/server/tasks/queryModel.task.ts
+++ b/app/src/server/tasks/queryModel.task.ts
@@ -1,5 +1,5 @@
import { type Prisma } from "@prisma/client";
-import { JsonValue, type JsonObject } from "type-fest";
+import { type JsonValue, type JsonObject } from "type-fest";
import modelProviders from "~/modelProviders/modelProviders";
import { prisma } from "~/server/db";
import { wsConnection } from "~/utils/wsConnection";
diff --git a/app/src/utils/useSocket.ts b/app/src/utils/useSocket.ts
index ba69387..bbefa4c 100644
--- a/app/src/utils/useSocket.ts
+++ b/app/src/utils/useSocket.ts
@@ -11,7 +11,6 @@ export default function useSocket(channel?: string | null) {
useEffect(() => {
if (!channel) return;
- console.log("connecting to channel", channel);
// Create websocket connection
socketRef.current = io(url);