Skip to content

Add table of contents to class documentation with section navigation support - #48

Open
Arctis-Fireblight wants to merge 1 commit into
masterfrom
update-classdocs-formatting
Open

Arctis-Fireblight wants to merge 1 commit into
masterfrom
update-classdocs-formatting

Conversation

@Arctis-Fireblight

@Arctis-Fireblight Arctis-Fireblight commented Sep 27, 2026 •

Copy link
Copy Markdown
Collaborator
  • Refactored ClassDocumentationRenderer to include table of contents generation.
  • Updated ClassDocViewer to display a responsive TOC layout for desktop and mobile.
  • Enhanced heading generation for API sections and members.
  • Added syntax highlighting for type signatures and default values.
  • Updated tests to validate TOC rendering and highlighted content.
  • Introduced new styles for improved layout and accessibility.

Summary by CodeRabbit

  • New Features
    • Class documentation pages now include desktop and expandable mobile tables of contents, with links to page sections and individual overloaded members.
    • API signatures now use syntax highlighting, and documented class types link to their reference pages.
    • Overloaded methods have numbered headings for easier navigation.
    • Documentation links preserve the current URL’s query parameters.

…support

- Refactored `ClassDocumentationRenderer` to include table of contents generation.
- Updated `ClassDocViewer` to display a responsive TOC layout for desktop and mobile.
- Enhanced heading generation for API sections and members.
- Added syntax highlighting for type signatures and default values.
- Updated tests to validate TOC rendering and highlighted content.
- Introduced new styles for improved layout and accessibility.
@Arctis-Fireblight Arctis-Fireblight self-assigned this Sep 27, 2026
@redot-dokploy

redot-dokploy Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

Dokploy Preview Deployment

Name Status Preview Updated (UTC)
Engine Doc ✅ Done Preview URL 2026-09-27T11:55:54.050Z

@coderabbitai

coderabbitai Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: ab2903cd-ad57-487a-9156-3c914a207a62

📥 Commits

Reviewing files that changed from the base of the PR and between 118421e and eb3c66a.

📒 Files selected for processing (5)
  • Redot-Documentation-Tests/ClassDocumentationComponentTests.cs
  • Redot-Documentation-Tests/ClassDocumentationRendererTests.cs
  • Redot-Documentation/ClassDocumentation/ClassDocumentationRenderer.cs
  • Redot-Documentation/Components/Pages/ClassDocViewer.razor
  • Redot-Documentation/wwwroot/app.css

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The class documentation renderer now collects headings and highlights API signatures. Class pages display desktop and mobile tables of contents with links that preserve the current query string.

Changes

Class documentation rendering and navigation

Layer / File(s) Summary
Rendering context and signature tokens
Redot-Documentation/ClassDocumentation/ClassDocumentationRenderer.cs
RenderPage accepts an optional heading list. The render context shares the list, and signature helpers classify types and tokenize values.
Heading collection and API signatures
Redot-Documentation/ClassDocumentation/ClassDocumentationRenderer.cs, Redot-Documentation-Tests/ClassDocumentationRendererTests.cs
The renderer records page, section, and member headings. API signatures use highlighted tokens, with links for documented class types. Tests check heading IDs, signature markup, and escaping.
Class page layout and navigation
Redot-Documentation/Components/Pages/ClassDocViewer.razor, Redot-Documentation/wwwroot/app.css, Redot-Documentation-Tests/ClassDocumentationComponentTests.cs
ClassDocViewer renders cached HTML with desktop and mobile tables of contents. Links preserve the query string and escape heading IDs. CSS styles the class-page layout and API headings. Component tests check navigation and overloaded-member links.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant ClassDocViewer
  participant ClassDocumentationRenderer
  participant DesktopMobileTOC
  ClassDocViewer->>ClassDocumentationRenderer: RenderPage with heading list
  ClassDocumentationRenderer-->>ClassDocViewer: Rendered HTML and headings
  ClassDocViewer->>DesktopMobileTOC: Render links for headings
Loading

Merge Risk: ⚪ Minimal · up to eb3c6

Class documentation navigation is ready to merge after normal checks; changing classes does not leave stale content or navigation links.

Security Architecture Review

Security architecture risk: 🔵 Low · up to eb3c6

The change appears confined to class-documentation navigation and formatting. No new security issue was verified, although failure behavior and broader security coverage are not fully established.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The observed output change reaches visitors to class-documentation pages. The examined paths do not add a route, privileged operation, credential flow, or cross-service call.

Trust Boundaries and Controls

  • observed — The page still displays HTML produced by the existing renderer. The added TOC passes structured headings to a component that renders link attributes and titles through Razor; its href builder escapes heading IDs.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 61.90% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 21 functions across 3 files. (2 skipped: … 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 clearly and concisely describes the main changes: adding a table of contents and section navigation to class documentation.
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.
Full details: Docstring Coverage

Explanation

Docstring coverage is 61.90% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 21 functions across 3 files. (2 skipped: 2 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

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.

1 participant