Skip to content

feat(docs): add docs module with embedded Scalar API reference - #3873

Merged
PierreBrisorgueil merged 2 commits into
masterfrom
feat/docs-module
Apr 5, 2026
Merged

PierreBrisorgueil merged 2 commits into
masterfrom
feat/docs-module

Conversation

@PierreBrisorgueil

Copy link
Copy Markdown
Collaborator

Summary

  • Add new docs module at /docs route embedding the @scalar/api-reference Vue component
  • Scalar points at the Node API spec endpoint ({api}/spec.json) built from config
  • Module is optional, gated by config.modules.docs.activated
  • Includes unit tests for view rendering and configuration passing

Closes #3867

Test plan

  • npm run lint passes
  • npm run test passes (880 tests, 65 files)
  • Manual: navigate to /docs with Node API running, verify Scalar renders spec

Add a new optional docs module that embeds the Scalar API reference
component at /docs, pointing at the Node API spec endpoint. Includes
router registration, module activation in dev config, and unit tests.
Copilot AI review requested due to automatic review settings April 5, 2026 08:14
@coderabbitai

coderabbitai Bot commented Apr 5, 2026 •

Copy link
Copy Markdown

Warning

Rate limit exceeded

@PierreBrisorgueil has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 21 minutes and 8 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 21 minutes and 8 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: c32eb1fd-4682-4cbe-8523-ca62c7783e82

📥 Commits

Reviewing files that changed from the base of the PR and between 5756f9c and eb8a8a2.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (6)
  • package.json
  • src/config/defaults/development.config.js
  • src/modules/app/app.router.js
  • src/modules/docs/router/docs.router.js
  • src/modules/docs/tests/docs.view.unit.tests.js
  • src/modules/docs/views/docs.view.vue
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/docs-module

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.

@codecov

codecov Bot commented Apr 5, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.32%. Comparing base (d49dae0) to head (eb8a8a2).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3873   +/-   ##
=======================================
  Coverage   99.32%   99.32%           
=======================================
  Files          30       30           
  Lines        1030     1030           
  Branches      257      257           
=======================================
  Hits         1023     1023           
  Misses          7        7           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI 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.

Pull request overview

Adds a new optional docs module that mounts a /docs route and renders an embedded Scalar API reference pointing at the configured Node API OpenAPI spec endpoint.

Changes:

  • Add DocsView that embeds @scalar/api-reference and builds the spec URL from config.api.*.
  • Register /docs as an optional module route in the app router.
  • Add unit tests verifying the Scalar component renders and receives the expected configuration.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/modules/docs/views/docs.view.vue New view embedding Scalar and deriving spec URL from config.
src/modules/docs/tests/docs.view.unit.tests.js Unit tests for rendering + configuration passing to Scalar.
src/modules/docs/router/docs.router.js Defines the /docs route and meta.
src/modules/app/app.router.js Adds docs to the optional modules route list.
src/config/defaults/development.config.js Enables modules.docs by default in the base config layer.
package.json Adds @scalar/api-reference dependency.

Comment thread src/modules/docs/router/docs.router.js
Comment thread src/modules/docs/tests/docs.view.unit.tests.js Outdated
Comment thread src/config/defaults/development.config.js Outdated
@PierreBrisorgueil
PierreBrisorgueil merged commit b5df8d1 into master Apr 5, 2026
6 checks passed
PierreBrisorgueil pushed a commit that referenced this pull request May 1, 2026
# [2.0.0](v1.5.0...v2.0.0) (2026-05-01)

* feat(admin)!: render extra tabs as inline nested routes ([e5ebea9](e5ebea9)), closes [#3955](#3955)

### Bug Fixes

* **admin:** frame Readiness & Activity tabs to match Users/Organizations ([#3987](#3987)) ([73c7527](73c7527))
* **admin:** nav label, activeTab sync, tighter tab-route validation ([39f2eac](39f2eac))
* **admin:** prevent toggleUserRole from erasing user fields ([#3995](#3995)) ([d469759](d469759)), closes [#3993](#3993) [#3993](#3993)
* **audit:** security fixes — SVG XSS, router guard, admin errors, docs config ([#3880](#3880)) ([b57d8fc](b57d8fc)), closes [#3876](#3876) [#3877](#3877) [#3878](#3878) [#3879](#3879) [#3877](#3877)
* **auth,admin:** structured logging + remove stale TODOs ([#3919](#3919)) ([2b52c28](2b52c28))
* **auth:** call backend signout to clear httpOnly TOKEN cookie ([#4018](#4018)) ([6b04471](6b04471)), closes [#3502](#3502)
* **auth:** show loader on oAuth callback, surface token() errors ([#4017](#4017)) ([#4019](#4019)) ([a60d1b9](a60d1b9))
* **auth:** tolerate canonical + legacy + plain-string OAuth error payloads ([#4022](#4022)) ([89fa807](89fa807)), closes [#3495](#3495) [pre-#3513](https://github.com/pre-/issues/3513) [#4021](#4021) [#4021](#4021)
* **avatar:** snap size to backend sharp whitelist ([#3973](#3973)) ([c6f59d9](c6f59d9)), closes [#3972](#3972)
* **billing:** cumulative review — loading race + unconditional useMeter + cleanup ([#4043](#4043)) ([3ff56ba](3ff56ba))
* **billing:** replace networkidle with domcontentloaded in pricing E2E tests ([#3858](#3858)) ([b468027](b468027)), closes [#3848](#3848)
* **billing:** use named import for plans, add migration note for billing.config.js rename ([162689d](162689d))
* **config:** fix layer numbering and clarify downstream README instructions ([3c7c918](3c7c918))
* **config:** guard loadModuleConfigs against array default exports ([#3908](#3908)) ([0c215a0](0c215a0)), closes [#3900](#3900)
* **config:** rename billing.config.js to billing.development.config.js ([394efaa](394efaa))
* **developers:** remove orphan developers module (no backend) ([#3909](#3909)) ([8e1b440](8e1b440))
* **e2e:** eliminate flaky Vite cold-start race on ARC runners ([#3918](#3918)) ([534c7a7](534c7a7)), closes [#3917](#3917)
* **features:** remount carousel cards on step change to replay SVG animations ([#3887](#3887)) ([e202d65](e202d65)), closes [#3886](#3886)
* **footer:** transparent background on link list ([#3875](#3875)) ([83b83b0](83b83b0)), closes [#3862](#3862)
* **footer:** use transparent card color to match section background ([#3871](#3871)) ([eaca4b5](eaca4b5))
* **home:** add title/subtitle spacing in HomeContentComponent ([#3840](#3840)) ([e52a10a](e52a10a)), closes [#3835](#3835)
* **home:** equalize capabilities card heights across tabs ([#3946](#3946)) ([3fa094b](3fa094b)), closes [#3945](#3945)
* **home:** isSvg handles URLs with query strings and fragments ([#3950](#3950)) ([548facf](548facf)), closes [#3949](#3949)
* **home:** prevent last section and footer sharing same background ([#3842](#3842)) ([2cda9c7](2cda9c7)), closes [#3838](#3838)
* **home:** remove hardcoded Ghost API key, use env var ([#3915](#3915)) ([aaba326](aaba326)), closes [#3910](#3910)
* **home:** render SVGs inline to access CSS custom properties ([#3860](#3860)) ([f95ef06](f95ef06)), closes [#3849](#3849)
* **home:** replace console.error/warn with structured logger ([#3916](#3916)) ([631ddac](631ddac)), closes [#3911](#3911)
* **home:** support custom gradient in features section background ([#3866](#3866)) ([d66c36e](d66c36e))
* **home:** use homeImgComponent for about section SVGs ([#3930](#3930)) ([b9246dd](b9246dd)), closes [#3929](#3929)
* **images:** omit port when api.port is empty or undefined ([#3964](#3964)) ([70c2e4c](70c2e4c)), closes [#3927](#3927) [#3963](#3963)
* **img:** await nextTick before setting SVG content from cache ([#3889](#3889)) ([5e98d2c](5e98d2c))
* **navigation:** clean mobile glass navigation ([#3942](#3942)) ([ec6a283](ec6a283))
* **stores:** normalize console.log → console.error in catch blocks ([#3912](#3912)) ([09423de](09423de)), closes [#3906](#3906)
* **tests:** eliminate component mount leaks + harden vitest config ([#4045](#4045)) ([79a8108](79a8108))

### Features

* **admin:** add Activity tab with audit log viewer ([#3928](#3928)) ([79cacff](79cacff)), closes [#3891](#3891)
* **admin:** configurable tabs via admin config array ([#3847](#3847)) ([3a99e67](3a99e67)), closes [#3846](#3846)
* **admin:** SaaS readiness card in admin dashboard ([#3814](#3814)) ([f2f86e0](f2f86e0))
* **admin:** surface API errors in admin store actions ([#3861](#3861)) ([38aa910](38aa910)), closes [#3850](#3850)
* **billing:** meter UI primitives — progress + breakdown + ledger (PR-V2) ([#4038](#4038)) ([089d200](089d200))
* **billing:** meter UX surfaces (PR-V3) ([#4039](#4039)) ([0d0d4f6](0d0d4f6))
* **billing:** mini-bar always-on (free/admin) + extras section in /billing + account links ([#4048](#4048)) ([b459fad](b459fad))
* **billing:** useMeter composable + extras store actions (PR-V1) ([#4037](#4037)) ([1d05894](1d05894))
* **config:** document and standardize {module}.{project}.config.js per-module project overrides ([93393e3](93393e3))
* **core/pageHeader:** breadcrumb slot + canonical height + overflow fix ([#4026](#4026)) ([52e00cd](52e00cd)), closes [#4013](#4013)
* **core:** expose reusable OrgAvatar component ([#3926](#3926)) ([1d71817](1d71817)), closes [#3924](#3924)
* **core:** support SVG/image sidenav logo + click-to-home ([#3988](#3988)) ([958b1a5](958b1a5)), closes [#3986](#3986)
* **docs:** add docs module with embedded Scalar API reference ([#3873](#3873)) ([b5df8d1](b5df8d1)), closes [#3867](#3867)
* **docs:** add markdown guide pages with navigation tabs ([#3874](#3874)) ([a39256c](a39256c)), closes [#3867](#3867) [#3868](#3868)
* **home:** add animated counter to statistics component ([#3845](#3845)) ([df63150](df63150)), closes [#3831](#3831)
* **home:** add configurable cols to services component ([#3856](#3856)) ([ceeb9e0](ceeb9e0)), closes [#3853](#3853)
* **home:** add grid layout option to features component ([#3859](#3859)) ([e1b6540](e1b6540)), closes [#3854](#3854)
* **home:** add HomeCtaComponent for final CTA section ([#3843](#3843)) ([38c5444](38c5444)), closes [#3837](#3837) [#3839](#3839)
* **home:** add imgBackground option to about component ([#3857](#3857)) ([4d939ee](4d939ee)), closes [#3855](#3855)
* **home:** add imgMode prop to features cards for SVG illustrations ([#3844](#3844)) ([bfe6ab7](bfe6ab7)), closes [#3839](#3839)
* **home:** make timeline opposite-side labels optional ([#3841](#3841)) ([564808c](564808c)), closes [#3836](#3836)
* **home:** render icon on the right of title when alignment='right' ([#3952](#3952)) ([94ff2ee](94ff2ee)), closes [#3951](#3951)
* **home:** support custom section background in all home components ([#3872](#3872)) ([5756f9c](5756f9c))
* **home:** support right alignment in homeContentComponent ([#3947](#3947)) ([26af7df](26af7df)), closes [#3944](#3944)
* **modules:** per-module activation config flag ([#3864](#3864)) ([d49dae0](d49dae0)), closes [#3863](#3863)
* **navigation:** support explicit sidenav ordering via meta.order ([#3965](#3965)) ([37eaa67](37eaa67)), closes [#3962](#3962)
* **navigation:** support external links in sidenav ([#3954](#3954)) ([#3956](#3956)) ([8708fa0](8708fa0))
* **observability:** fan-out errors Sentry + PostHog + opt-in flags ([#4012](#4012)) ([0efe3ab](0efe3ab)), closes [#4011](#4011) [#4011](#4011)

### BREAKING CHANGES

* downstream projects using config.admin.tabs with
/admin/* sibling routes must migrate per MIGRATIONS.md — relative
paths in the router file, registration via injectAdminChildren in
app.router.js, and removal of PageHeader from tab views.
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.

feat: docs module with embedded Scalar API reference

2 participants