Repository navigation
feat: self-contained HTML page of a space's map views - #36
Merged
Merged
Conversation
mindsocket
commented
Nov 13, 2026
A page host (src/page) shows the snapshots carried inline in its page in the shared Viewer. scripts/build-page.ts bundles it with React and inlines it, with the CSS, into the template dist/page.html, so a page opens offline. fillPage writes a title and snapshots into the template, escaping `<` so data can't end the script element. snapshotOf snapshots a space from a context and an already assembled (e.g. filtered) graph; exportSnapshot now uses it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019XphpeFwEYm8K11SoT9ewz
…architecture notes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019XphpeFwEYm8K11SoT9ewz
mindsocket
force-pushed
the
claude/project-thread-tmn7yk
branch
from
November 13, 2026 03:07
81e65ab to
567e16d
Compare
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.
Requested by Rog · project thread
This is slice 2 of the HTML render plugin. It adds a single HTML file that shows a space's map views in the shared
Viewerand opens offline. Thesctx-map-viewsplugin package will be a thin wrapper over it.Changes
src/page/main.tsx). Reads the snapshots from an inline<script type="application/json" id="sctx-snapshots">element and renders them inViewer. If there are none, it shows a message.scripts/build-page.ts. Bundles the page host and React withBun.build, then inlines the bundle and the CSS into the templatedist/page.html.bun run buildnow writes that file.fillPage(template, snapshots, title)(src/node/page.ts). Writes the title, HTML-escaped, and the snapshots into the template. The snapshot JSON has<escaped, so no string in the data can end the script element. It throws if either slot isn't present exactly once.docs/architecture.mdandAGENTS.mdare updated to match.There is no change to the public exports. The plugin package will bundle these modules from the workspace at build time.
Verification
bun test,bun run typecheckandbun run lintpass. New tests cover the escaping and the check that each slot appears once.launch-playbooksample into it (457 KB) and loaded the file in Playwright with the network offline. It made no network requests, drew 48 cards and 44 edges, opened the side panel on click, and logged no console errors. The sample has no map view definitions of its own, so this check used the bundledstrategy-tree.The branch also carries a merge of the previous slice's branch head. Its tree is identical to
main; I merged it to avoid a force push.🤖 Generated with Claude Code
https://claude.ai/code/session_019XphpeFwEYm8K11SoT9ewz