From 61c88f5abb7f78a0eb8cbc77c3a12b9e578ff027 Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 23 Jan 2026 11:27:53 -0500 Subject: [PATCH 01/11] add activatable status indicator --- packages/client/src/clients/guide/client.ts | 7 +++++ packages/client/src/clients/guide/index.ts | 6 +++- .../guide/components/Toolbar/V2/GuideRow.tsx | 31 +++++++++++++++++-- .../Toolbar/V2/GuidesListDisplaySelect.tsx | 8 ++--- .../guide/components/Toolbar/V2/V2.tsx | 7 +++-- .../Toolbar/V2/useInspectGuideClientStore.ts | 22 +++++++++++-- 6 files changed, 68 insertions(+), 13 deletions(-) diff --git a/packages/client/src/clients/guide/client.ts b/packages/client/src/clients/guide/client.ts index 742c073d8..e458b3d8c 100644 --- a/packages/client/src/clients/guide/client.ts +++ b/packages/client/src/clients/guide/client.ts @@ -217,6 +217,13 @@ const predicate = ( return false; } + return checkActivatable(guide, location); +}; + +export const checkActivatable = ( + guide: KnockGuide, + location: string | undefined, +) => { const url = location ? newUrl(location) : undefined; const urlRules = guide.activation_url_rules || []; diff --git a/packages/client/src/clients/guide/index.ts b/packages/client/src/clients/guide/index.ts index ddcb5e288..7d5519160 100644 --- a/packages/client/src/clients/guide/index.ts +++ b/packages/client/src/clients/guide/index.ts @@ -1,4 +1,8 @@ -export { KnockGuideClient, DEBUG_QUERY_PARAMS } from "./client"; +export { + KnockGuideClient, + DEBUG_QUERY_PARAMS, + checkActivatable, +} from "./client"; export type { KnockGuide, KnockGuideStep, diff --git a/packages/react/src/modules/guide/components/Toolbar/V2/GuideRow.tsx b/packages/react/src/modules/guide/components/Toolbar/V2/GuideRow.tsx index bc029e2c0..ac5c88600 100644 --- a/packages/react/src/modules/guide/components/Toolbar/V2/GuideRow.tsx +++ b/packages/react/src/modules/guide/components/Toolbar/V2/GuideRow.tsx @@ -1,9 +1,15 @@ import { Button } from "@telegraph/button"; -import { Stack } from "@telegraph/layout"; +import { Box, Stack } from "@telegraph/layout"; import { Tag } from "@telegraph/tag"; import { Tooltip } from "@telegraph/tooltip"; import { Text } from "@telegraph/typography"; -import { CheckCircle2, CircleDashed, Eye, UserCircle2 } from "lucide-react"; +import { + CheckCircle2, + CircleDashed, + Eye, + LocateFixed, + UserCircle2, +} from "lucide-react"; import * as React from "react"; import { GuideHoverCard } from "./GuideHoverCard"; @@ -43,6 +49,27 @@ export const GuideRow = ({ guide, orderIndex }: Props) => { + {guide.__typename === "Guide" && ( + + +