Repository navigation
Graph: use Curiosity Engine's viewer only (0.14.0) - #16
Merged
Merged
Conversation
Drop Switchbay's built-in Graph viewer from the PWA. The Graph tab, the
wiki page list and the Zen graph now mount Curiosity Engine's own viewer
through /embed/ce (CEEmbed.create, shared sidebar + canvas session).
- GET /api/settings reports ce_graph {installed, has_wiki}; without CE
the Graph tab is hidden and graph shortcuts fall back to the Editor,
with no wiki a placeholder is shown. Files uploader, RAG, Agents and
Library do not depend on CE.
- proxied_skill_embeds now only picks the Agents surface (okstratr
observer vs built-in dashboard); Graph ignores it. Settings copy
renamed "Agents: okstratr observer". No settings migration needed.
- Host shims on the CE embed: page HTML sanitized before CE's modal
renders it; KaTeX, table -> Sheet/Plot and slideshow in CE's modal;
CE split panel routed to /api/workspaces/split; Procedure/Execution
label-type rows; in-place Atlas/Classic switch (no app reload);
sidebar + keeps opening UploadVaultDialog (/api/upload-vault).
- Keep the {{WORKSPACE}} sidebar-header substitution; factor it into
ceSidebarHeader.ts with node tests and an e2e check that the header
shows the workspace name, never the raw placeholder.
- Remove GraphTab, CurationReplay, WikiPane, the fork's edit.js and
sidebar.js, and their e2e specs. The remaining fork under
widgets/graph is kept only for the VS Code graph webview.
- Docs: architecture says Graph comes from CE; notices updated.
- Bump to 0.14.0.
Signed-off-by: benjsmith <benjamincharlessmith@gmail.com>
A workspace edited while another was active came back with its old Graph, because the cached bundle was served as is on retarget. Treat the bundle as ready only when it is at least as new as wiki/, and count directory mtimes so deleting or renaming a page triggers a rebuild. Signed-off-by: benjsmith <benjamincharlessmith@gmail.com>
- On files_changed, wait for CE's data refresh before remounting the canvas, re-render the page list and update the counts (the canvas used to remount on the old data). The page list refreshes while Graph is closed too. - Wait for the CE viewer to report healthy before loading the embed and retry a load that raced a restart; failed script tags are dropped so the retry loads them again, and the fetch shim is released. - Make CE's Sidebar.setActive/setSearchHits safe when the page list isn't mounted (Zen), so the node focus after #page= still runs. Signed-off-by: benjsmith <benjamincharlessmith@gmail.com>
Owner
Author
Parity gateEvery feature of the old built-in Graph was checked through Curiosity Engine's embedded viewer. The setup was a separate Switch Bay instance with a throwaway home, CE v1.9.2, the ml-walkthrough sample (231 pages, 622 links) and a second workspace. Results are for head
All 27 checks passed. Three gaps showed up during the check and are fixed in this PR:
Separately, Zen no longer logs an error when a page is picked. Not covered here: the VS Code extension's graph view still uses Switch Bay's own copy of the viewer, kept on purpose. It is built in CI. |
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.
Switchbay drops its built-in Graph viewer and uses Curiosity Engine's viewer only (via
/embed/ce,CEEmbed.create).What changes
CeEmbedSession.GET /api/settings→ce_graph: {installed, has_wiki}. If CE isn't installed, the Graph tab is hidden and graph shortcuts fall back to the Editor. If there's nowiki/yet, the Graph tab shows a placeholder. The Files uploader (/api/upload-vault+ UploadVaultDialog), RAG, Agents (okstratr) and Library don't depend on CE.proxied_skill_embedsis kept, because it still chooses okstratr observer vs the built-in Agents dashboard. Graph ignores it now. The UI label is now "Agents: okstratr observer". The key is unchanged, so no migration is needed.ceHostBridge.ts,ceEmbedShell.html,CeAtlasEmbed.tsx):body_htmlraw, so before this an<img onerror>in a wiki page ran on the daemon origin./api/workspaces/split.+still opens UploadVaultDialog.{{WORKSPACE}}header substitution is kept, factored intoceSidebarHeader.ts.GraphTab.tsx,CurationReplay.tsx,sidebar/WikiPane.tsxstatic/edit.jsandstatic/sidebar.jsgraph-search,atlas-search,atlas-select,minimap-zoompalette.css.frontend/src/widgets/graph/(graph.js,modal.js,subgraph.js,atlas.ts,init.ts,ce-graph.css, …). The VS Code extension's graph webview (src/webview-graph.ts,build:webview) still uses it, and the PWA no longer imports it. Its MIT notice stays.Tests
tests/unit/test_ce_graph_availability.py(3 tests). Thetest_upload_vault.pyandtest_procedure_execution_palette.pytests were updated.ceSidebarHeader.test.ts(5),ceHostBridge.test.ts(4), plus the existingembedMount.test.ts: 21/21.tests/unit/test_ce_bundle_freshness.py(4): the Graph is rebuilt for a workspace that changed while inactive, or that lost a page.graph-ce-embed.spec.ts(3) against the mock backend. It checks that:{{WORKSPACE}}.+opens the upload dialog..github/workflows.Parity gate
See the comment below.