con un clic
react
// React component patterns, hooks, naming conventions, and the query-language translation system for Graph Explorer.
// React component patterns, hooks, naming conventions, and the query-language translation system for Graph Explorer.
Testing standards, patterns, and utilities for Graph Explorer including Vitest, DbState, renderHookWithState, test data factories, SPARQL test helpers, and backward compatibility testing for persisted data.
Git workflow conventions for Graph Explorer. Use when making commits, creating branches, or discussing version control practices.
Handle management of any GitHub related tasks, including creating or modifying issues, publishing a branch as a pull requests (or PRs), or creating or modifying sub-issues or child issues.
Database connector and explorer patterns for Gremlin, openCypher, and SPARQL, including the query template tag and escapeString usage.
Graph Explorer product overview including supported graph types, query languages, databases, key features, and high-level architecture.
Schema storage and discovery in Graph Explorer, including SchemaStorageModel persistence, edge connections, incremental schema growth, and related Jotai atoms.
| name | react |
| description | React component patterns, hooks, naming conventions, and the query-language translation system for Graph Explorer. |
| tools | ["fs_read","code","read","write","grep","glob","web_search","web_fetch"] |
useMemo, useCallback, and React.memo are unnecessary in most cases and should be avoided unless profiling shows a specific needsrc/modules/ contain all related components, hooks, and utilitiesGraphViewer.tsx)use prefix (e.g., useGraphData.ts)The translation system is not used for locale/language translations. Instead, it swaps UI labels based on the active connection's query language. Each query language (Gremlin, openCypher, SPARQL) has its own JSON file in src/hooks/translations/ that maps keys to display strings (e.g., "node-type" → "Node Label" in Gremlin vs "Class" in SPARQL).
Key files:
src/hooks/useTranslations.ts — useTranslations() hook returns a t function scoped to the current query enginesrc/hooks/translations/gremlin-translations.jsonsrc/hooks/translations/openCypher-translations.jsonsrc/hooks/translations/sparql-translations.jsonUsage:
const t = useTranslations();
// t("node-type") → "Node Label" (Gremlin) or "Class" (SPARQL)
Key naming conventions:
node-type, edge-connections)node-expand.no-selection-title)