Skip to content

fix(ui): the workbench audit — the graph survives scale, choudoufu edges and words, ⌘K by address, and the license (#393, #394) - #407

Merged
lex00 merged 1 commit into
mainfrom
feat/audit-393
Sep 10, 2026
Merged

fix(ui): the workbench audit — the graph survives scale, choudoufu edges and words, ⌘K by address, and the license (#393, #394)#407
lex00 merged 1 commit into
mainfrom
feat/audit-393

Conversation

@lex00

@lex00 lex00 commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Supersedes #395, which GitHub closed when its base branch was deleted on #392's merge; same branch, same content, now one commit on main.

Closes #393, #394. Stacked on #392 (the workbench); every measurement below was taken on the workbench entries it added.

The audit's headline was that the graph did not survive scale: terralith-4, 301 choudoufu resources, rendered as a 144,010 × 316 strip with nothing clickable. It is now a 7,660 × 5,162 picture with 266 edges, module sub-boxes and a count badge, and ⌘K lands on any address.

What changed

Layout at scale (src/edgeless.ts, src/render.ts)

  • An edgeless box wraps its cards into rows through layout-only chains that never reach the returned IR or the SVG; a box with edges packs its connected components instead of letting dagre string them out, and a far-off-aspect component (a 40-way star) wraps into a grid. Boxes under 4:1 are untouched, so every existing picture is unchanged.
  • One sub-box per module.<name>[...] instance inside a choudoufu member, drawn from where the cards landed, ids stable.
  • Count badges on every member box (301 resources · 84 bound · 85 unowned · 132 neutral), and a collapse=1 lens that folds a box over 40 cards into one summary card; a palette command toggles it.

Edges (src/choudoufu-refs.ts) — a choudoufu member's read also runs the terraform lexicon over the same directory when it is resolvable, and joins its reference edges onto the roster by address, module instance by module instance. count/for_each pairs join key-to-key when both ends expand over the same keys, falling back to the full product otherwise, and every such edge is marked inferred. Without the lexicon the note names the install line instead of claiming nothing references anything.

Search — ⌘K matches node ids and addresses from the painted graph, Enter selects the card and pans the viewBox onto it. Works in a static export.

Words and cards — the legend, the statusbar and the Model tab speak choudoufu's words (bound / unowned / pending / not observed) on a choudoufu estate, derived from the member kinds and carried on the overlay meta; a mixed estate keeps chant's words and says so. A card is painted with its address alone and the rows the box does not already carry (owned by: stays; rung: only when it is not the common one); ids are untouched, the display id is restored on the finished SVG, and a label two cards would share is used for neither. The UNOWNED inspect leads with the two adopt tags as one copyable line; choudoufu 0.16's JSON carries no adoption command, so behold composes none.

Boot, zoom, notes, bugs — a non-chant estate boots on resources; runtime is offered only where a member could have runtime children; /api/resources no longer 500s on a non-chant estate; "estate of 1 project"; the roots note survives the logical zoom, has a short form for the strip and the full text on a tooltip and in the Model tab; waterpark's empty member box is gone (the root boxes take the member's name when the estate has more than one member); a data-URI favicon stops the 404 every load fetched.

License (#394) — Apache-2.0 to match chant: LICENSE, the package.json field, LICENSE + THIRD_PARTY.md + licenses/ in the shipped files (asserted by test), and behold export copies the notices into every bundle. Republishing is a release step.

Numbers

estate before after
terralith-4, detail 2, env live 144,010 × 316, 0 edges 7,660 × 5,162, 266 edges, 3 boxes
terralith-4, lexicon absent same strip 8,186 × 3,436, 0 edges, note names the install line
waterpark, detail 2 15,833 × 1,164 3,536 × 3,138
waterpark, detail 3 60,230 × 1,404 7,142 × 6,974
choudoufu-workbench, env live 9,564 × 520 2,890 × 2,468, whole estate on one screen

bash e2e/workbench-e2e.sh on the author's machine, on this branch: 8 entries green, 3 skipped (the two chant examples have no node_modules and an in-place entry is never installed; fountain-ops is excluded by name), 499s, no scratch container left. terralith-4: 301 nodes, 266 edges, 1.58:1 at detail 2, badged, collapses to one card; terralith-4-adopt: 85 unowned before the by-hand live-import, 301 bound after; the cohorts and the workbench now carry 1 to 51 edges each; waterpark untouched.

Built how

Five Opus agents in worktrees off this branch, merged by hand in two waves; the three merge commits carry the reconciliation (one word for the "directory is its own member" shape, bands read off real ids, footprints measured with the face overrides). just check and npm run smoke:ui green at every merge.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DoXg2GDWwXJRPQo76t9Nrq

…ges and words, ⌘K by address, and the license (#393, #394)

The audit's fixes as one commit on main. Layout at scale (an edgeless box wraps its cards; a box with edges packs its components; module sub-boxes; count badges and a collapse lens), intra-estate edges for a choudoufu member from the terraform lexicon, ⌘K by address, choudoufu's own words in the legend, cards that say what their box does not, the UNOWNED inspect leading with the adopt tags, boot on resources, runtime only where it applies, no 500 on /api/resources, the roots note everywhere it belongs, and Apache-2.0 declared and shipped with the notices carried by export. PR #395 has the milestone-by-milestone account.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DoXg2GDWwXJRPQo76t9Nrq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

workbench audit: the graph does not survive scale, and what every zoom gets wrong on a choudoufu or Terraform estate (#386)

1 participant