Conversation
Signed-off-by: Dhaval D <343411+ossdhaval@users.noreply.github.com>
Signed-off-by: Dhaval D <343411+ossdhaval@users.noreply.github.com>
Signed-off-by: Dhaval D <343411+ossdhaval@users.noreply.github.com>
📝 WalkthroughWalkthroughAdds optional analytics to the docs: a theme override and JS asset that can conditionally inject a Scarf tracking pixel and load Reo; mkdocs.yml gains a custom_dir and two feature flags; CI workflow steps fetch overrides/assets from main and can toggle the flags prior to deployment. (38 words) Changes
Sequence Diagram(s)sequenceDiagram
participant CI as GitHub Actions
participant Repo as Repository
participant Build as MkDocs Build
participant Browser as Visitor Browser
participant ReoCDN as Reo CDN
CI->>Repo: fetch overrides (`docs/overrides/main.html`, `docs/assets/js/reo.js`) and mkdocs assets
CI->>Repo: set extra flags (enable_scarf_pixel, enable_reo_flag)
Repo->>Build: build docs with template override and extras
Browser->>Build: request docs page
Build-->>Browser: serve HTML (may include Scarf pixel + `/assets/js/reo.js`)
Browser->>ReoCDN: request reo.js (if enabled)
ReoCDN-->>Browser: deliver reo.js → reo.init(...) executes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/build-docs.yml:
- Around line 133-136: The step "Use latest template overrides from main"
currently redirects output to docs/overrides/main.html which can fail if
docs/overrides doesn't exist; modify that step to create the directory first
(e.g., ensure docs/overrides exists with a mkdir -p equivalent) before running
git show origin/main:docs/overrides/main.html > docs/overrides/main.html so the
redirect cannot error out on missing directory.
In `@docs/overrides/main.html`:
- Around line 10-17: The template currently emits the Scarff pixel <img> and
reo.js <script> solely based on build-time flags
(config.extra.enable_scarf_pixel and config.extra.enable_reo_flag); change it to
perform a runtime consent check before injecting/loading those trackers by
replacing the static tags with a small inline script that queries your runtime
consent API/state (e.g., window.getUserConsent() or a consent
cookie/localStorage flag or navigator.doNotTrack) and only creates/appends the
<img src="..."> or loads reo.js when consent is granted; keep the build-time
flags to opt-in at deploy time but gate actual network calls on a runtime
consent function to prevent tracking before user consent.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 231eaef2-ebdc-49f0-a8e8-6065bbf33436
📒 Files selected for processing (4)
.github/workflows/build-docs.ymldocs/assets/js/reo.jsdocs/overrides/main.htmlmkdocs.yml
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Dhaval D <343411+ossdhaval@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/build-docs.yml:
- Around line 133-137: The workflow step currently copies only
docs/overrides/main.html from origin/main, but also needs to copy
docs/assets/js/reo.js to avoid 404s when enabling Reo; update the same step (the
block that creates docs/overrides and runs git show
origin/main:docs/overrides/main.html) to additionally fetch
origin/main:docs/assets/js/reo.js into docs/assets/js/reo.js (ensure the target
directory docs/assets/js exists or is created first) so the tracker script is
present when Reo is enabled.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: c1f4ca86-5c65-4721-a78c-9f427c7e280a
📒 Files selected for processing (1)
.github/workflows/build-docs.yml
Signed-off-by: Dhaval D <343411+ossdhaval@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/build-docs.yml:
- Around line 140-146: The release path can operate on an older tag that lacks
the new mkdocs.yml keys, so before running the sed/grep commands in the "Enable
Reo and Scarf tracking for versioned docs" step ensure mkdocs.yml is backfilled
from main; add a command such as git fetch origin main && git checkout
origin/main -- mkdocs.yml (or git restore --source=origin/main mkdocs.yml)
before the sed lines so that the sed replacements and the grep
(enable_scarf_pixel/enable_reo_flag) operate on the up-to-date file and don’t
fail on older tags.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 5206f536-037f-4c5b-821e-36cb2b8d255c
📒 Files selected for processing (1)
.github/workflows/build-docs.yml
|
Signed-off-by: Dhaval D <343411+ossdhaval@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/build-docs.yml:
- Around line 133-139: The workflow currently writes mkdocs.yml twice for
workflow_dispatch: once in the earlier "restore" step and again in the "Use
latest template overrides and Reo asset from main" step (which runs for
workflow_dispatch and release), so collapse the mkdocs.yml backfill into this
single step by removing or disabling the earlier restore of mkdocs.yml and
keeping only the git show > mkdocs.yml invocation in the "Use latest template
overrides and Reo asset from main" step; ensure mkdocs.yml is no longer written
elsewhere so the dispatch path is unambiguous.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 5bcdbc21-7892-43b6-8841-e4bb44a4d5a7
📒 Files selected for processing (1)
.github/workflows/build-docs.yml
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai resolve |
✅ Actions performedComments resolved. Auto-approval is disabled; enable |



Add reo.dev tracker to docs
Summary by CodeRabbit
New Features
Chores