Skip to content

[codex] sync plugin registry and docs#552

Merged
riderx merged 9 commits intomainfrom
codex/sync-plugin-registry-docs
Apr 8, 2026
Merged

[codex] sync plugin registry and docs#552
riderx merged 9 commits intomainfrom
codex/sync-plugin-registry-docs

Conversation

@riderx
Copy link
Copy Markdown
Member

@riderx riderx commented Apr 3, 2026

What changed

  • added the missing public Capgo plugins to the website registry: Contentsquare, Incoming Call Kit, Supabase, and Transitions
  • added English docs sections for those four plugins
  • fixed /plugins so it links to internal Starlight docs when a plugin has docs, even if there is no plugins-tutorials entry
  • replaced the hardcoded docs plugin index with a generated directory backed by the live plugin registry and docs tree
  • refreshed npm download metadata so the new packages have stats on the directory page

Why

Some public Capgo plugins existed on GitHub and in some cases already had docs in the repo, but they were either missing from the plugin registry entirely or not discoverable from the website because /plugins only promoted tutorial entries.

Impact

  • the missing plugins now appear in the website plugin list
  • the plugin docs landing page stays aligned with documented plugins automatically
  • plugins like BLE that already had docs now resolve to internal docs instead of falling back to GitHub

Validation

  • bunx prettier --check astro.config.mjs src/config/plugins.ts src/content/docs/docs/plugins/index.mdx src/data/npm-downloads.json src/pages/plugins.astro src/components/doc/PluginsDirectory.astro src/content/docs/docs/plugins/contentsquare/index.mdx src/content/docs/docs/plugins/contentsquare/getting-started.mdx src/content/docs/docs/plugins/incoming-call-kit/index.mdx src/content/docs/docs/plugins/incoming-call-kit/getting-started.mdx src/content/docs/docs/plugins/supabase/index.mdx src/content/docs/docs/plugins/supabase/getting-started.mdx src/content/docs/docs/plugins/transitions/index.mdx src/content/docs/docs/plugins/transitions/getting-started.mdx src/services/pluginDocs.ts
  • mkdir -p node_modules/.astro && ./node_modules/.bin/astro check (0 errors, 0 warnings, 20 hints)
  • bun run build reached the successful Vite bundle phase locally, but the Astro process did not return before timeout/termination; CI is the final build authority for this PR

Summary by CodeRabbit

  • New Features

    • Many new plugins added and the Plugins page now dynamically lists plugins with locale-aware doc links and a Documentation button when available; plugin overview and setup UI components added.
  • Documentation

    • Added landing and “Getting Started” guides plus English tutorials for numerous plugins (Contentsquare, Incoming Call Kit, Supabase, Transitions, Live Activities, Twilio Video, Widget Kit, Electron Updater, and others).
  • Chores

    • Updated npm download statistics and site indexing to include additional plugin docs.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 3, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds plugin registry entries, localized plugin docs and tutorials, new doc components (PluginOverview, PluginSetupSteps, PluginsDirectory), a plugin-docs discovery/resolution service, updates to plugins page rendering and LD-JSON, Starlight sidebar/docset registration in astro.config.mjs, and npm-downloads data updates.

Changes

Cohort / File(s) Summary
Site config & Starlight
astro.config.mjs
Normalized Windows paths with replaceAll('\\', '/'); added helpers to create/register plugin Starlight doc sets and sidebar items; registered additional plugin docs/sidebar entries.
Plugin registry
src/config/plugins.ts
Added helper to create Cap-go Action entries and appended additionalCapgoPlugins (8 new @capgo/* actions) into exported actions.
Docs discovery service
src/services/pluginDocs.ts
New service that generates slug candidates from package name/repo href, resolves the first matching docs slug, and exposes functions to get default/localized docs slug sets.
Plugins directory component
src/components/doc/PluginsDirectory.astro
New component that loads localized doc slugs, resolves per-plugin docs links (docsHref/docsLocale/hasSiteDocs), deduplicates links, and renders plugin LinkCards.
Doc helper components
src/components/doc/PluginOverview.astro, src/components/doc/PluginSetupSteps.astro
Added PluginOverview (props: summary, cards[]) and PluginSetupSteps (props: pkg, stepTitle, optional installLabel) for consistent plugin docs UIs.
Docs content & tutorials (new)
src/content/docs/docs/plugins/..., src/content/plugins-tutorials/en/*
Added many plugin doc landing + getting-started MDX pages for: Contentsquare, Incoming Call Kit, Supabase, Transitions, Live Activities, Twilio Video, Widget Kit, Electron Updater, and corresponding English tutorials.
Plugins page & docs index
src/pages/plugins.astro, src/content/docs/docs/plugins/index.mdx
Replaced hardcoded plugin grids with <PluginsDirectory/>; compute docsHref/hasSiteDocs via resolver; generate LD-JSON for the plugin list; updated landing intro copy and removed static grids.
Data updates
src/data/npm-downloads.json
Updated package keys and download counts, added new plugin entries, and fixed trailing newline.
Docs governance
AGENTS.md
Appended guidance for adding plugins: update registry, add MDX/tutorial files, register docs in astro.config.mjs, refresh metadata, and run checks.

Sequence Diagram

sequenceDiagram
    participant FS as "File System (docs tree)"
    participant Comp as "PluginsDirectory"
    participant Svc as "pluginDocs Service"
    participant Reg as "Plugin Registry (actions)"
    participant UI as "Rendered Page"

    Note over FS,UI: Docs discovery and docs-link resolution flow

    Comp->>FS: read docs dirs (default + locale)
    FS-->>Comp: list of doc slugs

    Comp->>Reg: iterate registered plugins
    Reg-->>Comp: plugin metadata

    loop per plugin
        Comp->>Svc: resolvePluginDocsSlug(plugin, docsSlugs)
        Svc->>Svc: generate slug candidates (name + repo)
        Svc-->>Comp: first matching slug or undefined
        alt matched
            Comp->>Comp: compute docsHref and docsLocale
        else no match
            Comp->>Comp: fallback to external href
        end
    end

    Comp->>UI: render CardGrid of LinkCards with docsHref/docsLocale
    UI-->>UI: display plugin cards and counts
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested labels

💰 Rewarded

Poem

🐰 I hopped through folders, found each slug and name,
Cards stitched from repos, docs tucked into frame.
New plugins sprout guides, locales kept in view,
I nibbled a carrot — the directory grew! 🥕

🚥 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 '[codex] sync plugin registry and docs' accurately reflects the main change: synchronizing the plugin registry with missing Capgo plugins and their associated documentation.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/sync-plugin-registry-docs

Comment @coderabbitai help to get the list of available commands and usage tips.

@riderx riderx marked this pull request as ready for review April 3, 2026 16:13
Copy link
Copy Markdown
Contributor

@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: 2

🧹 Nitpick comments (4)
src/content/docs/docs/plugins/supabase/getting-started.mdx (1)

41-43: Avoid logging raw access tokens in docs examples.

These snippets currently print JWTs directly. Safer examples reduce accidental credential leakage when users copy/paste into real apps.

Suggested doc-safe logging update
-console.log('JWT', session?.accessToken);
+console.log('JWT available', Boolean(session?.accessToken));
...
-console.log('Current JWT', session?.accessToken);
+console.log('Session token available', Boolean(session?.accessToken));

Also applies to: 49-50

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/content/docs/docs/plugins/supabase/getting-started.mdx` around lines 41 -
43, The docs currently log raw tokens using console.log('JWT',
session?.accessToken) which risks credential leakage; update instances (the
console.log lines that reference session?.accessToken and the duplicate at lines
49-50) to avoid printing the full JWT—either log a boolean/mask (e.g., log
whether a token exists via !!session?.accessToken or log a redacted prefix like
session?.accessToken.slice(0,8) + '...') and keep the user id logging as-is
(console.log('User', user?.id)); replace the unsafe console.log usages
accordingly.
src/data/npm-downloads.json (1)

2-119: Consider automating npm stats refresh to prevent stale directory metrics.

The updated data looks good, but this file is high-churn and manual edits will age fast. A scheduled fetch-and-commit job would keep plugin directory stats consistently accurate.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/data/npm-downloads.json` around lines 2 - 119, The npm-downloads.json
file is updated manually and will become stale—add an automated scheduled job to
refresh it: create a CI workflow that runs daily, fetches package download
counts from the npm API for the package keys present in npm-downloads.json,
compares and updates the JSON only if values changed, commits the updated file
using a repository token and a clear commit message, and fails noisily on
errors; ensure the job is idempotent and references the JSON filename when
reading/updating.
src/components/doc/PluginsDirectory.astro (1)

12-24: Filesystem reading logic is duplicated with src/pages/plugins.astro.

The readDocsDirectory function and docs directory path construction (lines 12-24) are identical to the implementation in plugins.astro. This violates DRY principles and could lead to maintenance issues if the logic needs to change.

This echoes the suggestion made for plugins.astro - extract to a shared utility in src/services/pluginDocs.ts.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/doc/PluginsDirectory.astro` around lines 12 - 24, Extract the
duplicated filesystem logic into a shared utility (e.g., create a new module in
src/services/pluginDocs.ts) that exports a readDocsDirectory(dir: string) helper
and a function to compute doc slug sets (or exports defaultDocsDirectory,
localizedDocsDirectory, and a getDocsSlugs(locale, defaultLocale) function).
Replace the inline implementations in both PluginsDirectory.astro and
plugins.astro to import and use the shared readDocsDirectory and the new
slug-computing function so both files consume a single source of truth for
defaultDocsSlugs, localizedDocsSlugs, and docsSlugs.
src/pages/plugins.astro (1)

53-65: Consider extracting duplicated filesystem reading logic.

The readDocsDirectory function and the docs slug resolution logic (lines 53-65) are duplicated in PluginsDirectory.astro. Consider extracting this to a shared utility in src/services/pluginDocs.ts to maintain DRY principles.

♻️ Suggested extraction to shared service

Add to src/services/pluginDocs.ts:

import fs from 'node:fs'
import path from 'node:path'

export const readDocsDirectory = (dir: string): string[] => {
  if (!fs.existsSync(dir)) return []
  return fs
    .readdirSync(dir, { withFileTypes: true })
    .filter((entry) => entry.isDirectory())
    .map((entry) => entry.name)
}

export const getPluginDocsSlugs = (locale: string, defaultLocale: string) => {
  const defaultDocsDirectory = path.join(process.cwd(), 'src', 'content', 'docs', 'docs', 'plugins')
  const localizedDocsDirectory = locale === defaultLocale 
    ? defaultDocsDirectory 
    : path.join(process.cwd(), 'src', 'content', 'docs', locale, 'docs', 'plugins')
  
  const defaultDocsSlugs = new Set(readDocsDirectory(defaultDocsDirectory))
  const localizedDocsSlugs = locale === defaultLocale ? defaultDocsSlugs : new Set(readDocsDirectory(localizedDocsDirectory))
  const docsSlugs = new Set([...defaultDocsSlugs, ...localizedDocsSlugs])
  
  return { defaultDocsSlugs, localizedDocsSlugs, docsSlugs }
}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/pages/plugins.astro` around lines 53 - 65, Extract the duplicated
filesystem logic from PluginsDirectory.astro into a shared service: create
src/services/pluginDocs.ts and move the readDocsDirectory function and the docs
slug resolution into it as exported functions (e.g., readDocsDirectory and
getPluginDocsSlugs). Update PluginsDirectory.astro to import
getPluginDocsSlugs(locale, defaultLocale) and use the returned defaultDocsSlugs,
localizedDocsSlugs, and docsSlugs instead of redefining the logic, keeping
function names readDocsDirectory and getPluginDocsSlugs to match the current
usage.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/content/docs/docs/plugins/index.mdx`:
- Line 31: The PluginsDirectory component currently omits entries when slug
resolution fails in its slug-resolving logic (see PluginsDirectory and the code
that resolves plugin.slug), causing silent drop of public plugins; update that
logic to provide a visible fallback (e.g., render a GitHub/external-link for the
plugin using its repo/name or raw URL) and/or emit a build-time warning when
resolution returns null/undefined (use the same function that resolves slugs to
detect failures), so unresolved slugs render a clear link or log a warning
rather than being silently skipped.

In `@src/pages/plugins.astro`:
- Line 44: The page currently defines content as const content = { title,
description } but is missing SEO fields; import createItemListLdJson and
createLdJsonGraph from '@/lib/ldJson' and augment content to include a keywords
string (e.g., "capacitor plugins, mobile plugins, ionic plugins, native plugins,
app plugins") and an ldJson property created with createLdJsonGraph containing
createItemListLdJson({ name: title, description, itemCount: plugins.length })
and includeOrganization: true so the list/catalog page has proper JSON‑LD
structured data and keywords for SEO compliance.

---

Nitpick comments:
In `@src/components/doc/PluginsDirectory.astro`:
- Around line 12-24: Extract the duplicated filesystem logic into a shared
utility (e.g., create a new module in src/services/pluginDocs.ts) that exports a
readDocsDirectory(dir: string) helper and a function to compute doc slug sets
(or exports defaultDocsDirectory, localizedDocsDirectory, and a
getDocsSlugs(locale, defaultLocale) function). Replace the inline
implementations in both PluginsDirectory.astro and plugins.astro to import and
use the shared readDocsDirectory and the new slug-computing function so both
files consume a single source of truth for defaultDocsSlugs, localizedDocsSlugs,
and docsSlugs.

In `@src/content/docs/docs/plugins/supabase/getting-started.mdx`:
- Around line 41-43: The docs currently log raw tokens using console.log('JWT',
session?.accessToken) which risks credential leakage; update instances (the
console.log lines that reference session?.accessToken and the duplicate at lines
49-50) to avoid printing the full JWT—either log a boolean/mask (e.g., log
whether a token exists via !!session?.accessToken or log a redacted prefix like
session?.accessToken.slice(0,8) + '...') and keep the user id logging as-is
(console.log('User', user?.id)); replace the unsafe console.log usages
accordingly.

In `@src/data/npm-downloads.json`:
- Around line 2-119: The npm-downloads.json file is updated manually and will
become stale—add an automated scheduled job to refresh it: create a CI workflow
that runs daily, fetches package download counts from the npm API for the
package keys present in npm-downloads.json, compares and updates the JSON only
if values changed, commits the updated file using a repository token and a clear
commit message, and fails noisily on errors; ensure the job is idempotent and
references the JSON filename when reading/updating.

In `@src/pages/plugins.astro`:
- Around line 53-65: Extract the duplicated filesystem logic from
PluginsDirectory.astro into a shared service: create src/services/pluginDocs.ts
and move the readDocsDirectory function and the docs slug resolution into it as
exported functions (e.g., readDocsDirectory and getPluginDocsSlugs). Update
PluginsDirectory.astro to import getPluginDocsSlugs(locale, defaultLocale) and
use the returned defaultDocsSlugs, localizedDocsSlugs, and docsSlugs instead of
redefining the logic, keeping function names readDocsDirectory and
getPluginDocsSlugs to match the current usage.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 272a7193-7c5e-4a40-b19b-c7d0b3f04eb8

📥 Commits

Reviewing files that changed from the base of the PR and between d07ba44 and 2cb4a87.

📒 Files selected for processing (15)
  • astro.config.mjs
  • src/components/doc/PluginsDirectory.astro
  • src/config/plugins.ts
  • src/content/docs/docs/plugins/contentsquare/getting-started.mdx
  • src/content/docs/docs/plugins/contentsquare/index.mdx
  • src/content/docs/docs/plugins/incoming-call-kit/getting-started.mdx
  • src/content/docs/docs/plugins/incoming-call-kit/index.mdx
  • src/content/docs/docs/plugins/index.mdx
  • src/content/docs/docs/plugins/supabase/getting-started.mdx
  • src/content/docs/docs/plugins/supabase/index.mdx
  • src/content/docs/docs/plugins/transitions/getting-started.mdx
  • src/content/docs/docs/plugins/transitions/index.mdx
  • src/data/npm-downloads.json
  • src/pages/plugins.astro
  • src/services/pluginDocs.ts

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2cb4a87f35

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3706de4834

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown
Contributor

@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

🧹 Nitpick comments (4)
src/components/doc/PluginSetupSteps.astro (1)

18-24: Deduplicate the package manager list literal.

The same pkgManagers array appears twice; centralizing it avoids drift.

Suggested refactor
 interface Props {
   installLabel?: string
   pkg: string
   stepTitle: string
 }
 
 const { installLabel = 'plugin', pkg, stepTitle } = Astro.props
+const pkgManagers = ['npm', 'pnpm', 'yarn', 'bun'] as const
 ---
@@
-    <PackageManagers pkg={pkg} pkgManagers={['npm', 'pnpm', 'yarn', 'bun']} />
+    <PackageManagers pkg={pkg} pkgManagers={pkgManagers} />
@@
-    <PackageManagers type="exec" pkg="cap" args="sync" pkgManagers={['npm', 'pnpm', 'yarn', 'bun']} />
+    <PackageManagers type="exec" pkg="cap" args="sync" pkgManagers={pkgManagers} />
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/doc/PluginSetupSteps.astro` around lines 18 - 24, The
pkgManagers array literal is duplicated in two PackageManagers usages; extract
it into a single reusable constant (e.g., const pkgManagers =
['npm','pnpm','yarn','bun']) at the top of the component and replace both
PackageManagers props (the pkgManagers prop on the first PackageManagers and the
second PackageManagers with type="exec" pkg="cap" args="sync") to reference that
constant so the list is defined once and reused.
astro.config.mjs (1)

81-93: Good abstraction for reducing boilerplate.

The factory functions correctly encapsulate the repeated structure. Consider extending this pattern to all plugin definitions in a follow-up PR for full consistency—currently only 4 of ~80 plugins use the factories.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@astro.config.mjs` around lines 81 - 93, The factory helpers
createPluginDocSet and createPluginSidebarItem correctly factor repeated docset
and sidebar structure; extend this pattern across the remaining plugin
definitions by replacing duplicated literal objects with calls to
createPluginDocSet(label, description, slug) and createPluginSidebarItem(label,
slug) so all plugin entries use the same small helpers for consistency and
reduced boilerplate; update any plugin-specific differences by adding optional
parameters or small overrides in the factories if needed.
src/components/doc/PluginOverview.astro (2)

17-21: Wrap the rendered content in a semantic section and add a live region.

Lines 17-21 currently render loose content. A <section> with a heading and aria-live="polite" better aligns with accessibility/semantic rules.

Suggested patch
-<p>{summary}</p>
-
-<CardGrid stagger>
-  {cards.map((card) => <Card title={card.title}>{card.body}</Card>)}
-</CardGrid>
+<section aria-live="polite" aria-label="Plugin overview">
+  <h2 class="sr-only">Plugin overview</h2>
+  <p>{summary}</p>
+  <CardGrid stagger>
+    {cards.map((card) => <Card title={card.title}>{card.body}</Card>)}
+  </CardGrid>
+</section>

As per coding guidelines: Use <section> with proper headings for semantic structure and Use aria-live="polite" for dynamic content updates.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/doc/PluginOverview.astro` around lines 17 - 21, Wrap the loose
content in PluginOverview.astro inside a semantic <section> that contains a
heading (e.g., an <h2> or <h3> describing the plugin overview) and move the
existing paragraph and CardGrid into that section; also mark the dynamic content
container (the element that renders {summary} and the CardGrid — e.g., the
<section> or the CardGrid wrapper) with aria-live="polite" so assistive tech is
informed of updates. Ensure the heading precedes the content and keep the
existing CardGrid and cards.map/Card rendering intact.

14-14: Apply the Props type to Astro.props on Line 14.

Props is defined but not enforced on the destructuring, leaving cards and summary effectively untyped and risking shape mismatches until runtime.

Suggested patch
-const { cards, summary } = Astro.props
+const { cards, summary } = Astro.props as Props
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/doc/PluginOverview.astro` at line 14, The destructuring of
Astro.props for cards and summary is untyped; update the declaration to enforce
the existing Props type on Astro.props (so cards and summary are type-checked).
Locate the line with "Astro.props" and apply the Props type (e.g., use a type
assertion or annotate the destructured assignment so Astro.props is treated as
Props) to ensure the variables cards and summary conform to the Props shape
defined in this component.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/components/doc/PluginSetupSteps.astro`:
- Around line 13-31: The rendered dynamic values (installLabel, stepTitle, and
the slot content) in PluginSetupSteps.astro need an ARIA live region so screen
readers receive updates; add aria-live="polite" to the elements that render
those dynamic pieces—e.g., the <li> (or the <p> / wrapper around {installLabel}
and {stepTitle}) for the first and third steps and the container that hosts the
<slot />—so each dynamic step update is announced politely to assistive tech.

---

Nitpick comments:
In `@astro.config.mjs`:
- Around line 81-93: The factory helpers createPluginDocSet and
createPluginSidebarItem correctly factor repeated docset and sidebar structure;
extend this pattern across the remaining plugin definitions by replacing
duplicated literal objects with calls to createPluginDocSet(label, description,
slug) and createPluginSidebarItem(label, slug) so all plugin entries use the
same small helpers for consistency and reduced boilerplate; update any
plugin-specific differences by adding optional parameters or small overrides in
the factories if needed.

In `@src/components/doc/PluginOverview.astro`:
- Around line 17-21: Wrap the loose content in PluginOverview.astro inside a
semantic <section> that contains a heading (e.g., an <h2> or <h3> describing the
plugin overview) and move the existing paragraph and CardGrid into that section;
also mark the dynamic content container (the element that renders {summary} and
the CardGrid — e.g., the <section> or the CardGrid wrapper) with
aria-live="polite" so assistive tech is informed of updates. Ensure the heading
precedes the content and keep the existing CardGrid and cards.map/Card rendering
intact.
- Line 14: The destructuring of Astro.props for cards and summary is untyped;
update the declaration to enforce the existing Props type on Astro.props (so
cards and summary are type-checked). Locate the line with "Astro.props" and
apply the Props type (e.g., use a type assertion or annotate the destructured
assignment so Astro.props is treated as Props) to ensure the variables cards and
summary conform to the Props shape defined in this component.

In `@src/components/doc/PluginSetupSteps.astro`:
- Around line 18-24: The pkgManagers array literal is duplicated in two
PackageManagers usages; extract it into a single reusable constant (e.g., const
pkgManagers = ['npm','pnpm','yarn','bun']) at the top of the component and
replace both PackageManagers props (the pkgManagers prop on the first
PackageManagers and the second PackageManagers with type="exec" pkg="cap"
args="sync") to reference that constant so the list is defined once and reused.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9bf3dd04-a1c4-4165-8523-f4318860f018

📥 Commits

Reviewing files that changed from the base of the PR and between 2cb4a87 and 3706de4.

📒 Files selected for processing (11)
  • astro.config.mjs
  • src/components/doc/PluginOverview.astro
  • src/components/doc/PluginSetupSteps.astro
  • src/content/docs/docs/plugins/contentsquare/getting-started.mdx
  • src/content/docs/docs/plugins/contentsquare/index.mdx
  • src/content/docs/docs/plugins/incoming-call-kit/getting-started.mdx
  • src/content/docs/docs/plugins/incoming-call-kit/index.mdx
  • src/content/docs/docs/plugins/supabase/getting-started.mdx
  • src/content/docs/docs/plugins/supabase/index.mdx
  • src/content/docs/docs/plugins/transitions/getting-started.mdx
  • src/content/docs/docs/plugins/transitions/index.mdx
✅ Files skipped from review due to trivial changes (8)
  • src/content/docs/docs/plugins/contentsquare/index.mdx
  • src/content/docs/docs/plugins/transitions/index.mdx
  • src/content/docs/docs/plugins/contentsquare/getting-started.mdx
  • src/content/docs/docs/plugins/transitions/getting-started.mdx
  • src/content/docs/docs/plugins/incoming-call-kit/getting-started.mdx
  • src/content/docs/docs/plugins/supabase/index.mdx
  • src/content/docs/docs/plugins/supabase/getting-started.mdx
  • src/content/docs/docs/plugins/incoming-call-kit/index.mdx

Copy link
Copy Markdown
Contributor

@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

🧹 Nitpick comments (1)
src/pages/plugins.astro (1)

58-68: Split rendered and plain-text descriptions.

Once description becomes marked HTML here, the search dataset and the JSON-LD builder both have to work around markup instead of using the visible copy directly. Keeping descriptionHtml and descriptionText separate will make filtering more predictable and remove the tag-stripping fallback at Line 95.

💡 Suggested shape change
-    return {
-      ...item,
-      description: await marked.parse(item.description),
+    const descriptionHtml = await marked.parse(item.description)
+    const descriptionText = descriptionHtml.replace(/<[^>]+>/g, ' ').replace(/\s+/g, ' ').trim()
+
+    return {
+      ...item,
+      descriptionHtml,
+      descriptionText,
       docsHref: hasTutorial ? getRelativeLocaleUrl(locale, `plugins/${tutorialSlug}`) : docsSlug ? getRelativeLocaleUrl(docsLocale, `docs/plugins/${docsSlug}/`) : item.href,
       hasSiteDocs: hasTutorial || Boolean(docsSlug),
     }

Then point set:html at descriptionHtml, and reuse descriptionText for data-description and the ItemList description.

Also applies to: 92-95

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/pages/plugins.astro` around lines 58 - 68, The code maps pluginsWithStars
and currently overwrites description with marked HTML which breaks search and
JSON-LD consumers; change the mapping in the pluginsWithStars.map callback to
produce two fields: descriptionHtml (await marked.parse(item.description)) and
descriptionText (the original plain-text item.description or its
trimmed/normalized text), then update downstream usages: point any template
set:html bindings to descriptionHtml, use descriptionText for data-description
attributes and for ItemList descriptions/JSON-LD builders, and remove any
tag-stripping fallbacks (lines ~92-95) since descriptionText will be plain text.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/pages/plugins.astro`:
- Around line 43-46: The tutorial slug collection currently accumulates slugs
across all locales (tutorialSlugs) but link generation always uses the current
locale, causing 404s for tutorials only present in the default locale; update
the getCollection('plugin', ...) logic to record locale-specific availability
(e.g., map slug -> Set/locales or map locale -> Set) following the docs slugs
pattern used around the docs code at line 62, and when building tutorial links
compute tutorialLocale by checking whether the slug exists for the current
locale and falling back to defaultLocale if not (mirror the fallback logic used
for docs slugs between lines ~50–67); update any template code that references
tutorialSlugs/getSlug to use this locale-aware map so URLs point to the correct
locale or defaultLocale.

---

Nitpick comments:
In `@src/pages/plugins.astro`:
- Around line 58-68: The code maps pluginsWithStars and currently overwrites
description with marked HTML which breaks search and JSON-LD consumers; change
the mapping in the pluginsWithStars.map callback to produce two fields:
descriptionHtml (await marked.parse(item.description)) and descriptionText (the
original plain-text item.description or its trimmed/normalized text), then
update downstream usages: point any template set:html bindings to
descriptionHtml, use descriptionText for data-description attributes and for
ItemList descriptions/JSON-LD builders, and remove any tag-stripping fallbacks
(lines ~92-95) since descriptionText will be plain text.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: adb1cf83-5767-4978-80fd-5ecc4e6e63fe

📥 Commits

Reviewing files that changed from the base of the PR and between 2e44574 and ef8ce16.

📒 Files selected for processing (6)
  • src/components/doc/PluginOverview.astro
  • src/components/doc/PluginSetupSteps.astro
  • src/components/doc/PluginsDirectory.astro
  • src/content/docs/docs/plugins/supabase/getting-started.mdx
  • src/pages/plugins.astro
  • src/services/pluginDocs.ts
✅ Files skipped from review due to trivial changes (1)
  • src/content/docs/docs/plugins/supabase/getting-started.mdx
🚧 Files skipped from review as they are similar to previous changes (4)
  • src/components/doc/PluginOverview.astro
  • src/components/doc/PluginsDirectory.astro
  • src/components/doc/PluginSetupSteps.astro
  • src/services/pluginDocs.ts

Copy link
Copy Markdown
Contributor

@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

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/content/plugins-tutorials/en/electron-updater.md`:
- Line 96: Update the user-facing bullet that currently reads "Keep the builtin
path stable and let the updater decide whether to load the shipped bundle or a
downloaded one." to use the hyphenated form "built-in" (i.e., "Keep the built-in
path stable...") so the wording is grammatically correct; locate and change the
phrase in the markdown content for the Electron updater guide where the sentence
appears.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 97b12451-f2c5-4ba0-a5dd-21d10123efb9

📥 Commits

Reviewing files that changed from the base of the PR and between ef8ce16 and 26efc43.

📒 Files selected for processing (14)
  • AGENTS.md
  • astro.config.mjs
  • src/config/plugins.ts
  • src/content/docs/docs/plugins/live-activities/getting-started.mdx
  • src/content/docs/docs/plugins/live-activities/index.mdx
  • src/content/docs/docs/plugins/twilio-video/getting-started.mdx
  • src/content/docs/docs/plugins/twilio-video/index.mdx
  • src/content/docs/docs/plugins/widget-kit/getting-started.mdx
  • src/content/docs/docs/plugins/widget-kit/index.mdx
  • src/content/plugins-tutorials/en/capacitor-live-activities.md
  • src/content/plugins-tutorials/en/capacitor-twilio-video.md
  • src/content/plugins-tutorials/en/capacitor-widget-kit.md
  • src/content/plugins-tutorials/en/electron-updater.md
  • src/data/npm-downloads.json
✅ Files skipped from review due to trivial changes (9)
  • src/content/docs/docs/plugins/twilio-video/index.mdx
  • src/content/docs/docs/plugins/widget-kit/index.mdx
  • src/content/docs/docs/plugins/live-activities/index.mdx
  • src/content/docs/docs/plugins/widget-kit/getting-started.mdx
  • src/content/plugins-tutorials/en/capacitor-live-activities.md
  • src/content/docs/docs/plugins/twilio-video/getting-started.mdx
  • src/content/plugins-tutorials/en/capacitor-twilio-video.md
  • src/content/plugins-tutorials/en/capacitor-widget-kit.md
  • src/content/docs/docs/plugins/live-activities/getting-started.mdx
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/data/npm-downloads.json
  • astro.config.mjs

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 45913e9541

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 8, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
59.4% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@riderx riderx merged commit 104bbc5 into main Apr 8, 2026
3 of 4 checks passed
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.

1 participant