Skip to content

Conversation

@danciaclara
Copy link
Collaborator

@danciaclara danciaclara commented Feb 3, 2026

Description

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Improvement (change that would cause existing functionality to not work as expected)
  • Code refactoring
  • Performance improvements
  • Documentation update

Screenshots and Media (if applicable)

Test Scenarios

References

Summary by CodeRabbit

  • New Features

    • Enabled Google Analytics tracking for the site.
    • Replaced local search with Algolia-powered search, added configurable search options and search insights for improved relevance.
  • Documentation

    • Updated troubleshooting docs: revised header wording and removed an outdated license verification troubleshooting step.

@vercel
Copy link

vercel bot commented Feb 3, 2026

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

Project Deployment Actions Updated (UTC)
developer-docs Ready Ready Preview, Comment Feb 3, 2026 3:03pm

Request Review

@coderabbitai
Copy link

coderabbitai bot commented Feb 3, 2026

📝 Walkthrough

Walkthrough

Adds Google Analytics gtag.js scripts to VitePress head; switches site search from local to Algolia with an options block (appId, apiKey, indexName, insights, searchParameters); renames a troubleshooting header and removes one prime-cli restart troubleshooting bullet.

Changes

Cohort / File(s) Summary
VitePress config
docs/.vitepress/config.mts
Inserted two Google Analytics gtag.js script entries into head; replaced search.provider: 'local' with provider: 'algolia' and added options including appId, apiKey, indexName, insights: true, and searchParameters: { hitsPerPage: 10 }.
Self-hosting troubleshooting doc
docs/self-hosting/troubleshoot/license-errors.md
Changed section header to "Errors related to licenses" and removed a troubleshooting bullet advising prime-cli restart for invalid license connectivity.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇 I hopped through configs, light and fleet,
Placed two gtag scripts with careful feet,
Swapped search to Algolia, tidy and bright,
Tweaked a header, pruned a tip at night.

🚥 Pre-merge checks | ✅ 3
✅ 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 'Algolia and GA' directly references the two main technical changes: integrating Algolia search and Google Analytics.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch alogolia-and-ga

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: 1

🤖 Fix all issues with AI agents
In `@docs/.vitepress/config.mts`:
- Around line 48-53: Gate Google Analytics initialization behind explicit user
consent: modify the two script entries that inject gtag (the ['script', ...]
entries and the inline gtag setup invoking gtag('config')) to first set consent
defaults to denied (use gtag('consent', 'default', {ad_storage:'denied',
analytics_storage:'denied'})) and remove or delay the gtag('config') call;
implement a consent callback (or expose a function like enableGtagConsent())
that upon user opt-in calls gtag('consent','update', {ad_storage:'granted',
analytics_storage:'granted'}) and then calls gtag('config', 'G-JF828SKW90') so
analytics are only configured after consent.
🧹 Nitpick comments (1)
docs/.vitepress/config.mts (1)

631-637: Algolia search-only keys are designed to be publicly committed; consider env injection for easier rotation.

This appears to be a search-only API key (correct for a public docs search provider). Algolia and DocSearch explicitly state that search-only keys are safe to share publicly, including in git. However, using an environment variable (process.env.ALGOLIA_SEARCH_KEY) would simplify future rotation without requiring a git commit. This is optional rather than urgent.

♻️ Env-injected key (optional)
       options: {
         appId: 'AXICJJC8RP',
-        apiKey: '23df4157dee1d9a8d435cadd6cae3f26',
+        apiKey: process.env.ALGOLIA_SEARCH_KEY ?? '23df4157dee1d9a8d435cadd6cae3f26',
         indexName: 'plane_developer_docs',
         searchParameters: {
           facetFilters: []
         },
         insights: true,

Comment on lines +48 to +53
// Google Analytics
['script', { async: '', src: 'https://www.googletagmanager.com/gtag/js?id=G-JF828SKW90' }],
['script', {}, `window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-JF828SKW90');`],
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# First, read the config.mts file to see the exact implementation
cat -n docs/.vitepress/config.mts | head -100

Repository: makeplane/developer-docs

Length of output: 4399


🏁 Script executed:

# Search for consent-related code in the codebase
rg -i "consent|gtag|analytics" --type ts --type js --type mts --type vue -A 3 -B 1

Repository: makeplane/developer-docs

Length of output: 95


🏁 Script executed:

# Check if there's a consent banner or cookie consent implementation
fd -e vue -e ts -e js . | xargs grep -l -i "consent\|cookie" 2>/dev/null | head -20

Repository: makeplane/developer-docs

Length of output: 50


🏁 Script executed:

# Look for environment variables or configuration related to GA/analytics
rg "VITE_|GOOGLE|ANALYTICS|gtag" docs/ --type mts --type ts

Repository: makeplane/developer-docs

Length of output: 95


🏁 Script executed:

# Search for consent-related code in Vue and TS files (broader search)
find docs -type f \( -name "*.vue" -o -name "*.ts" -o -name "*.js" \) | xargs grep -l -i "consent\|gtag\|analytics" 2>/dev/null

Repository: makeplane/developer-docs

Length of output: 52


🏁 Script executed:

# Check if there's a layout or theme file that might wrap the GA initialization
find docs/.vitepress -type f \( -name "*.vue" -o -name "*.ts" -o -name "*.js" \) | head -20

Repository: makeplane/developer-docs

Length of output: 331


🏁 Script executed:

# Search entire codebase for gtag references
grep -r "gtag\|consent" docs --include="*.vue" --include="*.ts" --include="*.js" 2>/dev/null

Repository: makeplane/developer-docs

Length of output: 50


🏁 Script executed:

# Look for environment-based GA initialization or feature flags
grep -r "ANALYTICS\|GA_" . --include="*.vue" --include="*.ts" --include="*.js" --include="*.env*" --include="*.mts" 2>/dev/null

Repository: makeplane/developer-docs

Length of output: 50


🏁 Script executed:

# Read the theme index to see how GA might be handled
cat -n docs/.vitepress/theme/index.ts

Repository: makeplane/developer-docs

Length of output: 4915


🏁 Script executed:

# Check for Layout components
find docs/.vitepress/theme -name "*Layout*" -o -name "Layout.*"

Repository: makeplane/developer-docs

Length of output: 50


🏁 Script executed:

# Look for app setup or useRouter hooks that might modify GA
grep -r "useRouter\|onMounted\|mounted" docs/.vitepress/theme --include="*.vue" --include="*.ts" -A 3

Repository: makeplane/developer-docs

Length of output: 585


🏁 Script executed:

# Final check for any cookie consent library (Cookiebot, CookieConsent, etc.)
grep -r "cookie\|consent\|onetrust\|cookiebot\|iubenda" docs --include="*.html" --include="*.vue" --include="*.ts" --include="*.js" --include="*.mts" 2>/dev/null || echo "No cookie consent found"

Repository: makeplane/developer-docs

Length of output: 91


🏁 Script executed:

# Check if gtag is referenced anywhere else or if consent mode is set elsewhere
grep -r "window.dataLayer\|gtag.*'consent'\|gtag('config'" . --include="*.vue" --include="*.ts" --include="*.js" --include="*.mts" 2>/dev/null || echo "No additional gtag references"

Repository: makeplane/developer-docs

Length of output: 229


Gate GA initialization behind user consent before calling gtag('config').

Google Analytics is loaded and configured for all visitors without consent checks. No cookie consent banner or consent mode is implemented. For GDPR and CCPA compliance, configure consent mode to default to "denied" and only call gtag('config') after users opt in, or implement a consent banner to gate the second script tag.

🤖 Prompt for AI Agents
In `@docs/.vitepress/config.mts` around lines 48 - 53, Gate Google Analytics
initialization behind explicit user consent: modify the two script entries that
inject gtag (the ['script', ...] entries and the inline gtag setup invoking
gtag('config')) to first set consent defaults to denied (use gtag('consent',
'default', {ad_storage:'denied', analytics_storage:'denied'})) and remove or
delay the gtag('config') call; implement a consent callback (or expose a
function like enableGtagConsent()) that upon user opt-in calls
gtag('consent','update', {ad_storage:'granted', analytics_storage:'granted'})
and then calls gtag('config', 'G-JF828SKW90') so analytics are only configured
after consent.

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: 1

🤖 Fix all issues with AI agents
In `@docs/.vitepress/config.mts`:
- Line 31: The config sets lang: 'root', which is not a valid BCP 47 tag and
will produce improper <html lang="">; update the exported VitePress config
object (the lang property) to a valid BCP 47 tag such as 'en' or 'en-US' (e.g.,
replace 'root' with 'en' or 'en-US') so screen readers and SEO receive a correct
language attribute.

],
},
},
lang: 'root',
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Invalid lang value: 'root' is not a valid BCP 47 language tag.

The lang attribute is used for the <html lang=""> attribute which affects screen readers and SEO. Use a valid language code like 'en' or 'en-US' instead.

🛠️ Proposed fix
-  lang: 'root',
+  lang: 'en',
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
lang: 'root',
lang: 'en',
🤖 Prompt for AI Agents
In `@docs/.vitepress/config.mts` at line 31, The config sets lang: 'root', which
is not a valid BCP 47 tag and will produce improper <html lang="">; update the
exported VitePress config object (the lang property) to a valid BCP 47 tag such
as 'en' or 'en-US' (e.g., replace 'root' with 'en' or 'en-US') so screen readers
and SEO receive a correct language attribute.

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: 1

🤖 Fix all issues with AI agents
In `@docs/.vitepress/config.mts`:
- Around line 628-635: The Algolia credentials are hardcoded in the
search.options object (appId and apiKey) — replace the literal values for appId
and apiKey with environment variables (e.g., read from process.env or Vite's
import.meta.env) so search.options.appId and search.options.apiKey pull from
ALGOLIA_APP_ID and ALGOLIA_SEARCH_KEY at build time; keep indexName and insights
as-is, update docs/deployment settings to declare those env vars
(ALGOLIA_APP_ID, ALGOLIA_SEARCH_KEY) and ensure CI/Vercel build config injects
them for production builds.

Comment on lines 628 to 635
search: {
provider: 'local'
provider: 'algolia',
options: {
appId: 'AXICJJC8RP',
apiKey: '23df4157dee1d9a8d435cadd6cae3f26',
indexName: 'plane_developer_docs',
insights: true,
}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# First, let's check the actual content of the config file at the specified lines
if [ -f "docs/.vitepress/config.mts" ]; then
  wc -l docs/.vitepress/config.mts
  sed -n '620,645p' docs/.vitepress/config.mts
fi

Repository: makeplane/developer-docs

Length of output: 866


🏁 Script executed:

# Check for any environment variable configuration or .env files
find . -type f \( -name ".env*" -o -name "*.example" \) | head -20

Repository: makeplane/developer-docs

Length of output: 50


🏁 Script executed:

# Search for Algolia configuration elsewhere in the codebase
rg -i "algolia" --type ts --type js --type mts -A 5 -B 5 | head -100

Repository: makeplane/developer-docs

Length of output: 95


🏁 Script executed:

# Check if there's documentation about environment setup
find . -type f \( -name "README*" -o -name "SETUP*" -o -name "ENV*" -o -name "CONFIG*" \) | grep -E "(^|/)(README|SETUP|ENV|CONFIG)" | head -20

Repository: makeplane/developer-docs

Length of output: 79


🏁 Script executed:

# Read the README to check for environment setup instructions
cat README.md | head -100

Repository: makeplane/developer-docs

Length of output: 2285


🏁 Script executed:

# Search for any documentation files mentioning Algolia or API keys
find . -type f -name "*.md" -exec grep -l -i "algolia\|api.?key\|env" {} \; | head -20

Repository: makeplane/developer-docs

Length of output: 1925


🏁 Script executed:

# Check the git history for this file to see if keys were recently added or if there's been discussion
git log --oneline -20 -- docs/.vitepress/config.mts

Repository: makeplane/developer-docs

Length of output: 103


🏁 Script executed:

# Check package.json for build process and any env setup
cat package.json | grep -A 10 -B 5 "algolia\|env\|script"

Repository: makeplane/developer-docs

Length of output: 401


🏁 Script executed:

# Search for any build or deployment configuration
find . -type f -name "*.json" -o -name "*.yml" -o -name "*.yaml" -o -name "*.config.*" | grep -v node_modules | head -20

Repository: makeplane/developer-docs

Length of output: 166


🏁 Script executed:

# Check if there's a .gitignore to understand what's typically ignored
cat .gitignore 2>/dev/null | grep -i "env\|algolia\|key\|secret" || echo "No matching patterns in .gitignore"

Repository: makeplane/developer-docs

Length of output: 102


🏁 Script executed:

# Check vercel.json deployment configuration
cat vercel.json

Repository: makeplane/developer-docs

Length of output: 91


🏁 Script executed:

# Check if there's any build environment setup or CI/CD config
find . -type f \( -name ".github" -o -name ".*yml" -o -name ".*yaml" \) | head -20
ls -la .github/ 2>/dev/null || echo "No .github directory"

Repository: makeplane/developer-docs

Length of output: 88


Move Algolia credentials to environment variables; avoid committing API keys to version control.

Lines 631-632 expose an Algolia API key and app ID in the repository. Even if this is a search-only key intended for public use, hardcoding credentials violates security best practices and prevents easy credential rotation without code changes. Use environment variables at build time instead:

Suggested change
-        appId: 'AXICJJC8RP',
-        apiKey: '23df4157dee1d9a8d435cadd6cae3f26',
+        appId: process.env.ALGOLIA_APP_ID ?? '',
+        apiKey: process.env.ALGOLIA_SEARCH_KEY ?? '',

Document the required environment variables (ALGOLIA_APP_ID, ALGOLIA_SEARCH_KEY) in your deployment configuration (e.g., Vercel dashboard or build environment).

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
search: {
provider: 'local'
provider: 'algolia',
options: {
appId: 'AXICJJC8RP',
apiKey: '23df4157dee1d9a8d435cadd6cae3f26',
indexName: 'plane_developer_docs',
insights: true,
}
search: {
provider: 'algolia',
options: {
appId: process.env.ALGOLIA_APP_ID ?? '',
apiKey: process.env.ALGOLIA_SEARCH_KEY ?? '',
indexName: 'plane_developer_docs',
insights: true,
}
🧰 Tools
🪛 Gitleaks (8.30.0)

[high] 632-632: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

🤖 Prompt for AI Agents
In `@docs/.vitepress/config.mts` around lines 628 - 635, The Algolia credentials
are hardcoded in the search.options object (appId and apiKey) — replace the
literal values for appId and apiKey with environment variables (e.g., read from
process.env or Vite's import.meta.env) so search.options.appId and
search.options.apiKey pull from ALGOLIA_APP_ID and ALGOLIA_SEARCH_KEY at build
time; keep indexName and insights as-is, update docs/deployment settings to
declare those env vars (ALGOLIA_APP_ID, ALGOLIA_SEARCH_KEY) and ensure CI/Vercel
build config injects them for production builds.

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.

2 participants