Skip to content

feat(examples): add interactive GPU-native luGraph explorer - #2954

Open
ibgreen-openai wants to merge 3 commits into
masterfrom
codex/lugraph-interactive-explorer
Open

feat(examples): add interactive GPU-native luGraph explorer#2954
ibgreen-openai wants to merge 3 commits into
masterfrom
codex/lugraph-interactive-explorer

Conversation

@ibgreen-openai

@ibgreen-openai ibgreen-openai commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Goals

  • Ship a real, browser-native graph explorer that composes every luGraph primitive without introducing a new workspace, dependency, or root-package export.
  • Document the optional @luma.gl/experimental/lugraph API, ownership contracts, traversal semantics, and website discovery.

Changes

  • Add a deterministic four-community, 128-vertex graph with preserved nonempty/empty/nonempty edge chunks, high-degree hubs, bridge edges, and an isolated vertex.
  • Build forward/reverse CSR, degrees, weak components, and PageRank in a one-time GPU command graph; execute progressive force layout and bounded neighborhood highlighting in a reusable frame graph.
  • Draw original GPU edge batches, bind layout coordinates directly as instanced vertex attributes, size nodes from PageRank, and color them from GPU component labels.
  • Reuse integer GPU picking and an asynchronous readback ring only for explicitly requested one-pixel selection; support dragging, pinning, zoom/pan, neighborhood depth, and deterministic reset.
  • Add a complete embedded luGraph API guide, gallery route/sidebar/docs tabs, compliant WebGPU-only metadata, and an existing network-themed thumbnail.
  • Test real Chromium/WebGPU rendering, graph analytics, force pinning, BFS highlighting, and stable integer picking, including a deterministic 320×240 shared-canvas regression.

Verification

  • nvm use: passed; Node v22.22.1.
  • yarn install: attempted, but the configured registry denies unpublished/uncached dev-tools dependencies with HTTP 403. Used an isolated APFS copy-on-write clone of an existing compatible dependency tree and ignored Yarn state; no dependency or lockfile changes.
  • yarn lint fix: passed; 1,557 files checked.
  • yarn build: passed after the final picking regression fix.
  • Focused Node explorer/catalog tests: 18 passed.
  • Focused real Chromium/WebGPU explorer integration: 2 passed, including an enlarged 320×240 canvas.
  • Complete yarn test: 892 Node tests passed, 1 skipped; 1,674 real-browser/WebGPU tests passed, 25 skipped.
  • yarn website:build: passed.
  • (cd website && yarn build): passed.
  • yarn examples:typecheck: passed across 46 example workspaces.
  • yarn bundle-size: all seven bundle ceilings passed.

Risks / follow-up

  • The example intentionally limits exact O(V² + E) force layout to 128 vertices; the stacked spatial-acceleration PR adds an explicitly approximate grid-monopole option.
  • No per-frame graph readback or implicit source-buffer packing occurs; only requested picking reads one pixel.

@ibgreen-openai
ibgreen-openai marked this pull request as ready for review August 5, 2026 02:19

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 75cd0009f9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +727 to +730
this.getVectorBuffer(this.pinned).write(
Uint32Array.of(1),
this.selectedVertex * UINT32_BYTE_LENGTH
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Wait for pick result before dragging nodes

When a user presses and drags a different node, the pick requested on pointerdown is still asynchronous, so selectedVertex can still be the previous selection (or the initial vertex 0) when pointermove runs. In that case this write pins the old vertex and the following position/velocity writes move it, so quick click-dragging a newly targeted node corrupts the wrong node's layout state; defer drag writes until the pick resolves or track the vertex being dragged separately.

Useful? React with 👍 / 👎.

@ibgreen-openai
ibgreen-openai force-pushed the codex/lugraph-force-layout branch 2 times, most recently from 15de864 to fc6e621 Compare August 7, 2026 00:36
Base automatically changed from codex/lugraph-force-layout to master August 7, 2026 00:43
@ibgreen-openai
ibgreen-openai force-pushed the codex/lugraph-interactive-explorer branch from 5c18358 to 8be314c Compare August 7, 2026 01:03
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