FE-1447: Emit layer facts and relations as structured data - #9264
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
PR SummaryMedium Risk Overview The generator copies those components (plus shared Hosts now need a React MDX pipeline for generated layer pages, not only authored diagram pages. The Starlight site already had Reviewed by Cursor Bugbot for commit 7092784. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 0c71119. Configure here.
0c71119 to
66ee918
Compare
66ee918 to
acbd14c
Compare
acbd14c to
3505eeb
Compare
3505eeb to
6327f97
Compare
6327f97 to
dea57a3
Compare
dea57a3 to
d7b5802
Compare
d7b5802 to
51e5fc9
Compare
51e5fc9 to
7092784
Compare

🌟 What is the purpose of this PR?
Generated layer pages baked their facts into MDX prose: the Package/Layer id/Files/Lines line, "Declared in", and the "Depends on" / "Depended on by" heading-plus-table blocks. A host could not restyle any of it. The pages now render components shipped in the bundle, which receive the same facts as structured props.
In stack #9280, FE-1443 (#9263) sits below and FE-1415 (#9265) above.
🔗 Related links
🔍 What does this change?
libs/@local/petrinaut-arch-docs:components/beside authored ones:LayerFactsrenders the Package / Layer id / Files / Lines grid with a Declared-in link. The role renders as the page's plain lead paragraph above it.LayerRelationsrenders both edge directions side by side, in one column under 640px, with import counts and package badges. A declared edge shows its protocol on a dashed label.LayerSourcerenders the file count and the source root, replacing the old "Source" heading and sentence.LayerLinksrenders a titled list of links: sub-layers, attached guides, and further reading.currentColorviacolor-mix, so both Starlight themes work without theme-specific rules.mdx.ts): pages import the components by page-relative path and pass props as JSON expressions, because a JSX string attribute cannot escape a"in a role. A page with no edges renders no relations section, andarchitecture.mdkeeps plain text.content/components/.Review fixes
import.meta.urlasset resolution to the tsconfig exclude.--arch-accentas the one fixed colour; everything else derives fromcurrentColor.Pre-Merge Checklist 🚀
🚢 Has this modified a publishable library?
This PR:
📜 Does this require a change to the docs?
The changes in this PR:
🕸️ Does this require a change to the Turbo Graph?
The changes in this PR:
🛡 What tests cover this?
mdx.test.ts: import-path depth per page, the structured props, declared-edge entries in the relations props, the element-level assertion for a page with no edges, and the removal of the old heading-plus-table sections.lint:arch-docsandturbo run build --filter @apps/petrinaut-docsprove the emitted MDX compiles and renders.❓ How to test this?
turbo run dev --filter @apps/petrinaut-docsarchitecture/python-bindings):LayerFactsreplaces the header prose,LayerRelationsshows both directions, and the declared edge toclirenders with its dashed protocol label.🤖 Generated with Claude Code