Browse Source

feat(ai): Add AI analytics sidebar item behind feature flag (#68189)

Initial sidebar + feature flag for AI analytics dashboard
colin-sentry 11 months ago
parent
commit
8bcb5b6188
2 changed files with 75 additions and 0 deletions
  1. 16 0
      static/app/components/sidebar/index.tsx
  2. 59 0
      static/app/icons/iconRobot.tsx

+ 16 - 0
static/app/components/sidebar/index.tsx

@@ -31,6 +31,7 @@ import {
   IconTelescope,
   IconTimer,
 } from 'sentry/icons';
+import {IconRobot} from 'sentry/icons/iconRobot';
 import {t} from 'sentry/locale';
 import ConfigStore from 'sentry/stores/configStore';
 import DemoWalkthroughStore from 'sentry/stores/demoWalkthroughStore';
@@ -379,6 +380,20 @@ function Sidebar() {
     />
   );
 
+  const aiAnalytics = hasOrganization && (
+    <Feature features="ai-analytics" organization={organization}>
+      <SidebarItem
+        {...sidebarItemProps}
+        icon={<IconRobot />}
+        label={t('AI Analytics')}
+        isAlpha
+        variant="short"
+        to={`/organizations/${organization.slug}/ai-analytics/`}
+        id="ai-analytics"
+      />
+    </Feature>
+  );
+
   const userFeedback = hasOrganization && (
     <Feature features="old-user-feedback" organization={organization}>
       <SidebarItem
@@ -544,6 +559,7 @@ function Sidebar() {
                 {profiling}
                 {metrics}
                 {replays}
+                {aiAnalytics}
                 {feedback}
                 {monitors}
                 {alerts}

+ 59 - 0
static/app/icons/iconRobot.tsx

@@ -0,0 +1,59 @@
+import {forwardRef} from 'react';
+
+import type {SVGIconProps} from './svgIcon';
+import {SvgIcon} from './svgIcon';
+
+const IconRobot = forwardRef<SVGSVGElement, SVGIconProps>((props, ref) => {
+  return (
+    <SvgIcon {...props} ref={ref}>
+      <path
+        d="M8 5.09091V2.18182H5.09091"
+        stroke="currentColor"
+        fill="none"
+        strokeWidth="1.45455"
+        strokeLinecap="round"
+        strokeLinejoin="round"
+      />
+      <path
+        d="M12.3636 5.09091H3.63636C2.83304 5.09091 2.18182 5.74213 2.18182 6.54545V12.3636C2.18182 13.167 2.83304 13.8182 3.63636 13.8182H12.3636C13.167 13.8182 13.8182 13.167 13.8182 12.3636V6.54545C13.8182 5.74213 13.167 5.09091 12.3636 5.09091Z"
+        stroke="currentColor"
+        strokeWidth="1.45455"
+        fill="none"
+        strokeLinecap="round"
+        strokeLinejoin="round"
+      />
+      <path
+        d="M0.727273 9.45455H2.18182"
+        stroke="currentColor"
+        strokeWidth="1.45455"
+        strokeLinecap="round"
+        strokeLinejoin="round"
+      />
+      <path
+        d="M13.8182 9.45455H15.2727"
+        stroke="currentColor"
+        strokeWidth="1.45455"
+        strokeLinecap="round"
+        strokeLinejoin="round"
+      />
+      <path
+        d="M10.1818 8.72727V10.1818"
+        stroke="currentColor"
+        strokeWidth="1.45455"
+        strokeLinecap="round"
+        strokeLinejoin="round"
+      />
+      <path
+        d="M5.81818 8.72727V10.1818"
+        stroke="currentColor"
+        strokeWidth="1.45455"
+        strokeLinecap="round"
+        strokeLinejoin="round"
+      />
+    </SvgIcon>
+  );
+});
+
+IconRobot.displayName = 'IconRobot';
+
+export {IconRobot};