diff --git a/js/src/components/lineage/PresetCheckRecommendation.tsx b/js/src/components/lineage/PresetCheckRecommendation.tsx index db34ffa9..f5d7cb95 100644 --- a/js/src/components/lineage/PresetCheckRecommendation.tsx +++ b/js/src/components/lineage/PresetCheckRecommendation.tsx @@ -22,17 +22,20 @@ import { select, SelectInput } from "@/lib/api/select"; import { useLineageGraphContext } from "@/lib/hooks/LineageGraphContext"; import { submitRunFromCheck } from "@/lib/api/runs"; import { useRecceActionContext } from "@/lib/hooks/RecceActionContext"; +import { sessionStorageKeys } from "@/lib/api/sessionStorageKeys"; +import { useRecceServerFlag } from "@/lib/hooks/useRecceServerFlag"; export const PresetCheckRecommendation = () => { const { lineageGraph } = useLineageGraphContext(); const { showRunId } = useRecceActionContext(); + const { data: flags } = useRecceServerFlag(); const queryClient = useQueryClient(); const [recommendCheckId, setRecommendCheckId] = useState(""); const [recommendCheckParam, setRecommendCheckParam] = useState(); const [showRecommendation, setShowRecommendation] = useState(false); const [affectedModels, setAffectedModels] = useState(); const { isOpen, onOpen, onClose } = useDisclosure(); - const recommendationKey = "recommendationClosed"; + const recommendationKey = sessionStorageKeys.recommendationIgnored; const { data: checks, status } = useQuery({ queryKey: cacheKeys.checks(), @@ -131,7 +134,7 @@ export const PresetCheckRecommendation = () => { } const ignored = sessionStorage.getItem(recommendationKey); - if (!ignored) { + if (!ignored && !flags?.single_env_onboarding) { setShowRecommendation(true); } }, [ @@ -141,6 +144,8 @@ export const PresetCheckRecommendation = () => { selectedModels, numNodes, lineageGraph, + recommendationKey, + flags, ]); const performPresetCheck = useCallback(async () => { diff --git a/js/src/lib/api/sessionStorageKeys.ts b/js/src/lib/api/sessionStorageKeys.ts new file mode 100644 index 00000000..8765ba7d --- /dev/null +++ b/js/src/lib/api/sessionStorageKeys.ts @@ -0,0 +1,5 @@ +const prefix = "recce"; + +export const sessionStorageKeys = { + recommendationIgnored: `${prefix}-recommendation-ignored`, +};