Skip to content

docs(auth): restructure auth docs into Fern navigation and fix rendering issues#368

Merged
ironcommit merged 1 commit into
mainfrom
auth-docs/rsadler
Jun 17, 2026
Merged

docs(auth): restructure auth docs into Fern navigation and fix rendering issues#368
ironcommit merged 1 commit into
mainfrom
auth-docs/rsadler

Conversation

@ironcommit

@ironcommit ironcommit commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Add the Access Control section to the Fern docs navigation (latest.yml), covering authentication, authorization, deployment, and security model pages.

Fix permissions-reference table rendering by replacing escaped pipe characters (\\|) with HTML entities (&#124;) and <code> tags so permission patterns display correctly in MDX. Update cross-document links from relative .md paths to absolute Fern URL paths.

Improve roles-and-permissions with a Mermaid flowchart for the role hierarchy. Refactor security-model and concepts pages for clarity and accuracy.

Add docs-watch.mjs, a file-system watcher that triggers Fern live-reload when any file outside docs/fern/ changes, and wire it up as make docs-watch.

Extend auth-tools.py with a generate-docs command that regenerates the permissions reference from the auth configuration.

Summary by CodeRabbit

  • New Features
    • Added make docs-watch for repo-wide docs/** changes to automatically trigger Fern docs reloads.
  • Documentation
    • Expanded docs navigation with a new Access Control section and refreshed related links to absolute destinations.
    • Updated auth/authorization/security documentation with Mermaid diagrams and clearer role/permission hierarchy guidance.
    • Refreshed the permissions reference with standardized permission-table rendering, generated-content notice, and improved “Related” links.
  • Developer Experience
    • Added Fern docs watch support (watch script) to enable smoother local iteration outside docs/fern/.

@ironcommit ironcommit requested review from a team as code owners June 16, 2026 23:31
@github-actions github-actions Bot added the docs label Jun 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor
Suite Lines Covered Line Rate Branch Rate
Unit Tests 19503/25926 75.2% 60.7%
Integration Tests 11412/24698 46.2% 20.1%

@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 7e6b52fd-657c-41ef-9ce0-689b942f1116

📥 Commits

Reviewing files that changed from the base of the PR and between 14ae8ad and 8c97ef3.

📒 Files selected for processing (14)
  • Makefile
  • docs/AGENTS.md
  • docs/auth/authorization/index.mdx
  • docs/auth/authorization/permissions-reference.mdx
  • docs/auth/authorization/roles-and-permissions.mdx
  • docs/auth/concepts.mdx
  • docs/auth/deployment/configuration.mdx
  • docs/auth/security-model.mdx
  • docs/customizer/tutorials/index.mdx
  • docs/fern/README.md
  • docs/fern/package.json
  • docs/fern/scripts/docs-watch.mjs
  • docs/fern/versions/latest.yml
  • services/core/auth/scripts/auth-tools.py
✅ Files skipped from review due to trivial changes (9)
  • docs/fern/package.json
  • docs/AGENTS.md
  • docs/auth/deployment/configuration.mdx
  • docs/auth/concepts.mdx
  • docs/auth/authorization/index.mdx
  • docs/auth/security-model.mdx
  • docs/fern/README.md
  • docs/auth/authorization/roles-and-permissions.mdx
  • docs/customizer/tutorials/index.mdx
🚧 Files skipped from review as they are similar to previous changes (4)
  • docs/fern/versions/latest.yml
  • docs/fern/scripts/docs-watch.mjs
  • Makefile
  • docs/auth/authorization/permissions-reference.mdx

📝 Walkthrough

Walkthrough

Adds a docs-watch.mjs Node.js script that spawns Fern's dev server and triggers reloads by touching docs.yml on filesystem changes, exposed via a new npm run watch script and make docs-watch target. Separately, restructures Access Control documentation: adds a navigation section in latest.yml, updates the permissions reference generator to use HTML code blocks and absolute URLs, replaces ASCII diagrams with Mermaid across auth docs, and standardizes relative URLs to absolute paths in tutorials.

Changes

Docs Live-Reload Tooling

Layer / File(s) Summary
Watch script implementation and process lifecycle
docs/fern/scripts/docs-watch.mjs
Implements debounced filesystem watching on the docs root, reload triggering via utimes on docs.yml, Fern process spawning with inherited stdio, and graceful SIGINT/SIGTERM shutdown with proper watcher and process cleanup.
Watch script wiring and user documentation
docs/fern/package.json, Makefile, docs/fern/README.md, docs/AGENTS.md
Exposed through "watch" npm script and make docs-watch Make target. User-facing docs explain when to use make docs (edits only under docs/fern/) versus make docs-watch (edits elsewhere under docs/).

Access Control Docs Restructure

Layer / File(s) Summary
Navigation: new Access Control section
docs/fern/versions/latest.yml
Inserts a top-level Access Control section with nested Authentication, Authorization, Deployment, Security Model, and Troubleshooting page entries.
Permissions reference generator and output formatting
services/core/auth/scripts/auth-tools.py, docs/auth/authorization/permissions-reference.mdx, docs/auth/authorization/index.mdx
Generator switches grouped permission cells from backticks with escaped pipes to <code> HTML blocks with &#124; separators, adds a generated-page admonition to the header, and converts all links to absolute /documentation/... URLs. Output MDX and authorization index card href reflect these changes.
Auth docs: ASCII diagrams replaced with Mermaid
docs/auth/concepts.mdx, docs/auth/authorization/roles-and-permissions.mdx, docs/auth/security-model.mdx, docs/auth/deployment/configuration.mdx
Four plain-text diagrams in concepts.mdx become Mermaid flowcharts. roles-and-permissions.mdx gains a Mermaid role hierarchy and updated matrix description. security-model.mdx replaces ASCII trust-boundary diagram with Mermaid sequence diagram. configuration.mdx clarifies auth-specific config scope.
Absolute URL fixes in customizer tutorials
docs/customizer/tutorials/index.mdx
Tutorial card href values updated from relative to absolute /documentation/customizer-reference/tutorials/... paths.

Suggested labels

fix

Suggested reviewers

  • mckornfield
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly matches the primary changeset: restructuring auth documentation into Fern navigation and fixing rendering issues in permissions tables.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch auth-docs/rsadler

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/fern/scripts/docs-watch.mjs`:
- Around line 80-88: The shutdown function kills the fern subprocess but does
not explicitly exit the process with the proper signal exit code, causing the
process to exit with code 0 instead. After calling fern.kill(signal) in the
shutdown function, add a process.exit() call that exits with the appropriate
signal exit code. The exit code for signal termination should be calculated as
128 plus the signal number (for example, SIGTERM is signal 15, so exit code
should be 143).
- Around line 46-53: The shouldIgnore function currently returns true when
relativePath is falsy or missing, causing fs.watch events without filenames to
be silently ignored. Remove the early return check that tests for missing
filename (the `if (!relativePath) { return true; }` block), so that events
without filename information are not ignored and will instead trigger reloads to
ensure no changes are missed.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 80ce2055-6aa2-4faf-a904-31fd44930c4c

📥 Commits

Reviewing files that changed from the base of the PR and between 47644e0 and 711a4be.

📒 Files selected for processing (12)
  • Makefile
  • docs/auth/authorization/index.mdx
  • docs/auth/authorization/permissions-reference.mdx
  • docs/auth/authorization/roles-and-permissions.mdx
  • docs/auth/concepts.mdx
  • docs/auth/deployment/configuration.mdx
  • docs/auth/security-model.mdx
  • docs/customizer/tutorials/index.mdx
  • docs/fern/package.json
  • docs/fern/scripts/docs-watch.mjs
  • docs/fern/versions/latest.yml
  • services/core/auth/scripts/auth-tools.py

Comment thread docs/fern/scripts/docs-watch.mjs
Comment thread docs/fern/scripts/docs-watch.mjs
@ironcommit ironcommit force-pushed the auth-docs/rsadler branch 2 times, most recently from d663bc8 to 7de3947 Compare June 16, 2026 23:42
Comment thread docs/auth/authorization/permissions-reference.mdx Outdated
Comment thread docs/auth/authorization/permissions-reference.mdx
Comment thread docs/auth/security-model.mdx
Comment thread docs/fern/scripts/docs-watch.mjs
Comment thread services/core/auth/scripts/auth-tools.py Outdated
@ironcommit ironcommit enabled auto-merge June 17, 2026 17:07
…ing issues

Add the Access Control section to the Fern docs navigation (latest.yml),
covering authentication, authorization, deployment, and security model pages.

Fix permissions-reference table rendering by replacing escaped pipe characters
(`\\|`) with HTML entities (`&#124;`) and `<code>` tags so permission patterns
display correctly in MDX. Update cross-document links from relative `.md` paths
to absolute Fern URL paths.

Improve roles-and-permissions with a Mermaid flowchart for the role hierarchy.
Refactor security-model and concepts pages for clarity and accuracy.

Add docs-watch.mjs, a file-system watcher that triggers Fern live-reload when
any file outside `docs/fern/` changes, and wire it up as `make docs-watch`.

Extend auth-tools.py with a `generate-docs` command that regenerates the
permissions reference from the auth configuration.

Signed-off-by: Ryan Sadler <267728323+ironcommit@users.noreply.github.com>
@ironcommit ironcommit added this pull request to the merge queue Jun 17, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 17, 2026
@ironcommit ironcommit added this pull request to the merge queue Jun 17, 2026
Merged via the queue into main with commit d42db71 Jun 17, 2026
55 of 56 checks passed
@ironcommit ironcommit deleted the auth-docs/rsadler branch June 17, 2026 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants