The schema is a level of the graph - #508
WaylandYang wants to merge 2 commits into
Conversation
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Signed-off-by: WaylandYang <wayland0916@gmail.com>
|
Follow-up commit from looking at it in the browser. Four things, three of them things I had left open or broken. A selected class now says what it is. The read-only panel the PR description called "left for the next cut" is here instead, because a schema level where selecting a class shows nothing is not worth looking at. The legend was on its own second row. I had pushed the embedded diagram's chrome down with a Two flexbox bites on the way: the slot with The legend swatches read as uneven line weights. They are all the same 2px, but they used the focus colours — inheritance at 95% white beside relations at 60% white. Two lines differing only in brightness read as "thick and thin", not "two kinds of edge". They are now four opaque colours at one weight, taken from each edge's resting colour, and the identity is carried by hue. The schema's edges were heavier than the instance level's.
|
|
Closing unmerged. The level switch is out: on the graph page, What the cut found out along the way is worth keeping, and lands separately in #511 — every one of those was a defect in the schema diagram whether or not it is ever embedded anywhere:
The read-only class panel and the #498 is revised rather than dropped: the ontology page keeps the diagram and gains the tables as a second view of the same page, switchable, with its rail intact. The switch that is heavy on the graph page is not heavy there — table and diagram are two drawings of one thing, not two datasets. |
Part of #497. Stacked on #499 — its shared canvas is what lets the schema diagram be mounted somewhere else.
The ontology is the contract the graph obeys (0012), and the interface showed the contract on one page and the data on another with one buried link between them. Three classes and four relations produced how many facts? had nowhere to be asked.
What lands
A two-position switch beside the search box,
InstancesandSchema, recorded in the URL as?level=schemaso a link carries it.Schema draws the ontology page's diagram. Not a copy:
OntologySchemaGraphwas already a controlled component, so the graph page mounts the same one. It gained a single optional prop,chromeTop, because embedded it has to let the host page's floating bar go first.The chrome follows the level. Gone at schema level: the time scrubber, the inference tower, the layout and camera towers, the type legend, the entity panel and the "showing N of M entities" read-out. A class has no interval, is not derived, and the schema diagram brings its own zoom tower and its own legend. The search box switches to searching classes; picking one brings it into view, the same path the ontology page's rail takes.
Two crossings, which are the point.
Only Person 172. It switches to the instance level with every other type hidden — through the existing type-visibility set, so the legend shows what was hidden and the existing "Show all" undoes it. No second filtering mechanism.Organizationon Sam Altman lands on?level=schema&cls=organizationwith that class selected and focused.Clicking a class selects it; it does not drill. The first version drilled on click, and the schema level was then unusable for what it exists for — one click and you were in the other level. Selecting shows the class's relations with everything else muted, and drilling is the explicit second step.
The class key, not its id, goes in the URL: a
GraphNodecarriestype_keyand no class id, and a key reads better in a shared link.Three bugs this shook out, all worth the comments they got
data.data; the schema level unmounts the container, and a ref appearing does not re-run an effect.leveljoins the dependency array.levelthatgoLevelhad just set. It now merges instead of replacing.z-20, above the canvas's own chrome.Verified in the browser
Against a copy of the benchmark base, 1415 entities and 916 classes: the switch both ways; the class search finding and focusing
Person;Only Person 172landing on an instance canvas of exactly the people, withShow all (915 hidden)offered; clickingOrganizationon an entity panel arriving at?level=schema&cls=organizationwith the class selected; and the ontology page unchanged.pnpm buildclean: style guard,tsc, vite.Left for the next cut
The schema level has no panel. Selecting a class shows its shape on the canvas and offers the drill, but not its definition, axioms or description — those live on the ontology page, and whether a read-only version belongs here is worth looking at rather than guessing. The drill's semantics — "only this class", which leaves sparse edges because a class's neighbours are hidden with everything else — is the other thing to look at with real eyes.
🤖 Generated with Claude Code