Skip to content

refactor: move contracts under Build > API, merge manuals into guides#121

Open
mod wants to merge 2 commits intomasterfrom
feat/wplink
Open

refactor: move contracts under Build > API, merge manuals into guides#121
mod wants to merge 2 commits intomasterfrom
feat/wplink

Conversation

@mod
Copy link
Contributor

@mod mod commented Mar 6, 2026

  • Move docs/contracts/ to docs/build/api/contracts/ with Deployed Addresses as the section index (skip vendor README)
  • Merge docs/manuals/ into docs/guides/manuals/
  • Remove Contracts and Manuals navbar links
  • Remove contractsSidebar and manualsSidebar
  • Update sync-contracts-docs.js output path and sidebar references
  • Update homepage and supported-chains links

Summary by CodeRabbit

  • Documentation

    • Reorganized contracts docs into a new Build/API structure; updated many pages to use the Build sidebar.
    • Moved Manuals into Guides and relocated related links.
    • Removed the old Contracts and Manuals index pages.
    • Expanded the whitepaper with renamed header, updated milestones, technical standards, and a MiCA filing history.
  • Chores

    • Updated navigation (navbar/footer) and homepage link to reflect the documentation restructure.
    • Removed obsolete sidebar entries.

  - Move docs/contracts/ to docs/build/api/contracts/ with Deployed
    Addresses as the section index (skip vendor README)
  - Merge docs/manuals/ into docs/guides/manuals/
  - Remove Contracts and Manuals navbar links
  - Remove contractsSidebar and manualsSidebar
  - Update sync-contracts-docs.js output path and sidebar references
  - Update homepage and supported-chains links
@mod mod requested a review from dpatsora as a code owner March 6, 2026 20:06
@coderabbitai
Copy link

coderabbitai bot commented Mar 6, 2026

📝 Walkthrough

Walkthrough

This PR restructures documentation by moving contracts-related docs from docs/contracts to docs/build/api/contracts, relocating manuals to docs/guides/manuals, updating frontmatter to use buildSidebar, adjusting sidebars/nav links/footer, and updating the contracts sync script to emit the new category layout and metadata.

Changes

Cohort / File(s) Summary
New API Category
docs/build/api/_category_.json, docs/build/api/contracts/_category_.json
Added generated API category files to define API and Contracts categories and positioning.
Contracts docs (moved & frontmatter updates)
docs/build/api/contracts/index.md, docs/build/api/contracts/faq.md, docs/build/api/contracts/api-reference/*, docs/build/api/contracts/integration/*, docs/build/api/contracts/protocol/*, docs/build/api/contracts/sdk/*
Moved/generated docs to new path and changed frontmatter displayed_sidebar from contractsSidebar to buildSidebar; adjusted index sidebar position and added key: "contracts-sdk" to SDK category.
Removed legacy docs/pages
docs/contracts/index.md, docs/manuals/index.md, docs/manuals/_category_.json
Deleted old Contracts and Manuals index pages and the old Manuals category config.
Manuals relocation & links
docs/guides/index.md, docs/guides/manuals/_category_.json, docs/learn/introduction/supported-chains.mdx
Created Manuals subsection under Guides, added _category_.json for Manuals, and updated links to /docs/guides/manuals/....
Docs generation script
scripts/sync-contracts-docs.js
Refactored to output to docs/build/api/contracts, updated frontmatter wiring to buildSidebar, introduced API parent category creation, changed writeCategory to accept optional key, and adjusted mappings/paths.
Site config and sidebar updates
docusaurus.config.ts, sidebars.ts
Removed Contracts and Manuals navbar/footer items; cleared clientModules; removed autogenerated contractsSidebar and manualsSidebar exports.
Homepage & content edits
src/components/HomepageFeatures/index.tsx, src/pages/whitepaper.md
Updated Clearnode feature link to new manuals path; large content edits to whitepaper (header, entity references, milestones, MiCA filing history and table).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • dpatsora

Poem

🐇
I hopped through folders, sorted the stacks,
Contracts to Build, Manuals on new tracks.
Sidebars tidy, links all aligned,
Docs in a burrow, neat and divined.
Hurrah — a rabbit's tidy docs, well-defined! 🎉

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately summarizes the main changes: moving contracts documentation under Build > API and merging manuals into guides, which aligns with the comprehensive refactoring performed across 40+ files.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/wplink

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
docs/build/api/contracts/sdk/_category_.json (1)

1-10: ⚠️ Potential issue | 🟡 Minor

This file will be overwritten by the sync script.

The sync script calls cleanDir(DEST) which wipes docs/build/api/contracts/ before regenerating. Since the script's writeCategory call for CATEGORIES doesn't pass the key parameter (bug flagged in sync-contracts-docs.js), the "key": "contracts-sdk" field will be lost on the next sync run.

Either fix the script to pass cat.key (as suggested), or this manual addition will need to be re-added after every sync.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/build/api/contracts/sdk/_category_.json` around lines 1 - 10, The
generated category JSON is losing its "key" because the sync script's
writeCategory call in sync-contracts-docs.js does not pass the category key;
update the call that writes CATEGORIES (the writeCategory invocation) to include
cat.key (or the equivalent property) so the generated object includes "key":
"contracts-sdk" on regen, ensuring the writeCategory function receives and
writes the key field for each category.
scripts/sync-contracts-docs.js (1)

383-388: ⚠️ Potential issue | 🟡 Minor

The key parameter is not passed when writing sub-category files.

The writeCategory function was updated to accept an optional key parameter (line 120), and the SDK category defines key: 'contracts-sdk' (line 341). However, the loop writing sub-categories doesn't pass cat.key to writeCategory, so the key will never be written to sdk/_category_.json by this script.

🔧 Proposed fix
   for (const cat of CATEGORIES) {
     writeCategory(path.join(DEST, cat.dir), {
       label: cat.label,
       position: cat.position,
+      key: cat.key,
     });
   }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@scripts/sync-contracts-docs.js` around lines 383 - 388, The loop that writes
sub-category files calls writeCategory without forwarding the optional key, so
CATEGORIES entries like the SDK item (key 'contracts-sdk') never get written;
update the loop to pass cat.key into writeCategory (e.g.,
writeCategory(path.join(DEST, cat.dir), { label: cat.label, position:
cat.position }, cat.key)) so the key is persisted into sdk/_category_.json and
other sub-category files; keep using the existing writeCategory signature and
handle undefined keys as before.
docs/build/api/contracts/sdk/api-reference.md (1)

89-89: ⚠️ Potential issue | 🟠 Major

Broken link: the referenced path does not exist.

The link ../operations/addresses.md points to a non-existent path. Based on the PR restructure, the "Deployed Addresses" page is now at docs/build/api/contracts/index.md. From this file's location (sdk/api-reference.md), the correct relative path should be ../index.md or use the doc ID directly.

🔗 Proposed fix
-See [Deployed Addresses](../operations/addresses.md) for the full list.
+See [Deployed Addresses](../index.md) for the full list.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/build/api/contracts/sdk/api-reference.md` at line 89, The Markdown link
labeled "Deployed Addresses" currently points to a non-existent relative path
"../operations/addresses.md"; update that link target in the
sdk/api-reference.md file so it references the correct document (either change
the target to "../index.md" relative to this file or replace it with the
appropriate doc ID for the contracts index) so the "Deployed Addresses" link
resolves correctly.
🧹 Nitpick comments (1)
scripts/sync-contracts-docs.js (1)

369-380: API category may conflict with manually committed file.

The script writes docs/build/api/_category_.json at runtime (lines 369-373), but there's also a manually committed docs/build/api/_category_.json file in this PR. Running the script will overwrite the manual file, though currently both have the same content. Consider either:

  1. Removing the manual file and relying solely on script generation, or
  2. Removing these lines from the script if manual control is preferred.

Having both creates a potential maintenance inconsistency.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@scripts/sync-contracts-docs.js` around lines 369 - 380, The script currently
generates docs/build/api/_category_.json by calling
writeCategory(API_CATEGORY.dir, ...) and also writes a Contracts category at
DEST using writeCategory(DEST, ...), which will overwrite the manually committed
docs/build/api/_category_.json in the repo; either remove the manual file from
the repo and keep these writeCategory calls (recommended) or remove the two
writeCategory calls (the write to API_CATEGORY.dir and the Contracts write to
DEST) so the manual _category_.json remains authoritative—update whichever you
choose and ensure API_CATEGORY and DEST usages are consistent with the chosen
approach.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docusaurus.config.ts`:
- Line 95: Remove the orphaned client module file named hideContractsOn05x.js
from the repository since it is no longer referenced in clientModules; delete
the file from version control (git rm) and commit the removal so it no longer
appears in the codebase.

In `@src/pages/whitepaper.md`:
- Around line 302-310: In src/pages/whitepaper.md update the document link for
the table row referencing "[YELLOW MiCA White Paper v1.2 (PDF)]" so the href
points to the actual file location
"/static/assets/YELLOW_MiCA_White_Paper_v.1.2.pdf" instead of
"/assets/YELLOW_MiCA_White_Paper_v.1.2.pdf"; modify the table cell containing
the document link accordingly so the rendered link uses the /static/assets path.

---

Outside diff comments:
In `@docs/build/api/contracts/sdk/_category_.json`:
- Around line 1-10: The generated category JSON is losing its "key" because the
sync script's writeCategory call in sync-contracts-docs.js does not pass the
category key; update the call that writes CATEGORIES (the writeCategory
invocation) to include cat.key (or the equivalent property) so the generated
object includes "key": "contracts-sdk" on regen, ensuring the writeCategory
function receives and writes the key field for each category.

In `@docs/build/api/contracts/sdk/api-reference.md`:
- Line 89: The Markdown link labeled "Deployed Addresses" currently points to a
non-existent relative path "../operations/addresses.md"; update that link target
in the sdk/api-reference.md file so it references the correct document (either
change the target to "../index.md" relative to this file or replace it with the
appropriate doc ID for the contracts index) so the "Deployed Addresses" link
resolves correctly.

In `@scripts/sync-contracts-docs.js`:
- Around line 383-388: The loop that writes sub-category files calls
writeCategory without forwarding the optional key, so CATEGORIES entries like
the SDK item (key 'contracts-sdk') never get written; update the loop to pass
cat.key into writeCategory (e.g., writeCategory(path.join(DEST, cat.dir), {
label: cat.label, position: cat.position }, cat.key)) so the key is persisted
into sdk/_category_.json and other sub-category files; keep using the existing
writeCategory signature and handle undefined keys as before.

---

Nitpick comments:
In `@scripts/sync-contracts-docs.js`:
- Around line 369-380: The script currently generates
docs/build/api/_category_.json by calling writeCategory(API_CATEGORY.dir, ...)
and also writes a Contracts category at DEST using writeCategory(DEST, ...),
which will overwrite the manually committed docs/build/api/_category_.json in
the repo; either remove the manual file from the repo and keep these
writeCategory calls (recommended) or remove the two writeCategory calls (the
write to API_CATEGORY.dir and the Contracts write to DEST) so the manual
_category_.json remains authoritative—update whichever you choose and ensure
API_CATEGORY and DEST usages are consistent with the chosen approach.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: adf65378-9f40-48ea-8dfb-b4f8bafeace4

📥 Commits

Reviewing files that changed from the base of the PR and between 5ed6c1b and b0c68b4.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (43)
  • docs/build/api/_category_.json
  • docs/build/api/contracts/_category_.json
  • docs/build/api/contracts/api-reference/_category_.json
  • docs/build/api/contracts/api-reference/app-registry.md
  • docs/build/api/contracts/api-reference/faucet.md
  • docs/build/api/contracts/api-reference/interfaces/_category_.json
  • docs/build/api/contracts/api-reference/interfaces/ilock.md
  • docs/build/api/contracts/api-reference/interfaces/islash.md
  • docs/build/api/contracts/api-reference/locker.md
  • docs/build/api/contracts/api-reference/node-registry.md
  • docs/build/api/contracts/api-reference/treasury.md
  • docs/build/api/contracts/api-reference/yellow-governor.md
  • docs/build/api/contracts/api-reference/yellow-token.md
  • docs/build/api/contracts/faq.md
  • docs/build/api/contracts/index.md
  • docs/build/api/contracts/integration/_category_.json
  • docs/build/api/contracts/integration/deployment.md
  • docs/build/api/contracts/integration/events.md
  • docs/build/api/contracts/integration/ui-spec.md
  • docs/build/api/contracts/protocol/_category_.json
  • docs/build/api/contracts/protocol/governance.md
  • docs/build/api/contracts/protocol/overview.md
  • docs/build/api/contracts/protocol/slashing.md
  • docs/build/api/contracts/protocol/staking.md
  • docs/build/api/contracts/protocol/treasury.md
  • docs/build/api/contracts/sdk/_category_.json
  • docs/build/api/contracts/sdk/api-reference.md
  • docs/build/api/contracts/sdk/examples.md
  • docs/build/api/contracts/sdk/getting-started.md
  • docs/contracts/index.md
  • docs/guides/index.md
  • docs/guides/manuals/_category_.json
  • docs/guides/manuals/request-asset-support.md
  • docs/guides/manuals/request-blockchain-support.md
  • docs/guides/manuals/running-clearnode-locally.md
  • docs/learn/introduction/supported-chains.mdx
  • docs/manuals/_category_.json
  • docs/manuals/index.md
  • docusaurus.config.ts
  • scripts/sync-contracts-docs.js
  • sidebars.ts
  • src/components/HomepageFeatures/index.tsx
  • src/pages/whitepaper.md
💤 Files with no reviewable changes (4)
  • sidebars.ts
  • docs/contracts/index.md
  • docs/manuals/index.md
  • docs/manuals/category.json

clientModules: [
'./src/clientModules/hideContractsOn05x.js',
],
clientModules: [],
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if hideContractsOn05x.js still exists in the repository
fd -t f "hideContractsOn05x.js"

Repository: layer-3/docs

Length of output: 95


Delete the orphaned client module file.

The file src/clientModules/hideContractsOn05x.js still exists in the repository but is no longer referenced in clientModules. This dead code should be deleted.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docusaurus.config.ts` at line 95, Remove the orphaned client module file
named hideContractsOn05x.js from the repository since it is no longer referenced
in clientModules; delete the file from version control (git rm) and commit the
removal so it no longer appears in the codebase.

Comment on lines +302 to +310
---

## MiCA White Paper Filing History

The following versions of the YELLOW crypto-asset white paper have been filed under the Markets in Crypto-Assets Regulation (EU) 2023/1114:

| Version | Date of Notification | Status | Document |
|---|---|---|---|
| v1.2 | 2025-11-14 | Current | [YELLOW MiCA White Paper v1.2 (PDF)](/assets/YELLOW_MiCA_White_Paper_v.1.2.pdf) |
Copy link

@coderabbitai coderabbitai bot Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Check if the referenced PDF file exists

# Check for the PDF file in the assets directory
if [ -f "assets/YELLOW_MiCA_White_Paper_v.1.2.pdf" ]; then
  echo "✓ PDF file exists at assets/YELLOW_MiCA_White_Paper_v.1.2.pdf"
  ls -lh "assets/YELLOW_MiCA_White_Paper_v.1.2.pdf"
else
  echo "✗ PDF file not found at assets/YELLOW_MiCA_White_Paper_v.1.2.pdf"
  echo "Searching for similar files..."
  fd -e pdf -i mica . 2>/dev/null || echo "No similar PDF files found"
fi

Repository: layer-3/docs

Length of output: 201


Update the PDF reference path to match the actual file location.

The PDF file exists at /static/assets/YELLOW_MiCA_White_Paper_v.1.2.pdf, not at the referenced path /assets/YELLOW_MiCA_White_Paper_v.1.2.pdf. Update the link on line 307 to the correct location.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/pages/whitepaper.md` around lines 302 - 310, In src/pages/whitepaper.md
update the document link for the table row referencing "[YELLOW MiCA White Paper
v1.2 (PDF)]" so the href points to the actual file location
"/static/assets/YELLOW_MiCA_White_Paper_v.1.2.pdf" instead of
"/assets/YELLOW_MiCA_White_Paper_v.1.2.pdf"; modify the table cell containing
the document link accordingly so the rendered link uses the /static/assets path.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mod ⬆️

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
src/pages/whitepaper.md (1)

303-303: ⚠️ Potential issue | 🟡 Minor

Fix the PDF link path to match the actual file location.

The PDF link still references /assets/YELLOW_MiCA_White_Paper_v.1.2.pdf, but according to previous verification, the file exists at /static/assets/YELLOW_MiCA_White_Paper_v.1.2.pdf. This broken link will result in a 404 error for users attempting to access the whitepaper.

🔗 Proposed fix for the PDF path
-| v1.2 | 2025-11-14 | Current | [YELLOW MiCA White Paper v1.2 (PDF)](/assets/YELLOW_MiCA_White_Paper_v.1.2.pdf) |
+| v1.2 | 2025-11-14 | Current | [YELLOW MiCA White Paper v1.2 (PDF)](/static/assets/YELLOW_MiCA_White_Paper_v.1.2.pdf) |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/pages/whitepaper.md` at line 303, Update the PDF link in the markdown
table row that contains "[YELLOW MiCA White Paper v1.2 (PDF)]" so it points to
the actual file location by changing the href from
"/assets/YELLOW_MiCA_White_Paper_v.1.2.pdf" to
"/static/assets/YELLOW_MiCA_White_Paper_v.1.2.pdf"; ensure the table row text
for version v1.2 (the line shown in src/pages/whitepaper.md) is updated
accordingly so the link resolves without a 404.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@src/pages/whitepaper.md`:
- Line 303: Update the PDF link in the markdown table row that contains "[YELLOW
MiCA White Paper v1.2 (PDF)]" so it points to the actual file location by
changing the href from "/assets/YELLOW_MiCA_White_Paper_v.1.2.pdf" to
"/static/assets/YELLOW_MiCA_White_Paper_v.1.2.pdf"; ensure the table row text
for version v1.2 (the line shown in src/pages/whitepaper.md) is updated
accordingly so the link resolves without a 404.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b2e3c5f2-01a1-4849-bcad-4da056b4425e

📥 Commits

Reviewing files that changed from the base of the PR and between b0c68b4 and bcadabf.

📒 Files selected for processing (1)
  • src/pages/whitepaper.md

@alessio alessio self-requested a review March 7, 2026 00:57
Copy link
Contributor

@alessio alessio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comment to address. Other than that, looks good to me

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.

2 participants