q2 graph notebook: cockpit frontend + Rust binary#1
Merged
Conversation
Two design variants for the cockpit UI: - cockpit.css/js + index.html: Pure CSS Grid layout with custom force-directed graph simulation, sortable linked table, properties sidebar, notebook cell stack. Dark theme (#0a0e17), teal accents (#00bcd4), Inter + JetBrains Mono. - cockpit-tailwind.html: Tailwind-based single-file variant with 3-column layout (notebook sidebar, graph+table center, inspector right). Both implement: query bar with language auto-detection, interactive draggable graph nodes, linked selection (graph <-> table <-> properties), syntax- highlighted code cells (Gremlin/R/SPARQL), mini chart output, status bar. https://claude.ai/code/session_01LSbSrej6WdKum1zCxEHE8z
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Third design variant with 4-row, 3-column CSS Grid layout: situation panel (metrics, filters, example queries), center graph with force sim + panning/zoom, node intelligence sidebar with sparkline canvas, full-width result table, reactive cell strip. https://claude.ai/code/session_01LSbSrej6WdKum1zCxEHE8z
The q2 binary now includes `q2 notebook serve` and `q2 notebook render`:
Server (port 2718):
- GET / → cockpit frontend (placeholder)
- GET /health → {"status":"ok","engine":"lance-graph"}
- GET /mcp/sse → MCP over Server-Sent Events
- POST /mcp/message → MCP tool invocations (JSON-RPC 2.0)
MCP tools: cell_execute, cell_get, cells_list, cell_create,
cell_update, cell_delete, dag_get, notebook_save, notebook_load,
notebook_export
Language auto-detection:
- g.V() → gremlin, MATCH ( → cypher, PREFIX/SELECT ? → sparql
- %>%/<- → r, let/fn → rust, else → markdown
Publisher:
- q2 notebook render input.nb --format html → self-contained HTML
with dark cockpit theme, collapsible code cells, embedded tables
- q2 notebook render input.nb --format pdf → shells out to pandoc
Stub crates (6): notebook-runtime, notebook-query, notebook-kernel,
notebook-render, lance-graph, q2-ndarray. Each marked TODO for
replacement when real crates are transcoded.
https://claude.ai/code/session_01LSbSrej6WdKum1zCxEHE8z
AdaWorldAPI
pushed a commit
that referenced
this pull request
Jun 21, 2026
Replace the Phase 0 unimplemented!() bodies with the real impls: AttributionDataBuilder interns actors once and Arc::clone-s thereafter; AttributionMap::query_byte_range uses partition_point + a forward walk to pick the most-recent overlapping run; PreBuiltAttributionProvider:: build re-interns through the builder so transport JSON round-trips restore Arc<str> ptr-equality; format_supports_attribution matches FormatIdentifier::Html (covers html, q2-debug, extension HTML); from_config_value reads meta.attribution.identities into an IdentityMap with fresh Arc keys so Phase 2's merge can preserve provider keys on collision. Turns Phase 0 tests #1 + #2 (10 cases) green; the 8 regression pins stay green.
AdaWorldAPI
pushed a commit
that referenced
this pull request
Jun 24, 2026
The frontier-map's highest-leverage [G] probe (Dudzik-Veličković, GNNs are Dynamic Programmers, 2203.15544: message-passing = DP over a semiring), made executable. The diplotype→phenotype→recommendation chain `cpic reason` computes is a single semiring transitive closure (Floyd-Warshall) over the CPIC edge adjacency; swapping ONLY the semiring switches the reasoning mode on the SAME graph: Boolean→reachability, MinPlus→cheapest path, Nars→CPIC confidence (f=f1f2, c=f1f2c1c2), MaxTimes→most-likely path. Keystone (asserted + unit-tested): the Nars semiring closure reproduces reason.rs's deduction EXACTLY for CYP2C19 *2/*2 → clopidogrel — f=0.950, c=0.767, identical. Retrieval and reasoning are the same operation; the mode is the algebra, not the traversal. Edge truths read from the real CPIC recommendation classification + pair cpiclevel (same mapping as reason.rs). Self-contained Floyd-Warshall keeps cpic dep-light; in production this is a lance-graph GraphBLAS matrix walk at scale. 2 tests (the keystone identity + four-modes-one-graph). POC over published CPIC rules — NOT clinical decision support. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GJ4NVBSjq1w5h7RmTbVafb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
q2 notebook serve(port 2718) andq2 notebook rendersubcommandsWhat works
Architecture
Server endpoints (axum on :2718)
//health{"status":"ok","version":"0.1.0","engine":"lance-graph"}/mcp/sse/mcp/messageMCP tools
cell_execute,cell_get,cells_list,cell_create,cell_update,cell_delete,dag_get,notebook_save,notebook_load,notebook_exportLanguage auto-detection
g.V()→ gremlinMATCH (→ cypherPREFIX/SELECT ?→ sparql%>%/<-→ rlet/fn→ rustPublisher
q2 notebook render input.nb --format html→ self-contained HTML with dark theme, collapsible code, embedded tablesq2 notebook render input.nb --format pdf→ shells out to pandoc + wkhtmltopdfStub crates (under
crates/stubs/)Each marked
// TODO: replace when crate is transcoded:notebook-runtime— reactive cell DAG (Runtime, Cell, CellOutput, ExecutionState)notebook-query— language detection + query execution routingnotebook-kernel— R kernel protocol stubnotebook-render— graph/table/chart/scalar → HTMLlance-graph— graph storage + semiring algebraq2-ndarray— SIMD array kernelsFrontend prototypes (
cockpit-prototype/)index.html+cockpit.css+cockpit.js— CSS Grid, custom force simulation, 24-node demo graphcockpit-tailwind.html— Tailwind single-file, 3-column layoutcockpit-polished.html— Full cockpit with situation panel, sparkline canvas, reactive pulseTest plan
cargo build -p quartocompiles with zero errorsq2 notebook serve --port 2719starts and/healthreturns OKq2 notebook render --helpshows correct CLI interfacePOST /mcp/messagehttps://claude.ai/code/session_01LSbSrej6WdKum1zCxEHE8z