Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
57b9824
fix: overlapping in deployment list
ogzhanolguncu Jan 29, 2026
2856433
chore: delete state change
ogzhanolguncu Jan 29, 2026
4bbb091
feat: add actual network elements
ogzhanolguncu Jan 29, 2026
fdc7057
refactor: replace rest of the regions with sentinel
ogzhanolguncu Jan 29, 2026
8646467
chore: tidy up
ogzhanolguncu Jan 29, 2026
9b5fb64
feat: add RPS CH queries
ogzhanolguncu Jan 29, 2026
7245807
feat: add proper formatting for metrics
ogzhanolguncu Jan 29, 2026
02bf9a0
feat: add proper foramtting
ogzhanolguncu Jan 29, 2026
48963c2
Merge branch 'main' of github.com:unkeyed/unkey into deployment-netwo…
ogzhanolguncu Jan 29, 2026
38b8980
Merge branch 'main' of github.com:unkeyed/unkey into deployment-netwo…
ogzhanolguncu Jan 30, 2026
3fcac1a
feat: add RPS chart
ogzhanolguncu Jan 30, 2026
18d3ea8
feat: add latency chart
ogzhanolguncu Jan 30, 2026
04889f6
refactor: fix AVG aggregation
ogzhanolguncu Jan 30, 2026
bc18de1
chore: update logs querry
ogzhanolguncu Jan 30, 2026
9f982ac
refactor: reorganize componetns
ogzhanolguncu Jan 30, 2026
53b6ff4
chore: tidy
ogzhanolguncu Feb 2, 2026
60b2693
chore: explanation line
ogzhanolguncu Feb 2, 2026
2bc6bc0
feat: add disabled for navbar-popover
ogzhanolguncu Feb 2, 2026
f491b04
Merge branch 'main' into deployment-network-tab
ogzhanolguncu Feb 2, 2026
b778105
fix: type issues
ogzhanolguncu Feb 2, 2026
c77ab3f
feat: update sidebar nesting
ogzhanolguncu Feb 2, 2026
a9b0312
feat: add tRPC for runtime-lgos
ogzhanolguncu Feb 2, 2026
3149d09
feat: add rough version of runtime-logs
ogzhanolguncu Feb 2, 2026
dd807a3
chore: fmt
ogzhanolguncu Feb 3, 2026
5d3af16
refactor: styling of runtime logs
ogzhanolguncu Feb 3, 2026
2071e2c
refactor: use the same schema
ogzhanolguncu Feb 3, 2026
84d6e8a
feat: add message filter
ogzhanolguncu Feb 3, 2026
1e60de0
refactor: use proper filters schema
ogzhanolguncu Feb 3, 2026
cfafe18
feat: add AI search
ogzhanolguncu Feb 3, 2026
2c47664
feat: add proper resizing for smaller screens and switch to table-aut…
ogzhanolguncu Feb 3, 2026
3754d20
chore: allow overriding table layout
ogzhanolguncu Feb 3, 2026
10d867e
refactor: improve ui
ogzhanolguncu Feb 3, 2026
1cff653
fix: ui inconsistenties
ogzhanolguncu Feb 3, 2026
bff53a1
chore: improve styling of custom domains
ogzhanolguncu Feb 3, 2026
31cbbaf
feat: add runtime-logs to active deployment card
ogzhanolguncu Feb 3, 2026
2e4da3b
refactor: custom domain styless
ogzhanolguncu Feb 3, 2026
423e4fc
fix: formatting
ogzhanolguncu Feb 3, 2026
43c4df1
chore: improvemetns
ogzhanolguncu Feb 4, 2026
be3e5c5
refactor: use shared component for flags
ogzhanolguncu Feb 4, 2026
ba2ddf1
Merge branch 'main' of github.com:unkeyed/unkey into deployment-runti…
ogzhanolguncu Feb 4, 2026
c17cec3
chore: tidyup
ogzhanolguncu Feb 4, 2026
faa9e44
fix: network status bar overlapping
ogzhanolguncu Feb 4, 2026
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
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ export const KeysList = ({
"text-xs align-middle whitespace-nowrap pr-4",
idx === 0 ? "pl-[18px]" : "",
column.key === "key" ? "py-[6px]" : "py-1",
column.cellClassName,
)}
style={{ height: `${rowHeight}px` }}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ export const PermissionsList = () => {
className={cn(
"text-xs align-middle whitespace-nowrap",
column.key === "permission" ? "py-[6px]" : "py-1",
column.cellClassName,
)}
style={{ height: `${rowHeight}px` }}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ export const RolesList = () => {
className={cn(
"text-xs align-middle whitespace-nowrap",
column.key === "role" ? "py-[6px]" : "py-1",
column.cellClassName,
)}
style={{ height: `${rowHeight}px` }}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ export const IdentitiesList = () => {
"text-xs align-middle whitespace-nowrap pr-4",
idx === 0 ? "pl-[18px]" : "",
column.key === "externalId" ? "py-[6px]" : "py-1",
column.cellClassName,
)}
style={{ height: `${rowHeight}px` }}
>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { TimeseriesData } from "@/components/logs/overview-charts/types";
import { formatLatency } from "@/lib/utils/metric-formatters";
import type { IconProps } from "@unkey/icons";
import type { ComponentType } from "react";
import { LogsTimeseriesBarChart } from "../../../network/unkey-flow/components/overlay/node-details-panel/components/chart";
Expand Down Expand Up @@ -77,8 +78,16 @@ export function MetricCard({
</div>
<div className="ml-auto flex flex-col">
<div className="flex gap-0.5 items-center">
<span className="text-grayA-12 font-medium text-xs">{currentValue}</span>
<span className="text-grayA-9 text-xs"> {config.unit}</span>
{metricType === "latency" ? (
<span className="text-grayA-12 font-medium text-xs">
{formatLatency(currentValue)}
</span>
) : (
<>
<span className="text-grayA-12 font-medium text-xs">{currentValue}</span>
<span className="text-grayA-9 text-xs"> {config.unit}</span>
</>
)}
</div>
{secondaryValue && (
<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { ActiveDeploymentCard } from "../../../../../../components/active-deploy
import { DeploymentStatusBadge } from "../../../../../../components/deployment-status-badge";
import { DisabledWrapper } from "../../../../../../components/disabled-wrapper";
import { InfoChip } from "../../../../../../components/info-chip";
import { RegionFlags } from "../../../../../../components/region-flags";
import { Section, SectionHeader } from "../../../../../../components/section";
import { useProject } from "../../../../../layout-provider";

Expand All @@ -16,14 +17,16 @@ export function DeploymentInfoSection() {
const deploymentId = params?.deploymentId as string;

const { collections, setIsDetailsOpen, isDetailsOpen } = useProject();
const deployment = useLiveQuery(
const { data } = useLiveQuery(
(q) =>
q
.from({ deployment: collections.deployments })
.where(({ deployment }) => eq(deployment.id, deploymentId)),
[deploymentId],
);
const deploymentStatus = deployment.data.at(0)?.status;

const deployment = data.at(0);
const deploymentStatus = deployment?.status;

return (
<Section>
Expand All @@ -37,7 +40,7 @@ export function DeploymentInfoSection() {
<div className="flex gap-1.5 items-center">
<DisabledWrapper
tooltipContent="Resource metrics coming soon"
className="flex gap-1.5 items-center"
className="2xl:flex gap-1.5 items-center hidden"
>
<InfoChip icon={Bolt}>
<div className="text-grayA-10 text-xs">
Expand All @@ -55,17 +58,7 @@ export function DeploymentInfoSection() {
</div>
</InfoChip>
</DisabledWrapper>
<div className="gap-1 flex items-center justify-center cursor-pointer border border-grayA-3 transition-all duration-100 bg-grayA-3 p-1.5 h-[22px] rounded-md">
<div className="border rounded-[10px] border-grayA-3 size-4 bg-grayA-3 flex items-center justify-center">
<img src={"/images/flags/us.svg"} alt="us-flag" className="size-4" />
</div>
<div className="border rounded-[10px] border-grayA-3 size-4 bg-grayA-3 flex items-center justify-center">
<img src={"/images/flags/de.svg"} alt="de-flag" className="size-4" />
</div>
<div className="border rounded-[10px] border-grayA-3 size-4 bg-grayA-3 flex items-center justify-center">
<img src={"/images/flags/in.svg"} alt="in-flag" className="size-4" />
</div>
</div>
<RegionFlags instances={deployment?.instances ?? []} />
<InfoTooltip asChild content="Show deployment details">
<Button
variant="ghost"
Expand All @@ -78,12 +71,7 @@ export function DeploymentInfoSection() {
</InfoTooltip>
</div>
}
statusBadge={
<DeploymentStatusBadge
status={deploymentStatus}
className="text-successA-11 font-medium"
/>
}
statusBadge={<DeploymentStatusBadge status={deploymentStatus} />}
/>
</Section>
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
import { cn } from "@/lib/utils";
import { formatLatency } from "@/lib/utils/metric-formatters";
import type { SentinelLogsResponse } from "@unkey/clickhouse/src/sentinel";
import { Badge } from "@unkey/ui";
import { Badge, InfoTooltip } from "@unkey/ui";

export const LatencyBadge = ({ log }: { log: SentinelLogsResponse }) => {
const style = getLatencyStyle(log.total_latency);
const tooltipText = `Total: ${log.total_latency}ms | Instance: ${log.instance_latency}ms | Sentinel: ${log.sentinel_latency}ms`;

return (
<Badge
className={cn("px-[6px] rounded-md font-mono whitespace-nowrap tabular-nums", style)}
title={tooltipText}
>
{formatLatency(log.total_latency)}
</Badge>
<InfoTooltip content={tooltipText}>
<Badge className={cn("px-[6px] rounded-md font-mono whitespace-nowrap tabular-nums", style)}>
{formatLatency(log.total_latency)}
</Badge>
</InfoTooltip>
);
};

const formatLatency = (latency: number): string => {
return `${latency}ms`;
};

/**
* Get CSS classes for latency badge based on performance thresholds
* - >500ms: error (red)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
"use client";

import { QuickNavPopover } from "@/components/navbar-popover";
import { Navbar } from "@/components/navigation/navbar";
import { ChevronExpandY, Cloud } from "@unkey/icons";
import { useDeploymentBreadcrumbConfig } from "./use-deployment-breadcrumb-config";

export function DeploymentNavbar() {
const breadcrumbs = useDeploymentBreadcrumbConfig();

return (
<Navbar>
<Navbar.Breadcrumbs icon={<Cloud />}>
{breadcrumbs
.filter((breadcrumb) => breadcrumb.shouldRender)
.map((breadcrumb) => (
<Navbar.Breadcrumbs.Link
key={breadcrumb.id}
href={breadcrumb.href}
noop={breadcrumb.noop}
isIdentifier={breadcrumb.isIdentifier}
active={breadcrumb.active}
>
{breadcrumb.quickNavConfig ? (
<QuickNavPopover
items={breadcrumb.quickNavConfig.items}
activeItemId={breadcrumb.quickNavConfig.activeItemId}
shortcutKey={breadcrumb.quickNavConfig.shortcutKey}
>
<div className="flex items-center gap-1">
{breadcrumb.children}
<ChevronExpandY className="size-4" />
</div>
</QuickNavPopover>
) : (
breadcrumb.children
)}
</Navbar.Breadcrumbs.Link>
))}
</Navbar.Breadcrumbs>
</Navbar>
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
"use client";

import type { QuickNavItem } from "@/components/navbar-popover";
import type { Navbar } from "@/components/navigation/navbar";
import { shortenId } from "@/lib/shorten-id";
import { useParams, useSelectedLayoutSegments } from "next/navigation";
import { useMemo } from "react";
import type { ComponentPropsWithoutRef } from "react";

export type BreadcrumbItem = ComponentPropsWithoutRef<typeof Navbar.Breadcrumbs.Link> & {
/** Unique identifier for the breadcrumb item */
id: string;
/** Internal: determines if this breadcrumb should be rendered */
shouldRender: boolean;
/** Optional QuickNav dropdown configuration */
quickNavConfig?: {
items: QuickNavItem[];
activeItemId?: string;
shortcutKey?: string;
};
};

export function useDeploymentBreadcrumbConfig(): BreadcrumbItem[] {
const params = useParams();
const segments = useSelectedLayoutSegments();

const workspaceSlug = params.workspaceSlug as string;
const projectId = params.projectId as string;
const deploymentId = params.deploymentId as string;

// Detect current tab from segments
const currentTab = segments.includes("network")
? "network"
: segments.includes("runtime-logs")
? "runtime-logs"
: "overview";

return useMemo(() => {
const basePath = `/${workspaceSlug}/projects/${projectId}`;

// Deployment tabs for QuickNav
const deploymentTabs: QuickNavItem[] = [
{
id: "overview",
label: "Overview",
href: `${basePath}/deployments/${deploymentId}`,
},
{
id: "runtime-logs",
label: "Runtime Logs",
href: `${basePath}/deployments/${deploymentId}/runtime-logs`,
},
{
id: "network",
label: "Network",
href: `${basePath}/deployments/${deploymentId}/network`,
},
];

return [
{
id: "projects",
href: `/${workspaceSlug}/projects`,
children: "Projects",
shouldRender: true,
active: false,
isLast: false,
},
{
id: "project",
href: `${basePath}`,
children: projectId,
shouldRender: true,
active: false,
isLast: false,
},
{
id: "deployments",
href: `${basePath}/deployments`,
children: "Deployments",
shouldRender: true,
active: false,
isLast: false,
},
{
id: "deployment",
href: `${basePath}/deployments/${deploymentId}`,
children: shortenId(deploymentId),
isIdentifier: true,
shouldRender: true,
active: false,
isLast: false,
},
{
id: "deployment-tab",
href: "#",
noop: true,
active: true,
children:
currentTab === "overview"
? "Overview"
: currentTab === "runtime-logs"
? "Runtime Logs"
: "Network",
shouldRender: true,
isLast: true,
quickNavConfig: {
items: deploymentTabs,
activeItemId: currentTab,
shortcutKey: "T",
},
},
];
}, [workspaceSlug, projectId, deploymentId, currentTab]);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { DeploymentNavbar } from "./(overview)/navigations/deployment-navbar";

export default function DeploymentLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<div className="flex flex-col h-full">
<DeploymentNavbar />
<div className="flex-1 overflow-auto">{children}</div>
</div>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export function DeploymentNetworkView({
>
<TreeLayout
data={currentTree}
nodeSpacing={{ x: 10, y: 75 }}
nodeSpacing={{ x: 10, y: 100 }}
onNodeClick={isShowingSkeleton ? undefined : (node) => setSelectedNode(node)}
renderNode={(node, parent) => renderDeploymentNode(node, parent, deploymentId ?? undefined)}
renderConnection={(path, parent, child) => (
Expand Down
Loading
Loading