Repository navigation
feat(t27f_graph): draw the T27F graph view from spec_graph_view.t27 - #9
Merged
Merged
Conversation
New tool t27f_graph: every box and edge position, size and style comes from specs/t27f/spec_graph_view.t27 (gHashTag/t27#10059) running in t27f.wasm. Generated: spec_graph_view.zig/.mjs, t27f.wasm. Hand glue: server.mjs +27, export.zig +8/-2 (third module, dedupe over all earlier modules, quota). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Summary by t27-beesThis PR adds a new Worth a look
Read: 7 files, +1277 -11, the whole diff up to 60000 characters (the rest was not read). Head |
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.
What
A new tool,
t27f_graph. It draws the T27F graph view (gHashTag/t27specs/t27f/spec_graph_view.t27, landed by gHashTag/t27#10059, which closes gHashTag/t27#10034) as an SVG file and returns its path. This is the first host that drawsspec_graph_view.t27. Before this, its header said "no host draws this yet".Every box position, size, fill, stroke and dash, and every edge end, stroke and dash, comes from the spec's own
fx_*functions, running insidewasm/t27f.wasm. Every constant comes from the generatedwasm/spec_graph_view.mjs: backdrop, text colour, font size, and the kind and label names. The glue only writes SVG.Files
Generated on the Railway lab (t27c at gHashTag/t27 950631580, zig 0.16.0):
wasm/spec_graph_view.zig: fromt27c gen. It inlines thespec_graphandui_planitems the view uses.wasm/spec_graph_view.mjs: fromt27c gen-js.wasm/t27f.wasm: grew from 6095 to 16523 bytes. reel.zig and deck.zig regenerate byte-identical.Hand-written foreign glue. It is disclosed here because the owner's rule allows only the thinnest I/O glue:
server.mjs, +27 lines: 1 import, 1 comment line, and the 25-linet27f_graphtool, which loops over nodes and edges and writes<rect>,<line>and<text>.wasm/export.zig, +8/-2 lines: adds the third module and aseen()dedupe over every earlier module, where before onlymods[0]was checked. It also raises the comptime eval branch quota, which the walk over three modules needs.Docs:
wasm/BUILD(provenance, rebuild steps, sha256 table) andREADME.md(one tool row).Verification
node server.mjsJSON-RPCtools/call t27f_graph:host_entry_points_match_the_layoutasserts:Not claimed
SpecGraph, which the wasm export cannot pass. So boxes are labelled by kind, index, inference label and source line span, not by name.spec_graphfixtures can be drawn.🤖 Generated with Claude Code