Skip to content

Fix issue 19: extension filter and isolated nodes#20

Open
adsharma wants to merge 3 commits into
mainfrom
fix/issue-19-extension-filter-and-isolated-nodes
Open

Fix issue 19: extension filter and isolated nodes#20
adsharma wants to merge 3 commits into
mainfrom
fix/issue-19-extension-filter-and-isolated-nodes

Conversation

@adsharma

Copy link
Copy Markdown
Contributor

Fixes #1 and #3 from issue #19.

Issue 1 — Extension whitelist rejects valid databases

Replaced the hard-coded .lbdb extension whitelist in three places (scan_for_databases, database_info_from_path, get_directories) with a fast magic-byte check (is_lbug_file_fast) that reads the first 4 bytes and validates against the engine's LBUG magic (confirmed from storage_version_info.h). This makes .lbug, .lbdb, .ldb, and any other convention work — the engine already validates by magic bytes in Database::new().

Issue 3 — Isolated nodes silently dropped from graph view

collect_edge_graph now unconditionally runs MATCH (n) WHERE NOT (n)--() RETURN n after the edge query and merges any isolated (edgeless) nodes into the result set. This prevents an empty graph rendering for databases that have nodes but no relationships.

Build fix

Updated the prebuilt liblbug from v0.17.0 to v0.18.2 to match the Cargo.toml dependency, and bumped the lbug version from 0.18.1 to 0.18.3 to resolve the C++ compilation error in lbug_connection_create_arrow_rel_table_csr.

Issue 1: Replace .lbdb extension whitelist with magic-byte validation
- Add is_lbug_file_fast() helper that reads the first 4 bytes and checks
  for the LBUG magic (b"LBUG") confirmed from storage_version_info.h
- scan_for_databases: use magic bytes instead of extension filter
- database_info_from_path: remove extension check entirely
- get_directories: use magic bytes for file browser filtering
- Lets .lbug, .lbdb, .ldb, and any other convention work

Issue 3: Always fetch isolated (edgeless) nodes in collect_edge_graph
- Run MATCH (n) WHERE NOT (n)--() RETURN n after the edge query
- Merge any isolated nodes into the node set regardless of edge results
- Prevents empty graph rendering for databases with only isolated nodes
@adsharma
adsharma force-pushed the fix/issue-19-extension-filter-and-isolated-nodes branch from e4ab0a2 to 89c0943 Compare July 21, 2026 22:48
adsharma added 2 commits July 21, 2026 15:52
Release builds (cargo tauri build) were not passing --features=icebug-analytics,
so Leiden clustering and LLM cluster-naming were unavailable at runtime.
Adding it to the default features list ensures both dev and release builds
include analytics support.
macOS: use brew extract --version=24.0.0 to create a versioned formula
and install apache-arrow@24.0.0 (the version icebug 12.9 was linked
against, providing libarrow.2400.dylib).

Linux: add Apache Arrow apt repository and install libarrow-dev
alongside existing system dependencies.
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.

Image build on Linux is broken

1 participant