Graphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
TypeScript antigravity-skillsbusiness-knowledgeclaude-codeclaude-skillscodebase-analysiscodexcodex-skillsdeveloper-tools-ai-agentgemini-cli-skillskarpathy-llm-wikiknowledge-baseknowledge-graphmemoryopencode-skillspi-agentunderstandcodevibe-coding
fix: keyboard shortcuts bugs and add shortcut hint
Lum1104cd8cd0fb5c5c
diff --git a/understand-anything-plugin/packages/dashboard/src/App.tsx b/understand-anything-plugin/packages/dashboard/src/App.tsxindex 69619307..3f1f265a 100644--- a/understand-anything-plugin/packages/dashboard/src/App.tsx+++ b/understand-anything-plugin/packages/dashboard/src/App.tsx@@ -32,6 +32,7 @@ function App() {// Help{key: "?",+ shiftKey: true,description: "Show keyboard shortcuts",action: () => setShowKeyboardHelp((prev) => !prev),category: "General",@@ -43,14 +44,14 @@ function App() {action: () => {// Read from store at invocation time to avoid stale closuresconst state = useDashboardStore.getState();- if (showKeyboardHelp) {- setShowKeyboardHelp(false);- } else if (state.codeViewerOpen) {+ if (state.codeViewerOpen) {state.closeCodeViewer();} else if (state.selectedNodeId) {state.selectNode(null);} else if (state.tourActive) {state.stopTour();+ } else {+ setShowKeyboardHelp(false);}},category: "Navigation",@@ -109,11 +110,11 @@ function App() {category: "View",},],- [showKeyboardHelp]+ []);// Register keyboard shortcuts- useKeyboardShortcuts(shortcuts, !showKeyboardHelp);+ useKeyboardShortcuts(shortcuts);useEffect(() => {fetch("/knowledge-graph.json")@@ -219,8 +220,11 @@ function App() {{/* Main content: Graph + Sidebar */}<div className="flex-1 flex min-h-0 relative">{/* Graph area */}- <div className="flex-1 min-w-0 min-h-0">+ <div className="flex-1 min-w-0 min-h-0 relative"><GraphView />+ <div className="absolute top-3 right-3 text-sm text-text-muted/60 pointer-events-none select-none">+ Press <kbd className="kbd">?</kbd> for keyboard shortcuts+ </div></div>{/* Right sidebar */}diff --git a/understand-anything-plugin/packages/dashboard/src/hooks/useKeyboardShortcuts.ts b/understand-anything-plugin/packages/dashboard/src/hooks/useKeyboardShortcuts.tsindex a46d754b..fcf91e3e 100644--- a/understand-anything-plugin/packages/dashboard/src/hooks/useKeyboardShortcuts.ts+++ b/understand-anything-plugin/packages/dashboard/src/hooks/useKeyboardShortcuts.ts@@ -60,10 +60,12 @@ export function formatShortcutKey(shortcut: KeyboardShortcut): string {if (shortcut.ctrlKey || shortcut.metaKey) {keys.push(isMac ? "⌘" : "Ctrl");}- if (shortcut.shiftKey) keys.push("⇧");+ // Don't show ⇧ for keys that inherently require Shift (e.g. ?, !, @)+ const isShiftedPunctuation = shortcut.key.length === 1 && /[^a-zA-Z0-9]/.test(shortcut.key);+ if (shortcut.shiftKey && !isShiftedPunctuation) keys.push("⇧");if (shortcut.altKey) keys.push(isMac ? "⌥" : "Alt");- keys.push(shortcut.key.toUpperCase());+ keys.push(isShiftedPunctuation ? shortcut.key : shortcut.key.toUpperCase());return keys.join(" + ");}