Skip to content

Conversation

helabenkhalfallah
Copy link
Contributor

@helabenkhalfallah helabenkhalfallah commented Oct 15, 2025

Description

This PR introduces a complete Design System documentation synchronization pipeline to the manager-muk-cli tool.

Ticket Reference: #MANAGER-19481


✨ New Command

--add-components-documentation

A new CLI command that automatically fetches, streams, and synchronizes ODS component documentation (.mdx files) from the official ovh/design-system GitHub repository into the internal manager-wiki.

🧠 Key Features

  • Fully streaming extraction pipeline
    Uses Node.js streams and async queues for low-memory, high-performance tarball processing.

  • Automatic cache layer (7-day TTL)
    Caches downloaded ODS tarballs (.tar.gz) and extracted documentation to avoid redundant network requests.

  • Component-level synchronization
    Streams documentation for each ODS component into its corresponding wiki folder:

    packages/manager-wiki/stories/manager-ui-kit/components/<component>/base-component-doc/
    
  • Smart directory initialization
    Detects existing components, creates missing ones, and safely refreshes their base-component-doc structure without overwriting unrelated files.

  • Automatic import rewriting
    Applies path rewrites for compatibility with the Manager codebase:

    • ../../../src/../../../base-documents/
    • ods-react/src/@ovhcloud/ods-react
  • Verbose emoji logging
    Clear, progressive feedback for each operation (ideal for CI/CD observability).


⚙️ Architecture Overview

GitHub tarball (.tar.gz)
  └─▶ streamTarGz()               → Network + gzip stream extraction
        └─▶ extractDesignSystemDocs() → Handles cache & stream lifecycle
              └─▶ createAsyncQueue()  → Async producer/consumer bridge
                    └─▶ streamComponentDocs() → Streams documentation to disk

✅ Example Output

ℹ 📦 Starting Design System documentation sync…
ℹ ℹ️ ODS React latest version: 19.2.1
ℹ 📦 Using cached v19.2.1 (age: 0.0 days, fresh < 7.0 days)
✔ 💾 Served 85 documentation files from cache.
ℹ 📁 Found existing component: 'accordion'
ℹ 💾 Writing file → packages/manager-wiki/.../accordion/base-component-doc/documentation.mdx
✔ ✅ Completed streaming sync — created: 2, updated: 40, files written: 84
✔ ✅ Sync complete — 2 new, 40 updated, 84 files streamed.

Design System Sync Screenshot 1

Design System Sync Screenshot 2

Capture d’écran 2025-10-17 à 00 06 25 Capture d’écran 2025-10-17 à 00 06 41 Capture d’écran 2025-10-17 à 00 06 49 Capture d’écran 2025-10-17 à 00 07 01 Capture d’écran 2025-10-17 à 00 07 28

Additional Information

  • No breaking changes — this command is fully self-contained.
  • 🚀 No GitHub API usage — direct tarball streaming avoids rate limits.
  • 🧩 CI-safe caching with 7-day TTL (disable via DISABLE_ODS_DOCS_CACHE).
  • 🔧 Compatible with existing commands: --check-versions, --check-components, and --add-components.
  • 🧾 Rich JSDoc documentation added across all new modules for maintainability.

@helabenkhalfallah helabenkhalfallah requested review from a team as code owners October 15, 2025 18:53
@helabenkhalfallah helabenkhalfallah changed the base branch from master to project/mrc-v3 October 15, 2025 18:53
@github-actions github-actions bot added continuous-integration Changes to our CI configuration files and scripts documentation Documentation only changes translation required feature New feature labels Oct 15, 2025
@helabenkhalfallah helabenkhalfallah changed the title Feat/manager 19481 feat(*): [MUK-CLI] Document ODS Components in Manager-wiki Oct 15, 2025
@helabenkhalfallah helabenkhalfallah changed the title feat(*): [MUK-CLI] Document ODS Components in Manager-wiki feat(*): [MUK-CLI] Import ODS Components Documentation in Manager-wiki Oct 15, 2025
@github-actions github-actions bot added dependencies Pull requests that update a dependency file and removed continuous-integration Changes to our CI configuration files and scripts documentation Documentation only changes translation required labels Oct 15, 2025
helabenkhalfallah added 19 commits October 17, 2025 11:03
ref: #MANAGER-19480

Signed-off-by: helabenkhalfallah <[email protected]>
ref: #MANAGER-19480

Signed-off-by: helabenkhalfallah <[email protected]>
ref: #MANAGER-19480

Signed-off-by: helabenkhalfallah <[email protected]>
ref: #MANAGER-19480

Signed-off-by: helabenkhalfallah <[email protected]>
ref: #MANAGER-19480

Signed-off-by: helabenkhalfallah <[email protected]>
ref: #MANAGER-19480

Signed-off-by: helabenkhalfallah <[email protected]>
ref: #MANAGER-19480

Signed-off-by: helabenkhalfallah <[email protected]>
ref: #MANAGER-19480

Signed-off-by: helabenkhalfallah <[email protected]>
ref: #MANAGER-19480

Signed-off-by: helabenkhalfallah <[email protected]>
ref: #MANAGER-19480

Signed-off-by: helabenkhalfallah <[email protected]>
ref: #MANAGER-19480

Signed-off-by: helabenkhalfallah <[email protected]>
ref: #MANAGER-19480

Signed-off-by: helabenkhalfallah <[email protected]>
ref: #MANAGER-19480

Signed-off-by: helabenkhalfallah <[email protected]>
ref: #MANAGER-19480

Signed-off-by: helabenkhalfallah <[email protected]>
ref: #MANAGER-19480

Signed-off-by: helabenkhalfallah <[email protected]>
ref: #MANAGER-19481

Signed-off-by: helabenkhalfallah <[email protected]>
ref: #MANAGER-19481

Signed-off-by: helabenkhalfallah <[email protected]>
ref: #MANAGER-19481

Signed-off-by: helabenkhalfallah <[email protected]>
ref: #MANAGER-19481

Signed-off-by: helabenkhalfallah <[email protected]>
@helabenkhalfallah helabenkhalfallah merged commit 2d909bf into project/mrc-v3 Oct 17, 2025
11 of 14 checks passed
@helabenkhalfallah helabenkhalfallah deleted the feat/MANAGER-19481 branch October 17, 2025 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants