Skip to content

[codex] Make Protocol tab App Layer ready#144

Merged
ihsraham merged 4 commits into
docs/reorg-for-v1from
codex/nitrolite-v1-protocol-docs
May 4, 2026
Merged

[codex] Make Protocol tab App Layer ready#144
ihsraham merged 4 commits into
docs/reorg-for-v1from
codex/nitrolite-v1-protocol-docs

Conversation

@ihsraham
Copy link
Copy Markdown
Collaborator

@ihsraham ihsraham commented Apr 30, 2026

Summary

Makes the current Nitrolite 1.x Protocol tab App Layer-only and source-bound after the nitrolite / clearnet split from base branch commit f7b0b80 (feat: nitrolite-clearnet separation).

This PR adds a language-agnostic Nitrolite App Layer protocol section derived only from /Users/maharshimishra/Documents/nitrolite/docs/protocol, removes stale current Nitrolite Protocol pages from the visible 1.x Protocol tree, and keeps old VirtualApp/NitroRPC material available under the existing 0.5.x versioned docs.

Current Protocol navigation

  • Current 1.x Nitrolite Protocol opens at /nitrolite/protocol/introduction.
  • The visible current Protocol sidebar contains only App Layer and its nine source-bound pages.
  • The sidebar label is App Layer, not Nitrolite v1 App Layer, because the docs version selector already says 1.x.
  • Old current Protocol Reference, Architecture, and old top-level Terminology are not shown in the current Nitrolite Protocol sidebar.
  • Clearnet/YNP pages from the base branch remain under /clearnet/** and are not shown in the current Nitrolite Protocol sidebar.
  • Version switching from any current Nitrolite Protocol page without a matching 0.5.x doc id falls back to /nitrolite/0.5.x/protocol/introduction, preserving access to the old 0.5 Protocol tree.
  • Version switching from 0.5.x Protocol pages without a matching current doc id falls back to /nitrolite/protocol/introduction.

Source coverage matrix

Current page Source file / sections
docs/nitrolite/protocol/introduction.mdx docs/protocol/overview.md: design goals, roles, architecture layers, core concepts, protocol version scope
docs/nitrolite/protocol/terminology.mdx docs/protocol/terminology.md: naming conventions, entities, state, cryptographic, ledger, signing, operation, extension terms
docs/nitrolite/protocol/cryptography-and-signing.mdx docs/protocol/cryptography.md: algorithms, canonical encoding, digest construction, signature envelope, validation modes, session keys, replay protection
docs/nitrolite/protocol/state-and-ledger-model.mdx docs/protocol/state-model.md: common fields, channel state, ledger invariant, empty non-home ledger, off-chain/enforcement representations, intent mapping
docs/nitrolite/protocol/channel-lifecycle.mdx docs/protocol/channel-protocol.md: definition, identifier, lifecycle actions, signing categories, advancement rules, transition families, checkpoint-relevant transitions
docs/nitrolite/protocol/enforcement-and-settlement.mdx docs/protocol/enforcement.md: enforceability, locked funds, creation, submission, challenge, close, validation, escrow/migration enforcement, failures
docs/nitrolite/protocol/cross-chain-and-assets.mdx docs/protocol/cross-chain-and-assets.md: unified asset model, normalization, home/non-home ledgers, escrow, cross-chain deposit/withdrawal, migration, replay protection, current notes
docs/nitrolite/protocol/interaction-model.mdx docs/protocol/interactions.md: transport assumptions, envelope, message types, operations, events, correlation, errors, ordering
docs/nitrolite/protocol/security-and-limitations.mdx docs/protocol/security-and-limitations.md: maturity, goals, off-chain safety, enforcement guarantees, node liquidity trust, assumptions, limitations, future improvements
static/img/protocol/state-ledger-advancement.png copied unchanged from docs/protocol/state_ledger_advancement.png

Review updates

  • Flattened current Protocol pages from docs/nitrolite/protocol/app-layer/*.mdx to docs/nitrolite/protocol/*.mdx.
  • Removed the slug: /protocol/app-layer/overview override from the current overview.
  • Updated Nitrolite/Clearnet inbound links and footer links to /nitrolite/protocol/introduction or the flattened page routes.
  • Removed redundant sidebar_position frontmatter from explicit-sidebar current Protocol pages.
  • Fixed canonical encoding wording from RLP to Solidity ABI encoding.
  • Demoted reserved event messages from a full section to a note under Message Types.
  • Removed the reviewed .mdx suffixes from versioned Markdown links.
  • Adjusted Clearnet decentralized-layer category position from 5 to 4.
  • Added AGENTS.md so future Docusaurus work runs typecheck/build, serves locally, fetches changed routes, and keeps internal doc links extensionless.

Adversarial source-only checks

  • Searched current Nitrolite Protocol pages for @erc7824, @yellow-org/sdk, TypeScript, Go, Clearnet, Duck, v0.5, old VirtualApp/NitroRPC markers, and redundant visible v1 wording: no disallowed current Protocol hits.
  • Searched migration separately: hits are source-backed by channel-protocol.md, cross-chain-and-assets.md, and terminology.md.
  • Verified the source image is served from /img/protocol/state-ledger-advancement.png.
  • Verified built current sidebar shows only App Layer and the nine planned pages.
  • Verified built version dropdown maps current Protocol pages to /nitrolite/0.5.x/protocol/introduction when there is no exact 0.5.x equivalent, and maps 0.5.x Protocol introduction back to /nitrolite/protocol/introduction.
  • Verified /clearnet/learn/decentralized-layer/overview remains available after conflict resolution.

Validation

  • npm run typecheck passed.
  • npm run build passed.
  • npm run serve -- --host 127.0.0.1 --port 3014 passed.
  • curl -fsS -L returned 200 for all nine current Protocol pages:
    • /nitrolite/protocol/introduction
    • /nitrolite/protocol/terminology
    • /nitrolite/protocol/cryptography-and-signing
    • /nitrolite/protocol/state-and-ledger-model
    • /nitrolite/protocol/channel-lifecycle
    • /nitrolite/protocol/enforcement-and-settlement
    • /nitrolite/protocol/cross-chain-and-assets
    • /nitrolite/protocol/interaction-model
    • /nitrolite/protocol/security-and-limitations
  • curl -fsS -L also returned 200 for /nitrolite/0.5.x/protocol/introduction, /clearnet/learn/decentralized-layer/overview, and /img/protocol/state-ledger-advancement.png.

Build notes: Docusaurus still reports pre-existing/base broken links in Clearnet generated contract API pages and versioned 0.5.x pages, plus pre-existing broken anchors in versioned 0.5.x pages. No build failure remains, and the merge conflicts are resolved.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 30, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1aee03e6-04a8-4aa5-a135-5c6b7f364ce5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/nitrolite-v1-protocol-docs

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.

@ihsraham ihsraham changed the title [codex] Add Nitrolite v1 protocol docs [codex] Make Protocol tab App Layer ready Apr 30, 2026
@ihsraham ihsraham marked this pull request as ready for review May 4, 2026 08:46
@ihsraham ihsraham requested a review from dpatsora as a code owner May 4, 2026 08:46
@ihsraham ihsraham requested a review from philanton May 4, 2026 08:47
Copy link
Copy Markdown
Collaborator

@philanton philanton left a comment

Choose a reason for hiding this comment

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

Top-level structural suggestion

The 1.x Protocol tab is now App Layer-only. The nested protocol/app-layer/ directory adds a path segment that carries no information — every page already lives under the "Protocol" tab.

Move all pages from docs/nitrolite/protocol/app-layer/*.mdx up to docs/nitrolite/protocol/*.mdx. This also lets docs/nitrolite/protocol/introduction.mdx drop its slug: /protocol/app-layer/overview override and use a natural URL (or rename to protocol/overview.mdx). Removes the mixed sidebar id scheme between protocol/introduction and protocol/app-layer/*. Update sidebars-nitrolite.ts, the navbar docId in docusaurus.config.ts, and any inbound link in learn//build/ that already uses /nitrolite/protocol/app-layer/....

Cosmetic — duplicate ordering source

Each new App Layer page has sidebar_position: N in frontmatter, but the sidebar uses an explicit items: array — frontmatter positions are inert. Two sources of truth for ordering. Drop sidebar_position from the frontmatter, or switch the sidebar to autogenerated and rely on frontmatter alone. Pick one.

Comment thread docs/nitrolite/protocol/app-layer/cryptography-and-signing.mdx Outdated
Comment thread versioned_docs/version-0.5.x/learn/core-concepts/state-channels-vs-l1-l2.mdx Outdated
Comment thread versioned_docs/version-0.5.x/learn/index.mdx Outdated
Comment thread versioned_docs/version-0.5.x/protocol/app-layer/off-chain/channel-methods.mdx Outdated
Comment thread versioned_docs/version-0.5.x/protocol/app-layer/off-chain/overview.mdx Outdated
Comment thread docs/clearnet/learn/decentralized-layer/_category_.json Outdated
Comment thread docs/nitrolite/protocol/app-layer/interaction-model.mdx Outdated
@ihsraham
Copy link
Copy Markdown
Collaborator Author

ihsraham commented May 4, 2026

@philanton fixed the top-level notes. moved the pages up, removed the extra url override and ordering fields, updated the links, and checked the pages locally.

Copy link
Copy Markdown
Collaborator

@philanton philanton left a comment

Choose a reason for hiding this comment

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

All review comments addressed in de19e21. RLP → Solidity ABI fix landed, .mdx suffixes dropped on versioned 0.5.x links, Clearnet category position reverted to 4, Event Messages stub collapsed to admonition, and the structural move flattened protocol/app-layer/* up to protocol/*. LGTM.

@ihsraham ihsraham merged commit aaa62cd into docs/reorg-for-v1 May 4, 2026
3 checks passed
@ihsraham ihsraham deleted the codex/nitrolite-v1-protocol-docs branch May 4, 2026 13:07
ihsraham added a commit that referenced this pull request May 22, 2026
## Summary

Makes the current Nitrolite `1.x` Protocol tab App Layer-only and
source-bound after the `nitrolite` / `clearnet` split from base branch
commit `f7b0b80` (`feat: nitrolite-clearnet separation`).

This PR adds a language-agnostic Nitrolite App Layer protocol section
derived only from
`/Users/maharshimishra/Documents/nitrolite/docs/protocol`, removes stale
current Nitrolite Protocol pages from the visible `1.x` Protocol tree,
and keeps old VirtualApp/NitroRPC material available under the existing
`0.5.x` versioned docs.

## Current Protocol navigation

- Current `1.x` Nitrolite Protocol opens at
`/nitrolite/protocol/introduction`.
- The visible current Protocol sidebar contains only `App Layer` and its
nine source-bound pages.
- The sidebar label is `App Layer`, not `Nitrolite v1 App Layer`,
because the docs version selector already says `1.x`.
- Old current `Protocol Reference`, `Architecture`, and old top-level
`Terminology` are not shown in the current Nitrolite Protocol sidebar.
- Clearnet/YNP pages from the base branch remain under `/clearnet/**`
and are not shown in the current Nitrolite Protocol sidebar.
- Version switching from any current Nitrolite Protocol page without a
matching `0.5.x` doc id falls back to
`/nitrolite/0.5.x/protocol/introduction`, preserving access to the old
0.5 Protocol tree.
- Version switching from `0.5.x` Protocol pages without a matching
current doc id falls back to `/nitrolite/protocol/introduction`.

## Source coverage matrix

| Current page | Source file / sections |
| --- | --- |
| `docs/nitrolite/protocol/introduction.mdx` |
`docs/protocol/overview.md`: design goals, roles, architecture layers,
core concepts, protocol version scope |
| `docs/nitrolite/protocol/terminology.mdx` |
`docs/protocol/terminology.md`: naming conventions, entities, state,
cryptographic, ledger, signing, operation, extension terms |
| `docs/nitrolite/protocol/cryptography-and-signing.mdx` |
`docs/protocol/cryptography.md`: algorithms, canonical encoding, digest
construction, signature envelope, validation modes, session keys, replay
protection |
| `docs/nitrolite/protocol/state-and-ledger-model.mdx` |
`docs/protocol/state-model.md`: common fields, channel state, ledger
invariant, empty non-home ledger, off-chain/enforcement representations,
intent mapping |
| `docs/nitrolite/protocol/channel-lifecycle.mdx` |
`docs/protocol/channel-protocol.md`: definition, identifier, lifecycle
actions, signing categories, advancement rules, transition families,
checkpoint-relevant transitions |
| `docs/nitrolite/protocol/enforcement-and-settlement.mdx` |
`docs/protocol/enforcement.md`: enforceability, locked funds, creation,
submission, challenge, close, validation, escrow/migration enforcement,
failures |
| `docs/nitrolite/protocol/cross-chain-and-assets.mdx` |
`docs/protocol/cross-chain-and-assets.md`: unified asset model,
normalization, home/non-home ledgers, escrow, cross-chain
deposit/withdrawal, migration, replay protection, current notes |
| `docs/nitrolite/protocol/interaction-model.mdx` |
`docs/protocol/interactions.md`: transport assumptions, envelope,
message types, operations, events, correlation, errors, ordering |
| `docs/nitrolite/protocol/security-and-limitations.mdx` |
`docs/protocol/security-and-limitations.md`: maturity, goals, off-chain
safety, enforcement guarantees, node liquidity trust, assumptions,
limitations, future improvements |
| `static/img/protocol/state-ledger-advancement.png` | copied unchanged
from `docs/protocol/state_ledger_advancement.png` |

## Review updates

- Flattened current Protocol pages from
`docs/nitrolite/protocol/app-layer/*.mdx` to
`docs/nitrolite/protocol/*.mdx`.
- Removed the `slug: /protocol/app-layer/overview` override from the
current overview.
- Updated Nitrolite/Clearnet inbound links and footer links to
`/nitrolite/protocol/introduction` or the flattened page routes.
- Removed redundant `sidebar_position` frontmatter from explicit-sidebar
current Protocol pages.
- Fixed canonical encoding wording from RLP to Solidity ABI encoding.
- Demoted reserved event messages from a full section to a note under
Message Types.
- Removed the reviewed `.mdx` suffixes from versioned Markdown links.
- Adjusted Clearnet decentralized-layer category position from `5` to
`4`.
- Added `AGENTS.md` so future Docusaurus work runs typecheck/build,
serves locally, fetches changed routes, and keeps internal doc links
extensionless.

## Adversarial source-only checks

- Searched current Nitrolite Protocol pages for `@erc7824`,
`@yellow-org/sdk`, `TypeScript`, `Go`, `Clearnet`, `Duck`, `v0.5`, old
VirtualApp/NitroRPC markers, and redundant visible `v1` wording: no
disallowed current Protocol hits.
- Searched `migration` separately: hits are source-backed by
`channel-protocol.md`, `cross-chain-and-assets.md`, and
`terminology.md`.
- Verified the source image is served from
`/img/protocol/state-ledger-advancement.png`.
- Verified built current sidebar shows only `App Layer` and the nine
planned pages.
- Verified built version dropdown maps current Protocol pages to
`/nitrolite/0.5.x/protocol/introduction` when there is no exact `0.5.x`
equivalent, and maps `0.5.x` Protocol introduction back to
`/nitrolite/protocol/introduction`.
- Verified `/clearnet/learn/decentralized-layer/overview` remains
available after conflict resolution.

## Validation

- `npm run typecheck` passed.
- `npm run build` passed.
- `npm run serve -- --host 127.0.0.1 --port 3014` passed.
- `curl -fsS -L` returned `200` for all nine current Protocol pages:
  - `/nitrolite/protocol/introduction`
  - `/nitrolite/protocol/terminology`
  - `/nitrolite/protocol/cryptography-and-signing`
  - `/nitrolite/protocol/state-and-ledger-model`
  - `/nitrolite/protocol/channel-lifecycle`
  - `/nitrolite/protocol/enforcement-and-settlement`
  - `/nitrolite/protocol/cross-chain-and-assets`
  - `/nitrolite/protocol/interaction-model`
  - `/nitrolite/protocol/security-and-limitations`
- `curl -fsS -L` also returned `200` for
`/nitrolite/0.5.x/protocol/introduction`,
`/clearnet/learn/decentralized-layer/overview`, and
`/img/protocol/state-ledger-advancement.png`.

Build notes: Docusaurus still reports pre-existing/base broken links in
Clearnet generated contract API pages and versioned `0.5.x` pages, plus
pre-existing broken anchors in versioned `0.5.x` pages. No build failure
remains, and the merge conflicts are resolved.
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