Skip to content

Conversation

@alirana01
Copy link
Collaborator

@alirana01 alirana01 commented Sep 15, 2025

Versions file for master added

Summary by CodeRabbit

  • Documentation
    • Introduced versioned documentation configuration to support a version selector.
    • Available versions: “latest” and “release-v4.0.0” (marked as pre-release).
    • Default hardware target set to ESP32; no multi-target content enabled yet.
    • Improves clarity on supported targets and upcoming release availability.

@alirana01 alirana01 self-assigned this Sep 15, 2025
@coderabbitai
Copy link

coderabbitai bot commented Sep 15, 2025

Walkthrough

Introduces a new static JavaScript file defining a global DOCUMENTATION_VERSIONS object with DEFAULTS (has_targets: false, supported_targets: ["esp32"]) and VERSIONS entries ("latest" and "release-v4.0.0" marked pre_release).

Changes

Cohort / File(s) Summary
Docs version config
docs/_static/docs_version.js
Added global DOCUMENTATION_VERSIONS object with DEFAULTS and VERSIONS entries for documentation versioning.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

I nibble code like clover leaves,
A version map in gentle sheaves—
“latest” blooms, a sprout so bright,
A pre-release peeks into light.
Soft hops through docs I cheerfully roam,
With JS trails that lead you home. 🥕

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "added the version list for docs on master" accurately summarizes the primary change in the PR—adding a documentation versions list (docs/_static/docs_version.js) with DOCUMENTATION_VERSIONS and version entries—so it is relevant and concise for a reviewer scanning history.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch doc-from-v4.0

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
docs/_static/docs_version.js (3)

9-9: Freeze the global to avoid accidental mutation at runtime.

Add a freeze after initialization (keeps current var semantics to avoid theme breakage).

Apply this diff:

-};
+};
+Object.freeze(DOCUMENTATION_VERSIONS);

2-4: Clarify has_targets vs supported_targets.

If the docs don’t expose per‑target UI (has_targets: false), consider dropping supported_targets to avoid confusion.

Apply this diff:

-    DEFAULTS: { has_targets: false,
-                supported_targets: [ "esp32" ]
-              },
+    DEFAULTS: { has_targets: false },

1-1: Add repo-standard license header.

Most Espressif docs assets carry an Apache‑2.0 SPDX header. Align this file with the repo’s convention.

Example:

+/* SPDX-License-Identifier: Apache-2.0 */
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7e2946b and 42877e4.

📒 Files selected for processing (1)
  • docs/_static/docs_version.js (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: build_windows
  • GitHub Check: build_macos
  • GitHub Check: build
🔇 Additional comments (3)
docs/_static/docs_version.js (3)

1-9: LGTM: minimal version switcher config matches PR intent.

Adds "latest" and "release-v4.0.0" with sensible DEFAULTS. No blocking issues.


1-9: Resolved — theme injects docs_version.js; no change required.
docs/conf_common.py sets html_static_path = ['../_static'] and versions_url = './_static/docs_version.js', so the theme will load docs/_static/docs_version.js (no html_js_files edit needed).


6-8: Verify version slug and pre_release flag.

  • docs/_static/docs_version.js currently contains:
        { name: "latest" },
        { name: "release-v4.0.0", pre_release: true }
    ]
  • Confirm the published docs are served under the exact slug "release-v4.0.0" (output directory must match). If v4.0.0 is a final release, set pre_release: false or remove the flag.

Copy link
Collaborator

@sigmaaa sigmaaa left a comment

Choose a reason for hiding this comment

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

LGTM

@kolipakakondal kolipakakondal merged commit f1f10a7 into master Oct 6, 2025
4 of 7 checks passed
@kolipakakondal kolipakakondal deleted the doc-from-v4.0 branch October 6, 2025 07:58
@kolipakakondal
Copy link
Collaborator

I'm skeptical that this approach will work unless we move the docs. We will merge and see

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.

4 participants