Repository navigation
feat(navigator-ui): the Vocabulary tab (M19b) - #32
Open
jgrodziski wants to merge 11 commits into
Open
jgrodziski wants to merge 11 commits into
jgrodziski wants to merge 11 commits into
Conversation
The artifact folds what a name says into every scope the entity belongs to; the carriers lookup will keep it per entity. Both now read through reading.ts (the split, the class, the role's weight, the qualifier), so a carrier's share is exactly what the row counted. Snapshots unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
vocabularyCarriers(graph, artifact, options) reads every kept entity once and answers which names of a stored scope carry a term, each with what it added to the row. A row is the sum of its carriers: a property over every term of every scope of the six fixtures. A type or module carries its id, a member the owner a page reveals it in; an artifact counted under other weights, list or view is refused. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codegraph/vocabulary/cloud is cloud.ts alone, built as its own entry: a page can run the layout as a value without the analyzer, core, zod and the SQLite loader behind the package's index. A test keeps cloud.ts's imports type-only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
codegraph serve builds vocabulary.json from the same graph, view and name as the navigator and the city, and serves it at /vocabulary.json. /carriers.json?term=…[&scope=…][&class=…][&limit=…] answers which names of a stored scope carry a word, from the model the server holds: 404 for an unknown scope or term, 400 for a request it cannot ask or a text the scope speaks as two terms. The index is built at the first answerable request, and the graph is let go then. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The daemon's job writes vocabulary.json beside navigator.json and city.json and serves it under the token. A project directory without one, built before it existed, is rebuilt rather than reused. The daemon holds no model between jobs, so /carriers.json is a 404 there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The sixth tab: the words of the selected scope's names, the corpus until a module or a type is selected (a member shows its type), as a cloud and a table. The cloud is @codegraph/vocabulary/cloud's layout measured with the page's monospace face; size is weight, colour the class alone, and a legend states what was counted. Class chips, a top-N slider, the scope chain to step up. A word asks carriers.json for its names, and each reveals its node in Navigate; with no such route the tab says so. The artifact kind, the carriers kind and the class list are literals pinned to the package's; the package is imported for types only, its ./cloud entry as the one value. The Vite dev server serves VOCABULARY_JSON as it does NAVIGATOR_JSON. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CLAUDE.md's package map, docs/cli.md's serve section and the website's serve, vocabulary, vocabulary.json and environment pages: the sixth tab, the third artifact, the carriers answer and its statuses, the daemon without a carriers route, VOCABULARY_JSON for the dev server. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
codegraph | 67ae45d | Commit Preview URL Branch Preview URL |
Oct 27 2026, 03:05 PM |
From feat/m19b-vocabulary-cloud. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jgrodziski
pushed a commit
that referenced
this pull request
Oct 27, 2026
The closure property timed out on CI (5.07 s on #32, 5.2 s on #28, 1.7 to 3.8 s on the runs between). The cost was the check, not the build: over 100 sampled corpora, building took 17 ms and expectClosed 279 ms, an `expect` per row of every scope. The same checks now run in plain code, collect every breach, and assert once that there is none; a failure lists them all. The property drops from about 320 ms to 34 ms locally. Doctoring a real artifact 34 ways, one breach each, both the old and the new check fail every time. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From feat/m19b-vocabulary-cloud. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From feat/m19b-vocabulary-cloud. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Second step of milestone M19b in PLAN.md §20 (word cloud / glossary, #6). Stacked on #31 (itself on #30, #29, #28, #27 and #26): review those first; this PR's diff is the eight commits after #31.
It adds the navigator's Vocabulary tab and the two server routes behind it:
/vocabulary.json, the artifact, and/carriers.json, a lookup of the names that carry a word.The carriers (
carriers.ts)aggregate.tsintoreading.ts, so the artifact and the carriers read a name the same way. The artifact's snapshots are unchanged.id. A method, field or parameter carries anownerinstead (its type, else its module), as in the navigator, which has no node for it.scopemeans the corpus.limitdefaults to 200 andtotalalways counts them all. A word that two languages classify differently isambiguous, and the answer lists the classes to pick from withclass.On the Java fixture,
orderat the corpus has 12 carriers of total weight 40, which matches the hand count in the fixture README.The routes (
codegraph serve)/vocabulary.jsonis built from the same model, view and name as the navigator and the city, so a scope's id is the navigator node's id./carriers.json?term=…[&class=…][&scope=…][&limit=…]answers 200 when found, 400 for a bad request or an ambiguous word, and 404 for an unknown scope or word. Bad parameters are refused before anything is built.vocabulary.jsonbeside the navigator and the city, and rebuilds the page when one is missing. It has no/carriers.json, because it keeps no model between jobs (it serves no explanations either). The tab shows the counts there and says why the names are missing.The tab (
navigator-ui)--svg. It comes through a new@codegraph/vocabulary/cloudentry,cloud.tsalone, which imports nothing. The guard test allows that one specifier and keeps the package's index types-only for the page; the page's constants are restated and pinned to the package's. The built bundle contains none of the Node pipeline.measureTextin its monospace face.Worth a look in review:
orderhas 3,303; the tab says "the 200 heaviest of 3,303".Verification
pnpm -r buildandpnpm -r typecheckgreen; eslint clean on every changed file;pnpm run gen:schemasleavesschemas/unchanged; the Hugo site builds.node:sqlitewarning test noted on feat(core): language lexicons on profiles (M19a) #26.order item customer offer product…, andProductImplreadsproduct category sale sku parent.catalog.domainwithproductpicked lists 239 carriers, and clicking a parameter among them openedCategoryin Navigate../build.sh --ts --sea) serves both new routes, and its smoke checks pass.PLAN §20.2 records the carriers and the tab as built; §20.4's serve and tab items are checked.
Part of #6.
🤖 Generated with Claude Code