Skip to content

feat(graph): Add Obsidian-style interactive Graph View#744

Draft
Droyder7 wants to merge 12 commits into
refactoringhq:mainfrom
Droyder7:main
Draft

feat(graph): Add Obsidian-style interactive Graph View#744
Droyder7 wants to merge 12 commits into
refactoringhq:mainfrom
Droyder7:main

Conversation

@Droyder7

Copy link
Copy Markdown

Integrates a high-performance, Canvas-based interactive Graph View to visualize note connection topology.

This feature parses wikilink connections, dynamically maps connection degree to node sizing, renders soft glowing neon radial halos in
dark theme, supports fast title filtering, and handles instant page transitions on click or ghost note creation on demand.

Immersive Viewport Dashboard

Mounted a new 'Graph View' tab in the sidebar header top navigation utilizing the Phosphor ShareNetwork icon. Selecting it renders
the full-viewport graph canvas in place of the default note editor.

Theme-Aware Node Canvas Rendering

Implements custom nodeCanvasObject drawing that renders soft glowing neon radial halos matching individual note colors in dark mode
(shadowBlur: 14), and solid crisp borders in light mode. Unresolved/dangling wikilink targets are drawn as dotted/dashed gray circles
to clearly delineate notes that don't exist yet.

Responsive Dimensions & Layout Friction

Uses a ResizeObserver to dynamically size the canvas during sidebar toggles, and tunes D3 layout friction variables (d3AlphaDecay
and d3VelocityDecay) for a slow-settling visual simulation. Unrelated nodes and links dynamically dim to 0.15 opacity when hovering
over a note, keeping direct neighbors highlighted.

Single-Click Navigation & Ghost Creation

Single-clicking a note immediately selects it and switches the viewport selection to open the Editor. Single-clicking a ghost note pops
up a confirmation dialog before automatically triggering the note creation dialog.

Selection-Aware History Navigation

Wraps useAppNavigation's back and forward hooks to check and store sidebar filter state, ensuring that pressing the back/forward keys
in the header panel seamlessly navigates across Graph View transitions.

Screenshot:

image

Droyder7 and others added 12 commits May 24, 2026 22:37
When the graph view is active, it now renders as a standalone full-width
panel (`.app__graph-view`) instead of being nested inside the editor column.
This hides the note list column and its resize handle completely, granting
the canvas maximum viewport space and preventing layout constraints from
the standard note-list/editor split.
- Import and apply proper ForceGraphTypes in GraphView.tsx to replace unsafe 'any' typings
- Add getNodeId helper to safely resolve source/target node IDs
- Replace state-updating useEffect in GraphViewPanel.tsx with derived effectiveFocusNodeId using useMemo
 - Extract drawNodeLabel() helper from drawNode useCallback in GraphView.tsx,
   reducing cyclomatic complexity from 12 to 6 (limit is 8)
 - Add engines.eslint.exclude_paths for src/components/GraphView/** in
   .codacy.yaml to suppress 24 false-positive Qwik-framework alerts on React
   JSX (className and  are correct in React, not Qwik)
…ives

The className attribute on line 1767 of App.tsx is valid React JSX but
was flagged by Codacy's Qwik-targeted ESLint patterns. Extending the
engines.eslint.exclude_paths to cover App.tsx suppresses this alert.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Pass x, y as explicit params to drawNodeLabel() instead of using
  assertion' alert at GraphView.tsx L110

- Add opengrep and semgrep engine exclusions for src/components/GraphView/**
  in .codacy.yaml — the React className and Qwik $() false-positive alerts
  originate from Codacy's OpenGrep/Semgrep engine, not ESLint, so the
  previous engines.eslint.exclude_paths had no effect on them

- Remove src/App.tsx from per-engine exclusions (per requirement)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@riccardo-algorime

Copy link
Copy Markdown

is this gonna get merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants