Imported from k3nnethfrancis/exograph (
apps/desktop/src/renderer/src/AGENTS.md). Install upstream withnpx skills add k3nnethfrancis/exograph --skill src. Copyright stays with the author.
Desktop renderer map
This directory owns rendered interaction, local state, and presentation. It
never owns filesystem/process access or a second version of core domain rules;
use window.exograph through preload/shared API types.
Start with the owner
App.tsxcomposes the shell. It coordinates features but should not absorb a feature state machine or deterministic transform.- Canvas document opening, focus, graph return state, and path remapping live
in
hooks/useCanvasDocumentNavigation.ts; focused pane selection is the sole current-document authority. Testhooks/useCanvasDocumentNavigation.test.tsandlatestPaneNavigation.test.ts. - Invocation review queue, hydration, accept/reject, and workspace-race guards
live in
hooks/useInvocationReviewController.tswithinvocationReviewQueue.ts. Identity must change during render when a new Workspace is rendered; do not wait for a passive effect to release an older request. Testhooks/useInvocationReviewController.test.tsandinvocationReviewQueue.test.ts. - Markdown live preview's only public compatibility import is the two-line
components/markdownLivePreview.tsadapter. Its private command, metadata, widget, and decoration owners live undercomponents/markdown-live-preview/; testcomponents/markdown-live-preview/index.test.tsand../../../tests/e2e/markdown-rules.spec.ts. - Pane topology is
hooks/usePaneTree.tspluspaneTreeSelectors.ts; keep pure tree transforms free of React and preload calls. - Graph scene/layout/interaction is owned by
graphSceneFoundation.ts,graphLayoutSimulation.ts,graphInteraction.ts, and renderer hosts. Read../../../../../docs/architecture.mdbefore changing a graph layer.
Non-ownership and invariants
../../shared/api.tsis the one desktop aggregate seam for main, preload, and renderer API types. Do not duplicate shared IPC definitions in feature files.- Do not add Node or Electron imports to renderer code.
- A pane's focus is not the same as historical navigation context. Preserve that distinction when adding graph/editor behavior.
- Keep document editing and navigation synchronous enough for the rendered frame; move indexing, loading, and non-interactive work off the hot path.
- Do not turn the markdown adapter into a second implementation or introduce private-folder imports from outside its owning feature.
Focused gates
pnpm --filter @exograph/desktop exec vitest run src/renderer/src/hooks/useCanvasDocumentNavigation.test.ts
pnpm --filter @exograph/desktop exec vitest run src/renderer/src/hooks/useInvocationReviewController.test.ts src/renderer/src/invocationReviewQueue.test.ts
pnpm --filter @exograph/desktop exec vitest run src/renderer/src/components/markdown-live-preview/index.test.ts
pnpm --filter @exograph/desktop exec vitest run src/renderer/src/renderer-authority-boundary.test.ts
pnpm --filter @exograph/desktop exec playwright test tests/e2e/markdown-rules.spec.ts
pnpm --filter @exograph/desktop typecheck
Use the real Electron renderer for UI/terminal changes. A browser-only route
does not provide window.exograph and cannot prove IPC behavior.