diff --git a/web/src/components/ui/pills/KeyboardShortcutPills.tsx b/web/src/components/ui/pills/KeyboardShortcutPills.tsx
index 2fc8bc719..f78846c00 100644
--- a/web/src/components/ui/pills/KeyboardShortcutPills.tsx
+++ b/web/src/components/ui/pills/KeyboardShortcutPills.tsx
@@ -19,7 +19,7 @@ KeyboardShortcutPill.displayName = 'KeyboardShortcutPill';
const TooltipShortcut: React.FC<{ shortcut: string }> = ({ shortcut }) => {
return (
-
+
{shortcut}
);
diff --git a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricEditControllerHeader.tsx b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricEditControllerHeader.tsx
index 9c0249491..23ea15b9d 100644
--- a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricEditControllerHeader.tsx
+++ b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricEditControllerHeader.tsx
@@ -4,9 +4,18 @@ import { Button } from '@/components/ui/buttons';
import { Xmark } from '@/components/ui/icons';
import { useChatLayoutContextSelector } from '@/layouts/ChatLayout';
import { cn } from '@/lib/classMerge';
+import { AppTooltip } from '@/components/ui/tooltip';
+import { useHotkeys } from 'react-hotkeys-hook';
export const MetricEditControllerHeader: React.FC = React.memo(() => {
const closeSecondaryView = useChatLayoutContextSelector((x) => x.closeSecondaryView);
+ const selectedFileViewSecondary = useChatLayoutContextSelector(
+ (x) => x.selectedFileViewSecondary
+ );
+
+ useHotkeys('esc', () => closeSecondaryView(), {
+ enabled: !!selectedFileViewSecondary
+ });
return (
{
'px-4 py-2.5'
)}>
Edit chart
-
} />
+
+ } />
+
);
});