Skip to content

fix(docs): preserve multiline property documentation - #3290

Closed
aniruddhaadak80 wants to merge 2 commits into
npmx-dev:mainfrom
aniruddhaadak80:fix/docs-property-jsdoc-2843
Closed

aniruddhaadak80 wants to merge 2 commits into
npmx-dev:mainfrom
aniruddhaadak80:fix/docs-property-jsdoc-2843

Conversation

@aniruddhaadak80

Copy link
Copy Markdown

Linked issue

Closes #2843

Context

The docs renderer discarded every line after the first line of class and interface member JSDoc. Property descriptions containing lists or wrapped text were therefore incomplete in generated package documentation.

Description

  • Pass member descriptions through the existing renderMarkdown renderer so line breaks, inline code, and JSDoc links are preserved safely.
  • Reuse the same member-list renderer for class and interface properties and methods.
  • Add unit regressions for multiline class and interface property documentation.

Testing

I did not run commands locally because this contribution was made through GitHub APIs without a local checkout. The repository CI runs these exact commands:

  • pnpm vp run lint
  • pnpm vp run test:types
  • pnpm vp test --project unit --coverage --reporter=default --reporter=junit --outputFile=test-report.junit.xml
  • pnpm vp run build:test
  • pnpm vp run test:browser:prebuilt

The new regression is a server-side unit test with a synthetic Deno doc node; no live package or browser fixture is required. I could not capture browser screenshots in the API-only workflow.

@vercel

vercel Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
npmx.dev Ready Ready Preview Sep 25, 2026 2:18pm UTC
2 Skipped Deployments
Project Deployment Actions Updated
docs.npmx.dev Ignored Ignored Preview Sep 25, 2026 2:18pm UTC
npmx-lunaria Ignored Ignored Sep 25, 2026 2:18pm UTC

Request Review

@agentscanapp

agentscanapp Bot commented Sep 25, 2026

Copy link
Copy Markdown

Thanks for opening this pull request! 🎉

We really appreciate you taking the time to contribute, @aniruddhaadak80.

A maintainer will take a look as soon as they can. In the meantime, please make sure that:

  • the description explains what changed and why
  • any related issues are linked
  • existing tests still pass

If anything needs adjusting we'll leave comments here. Thanks again!

@coderabbitai

coderabbitai Bot commented Sep 25, 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: Repository: npmx-dev/npmx.dev/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 41d2e133-c91e-45b2-b974-3c919a650df7

📥 Commits

Reviewing files that changed from the base of the PR and between 34292f9 and ccb1b7b.

📒 Files selected for processing (2)
  • server/utils/docs/render.ts
  • test/unit/server/utils/docs/render.spec.ts

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Summary

Summary by CodeRabbit

  • Bug Fixes
    • Class and interface member descriptions now display complete Markdown formatting, including inline code and linked symbols.

Walkthrough

Class and interface member descriptions now use renderMarkdown with the symbol lookup. The member renderers await the results. Tests cover multiline property documentation, including lists and inline code.

Changes

Member documentation rendering

Layer / File(s) Summary
Render class and interface member descriptions
server/utils/docs/render.ts, test/unit/server/utils/docs/render.spec.ts
The shared member-list renderer now renders descriptions as Markdown. Class and interface renderers await the rendered lists and pass the symbol lookup. Tests check complete multiline property descriptions.

Suggested reviewers: maraisr

Priority: ⬇️ Low

Severity of issue fixed: Low

Merge Risk: ⚪ Minimal · up to ccb1b

The change preserves multiline property documentation, and no actionable merge risk is established. It is mergeable after normal checks.

Security Architecture Review

Security architecture risk: 🔵 Low · up to ccb1b

Class and interface member documentation can now contain formatted links and HTML generated from Markdown. The change reuses existing escaping and link handling, and no new endpoint was identified. The remaining risk is limited but not fully established as absent.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The additional rendered-content exposure is confined to member descriptions in the existing package-documentation HTML response, rather than a newly reachable production route.

Trust Boundaries and Controls

  • observed — Member descriptions use the established escaping-and-link-rendering path before inclusion in generated HTML. This supports, but does not by itself prove, safety for every downstream HTML consumer.
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: preserving multiline property documentation in generated docs.
Description check ✅ Passed The description directly explains the documentation rendering bug, the implementation, the regression tests, and the planned CI checks.
Linked Issues check ✅ Passed Issue [#2843] requires complete generated documentation for multiline properties. The PR sends class and interface member descriptions through renderMarkdown instead of truncating them at the first …
Out of Scope Changes check ✅ Passed The changes remain within the documentation rendering scope. The shared asynchronous member-list renderer supports the same fix for class and interface properties, methods, and getters, and preserves …
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • 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.

@codecov

codecov Bot commented Sep 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 72.22222% with 5 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
server/utils/docs/render.ts 72.22% 3 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

@graphieros graphieros added the 007 This PR *may* not follow our code of conduct regarding AI usage. label Sep 25, 2026
@graphieros

Copy link
Copy Markdown
Member

@aniruddhaadak80
Have you read our contribution guide regarding AI usage ?

@graphieros graphieros closed this Sep 26, 2026

This branch was successfully deployed

1 active deployment
Preview – npmx.dev — ccb1b7b4 Deployed Sep 25, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

007 This PR *may* not follow our code of conduct regarding AI usage. agentscan:automation-signals

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generated docs for properties is incomplete

2 participants