Skip to content

Conversation

@coodos
Copy link
Contributor

@coodos coodos commented Jan 19, 2026

Description of change

Issue Number

closes #687

Type of change

  • Chore (refactoring, build scripts or anything else that isn't user-facing)

How the change has been tested

Change checklist

  • I have ensured that the CI Checks pass locally
  • I have removed any unnecessary logic
  • My code is well documented
  • I have signed my commits
  • My code follows the pattern of the application
  • I have self reviewed my code

Summary by CodeRabbit

  • New Features

    • Launched a new documentation site with Getting Started, W3DS Basics, W3DS Protocol, and Post Platform Guide.
    • Added automatic deploy workflow to publish the docs to GitHub Pages.
  • Documentation

    • Added guides, an interactive homepage features section, sidebar/navigation structure, and site tooling/usage instructions.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 19, 2026

📝 Walkthrough

Walkthrough

Adds a complete Docusaurus documentation site and CI/CD: site config, docs content, UI components, styles, pnpm workspace entry, and a GitHub Actions workflow that builds and deploys the site to GitHub Pages.

Changes

Cohort / File(s) Summary
GitHub Actions Deployment
​.github/workflows/docusaurus.yml
New workflow "Deploy to GitHub Pages": build job (checkout, Node 20, pnpm install in ./docs, pnpm build, upload docs/build) and deploy job (permissions, environment, uses actions/deploy-pages@v4). Triggers on push to dev/main.
Docusaurus config & workspace
docs/docusaurus.config.ts, docs/sidebars.ts, docs/package.json, docs/tsconfig.json, pnpm-workspace.yaml
Adds site config (typed TS export config), sidebars, docs package manifest/scripts/deps, editor TS config, and includes docs/ in pnpm workspace.
Documentation content & metadata
docs/README.md, docs/docs/.../*, docs/docs/*/_category_.json
New docs structure: Getting Started, W3DS Basics, W3DS Protocol, Post Platforms Guide; category JSON files and multiple markdown pages with front-matter/sidebar positions.
Docs ignore / build output
docs/.gitignore
Adds ignore patterns for node_modules, build, .docusaurus, env files, logs, and macOS artifacts.
Homepage UI & styling
docs/src/components/HomepageFeatures/*, docs/src/pages/index.tsx, docs/src/pages/index.module.css, docs/src/css/custom.css, docs/src/pages/markdown-page.md
New homepage React component, styles, CSS theme variables (light/dark), index page that redirects on mount, and an example markdown page.

Sequence Diagram(s)

sequenceDiagram
  participant Dev as Developer (push)
  participant GH as GitHub
  participant Runner as Actions Runner
  participant Build as Build Job (Node+pnpm)
  participant Art as Artifact Store
  participant Deploy as Deploy Job (actions/deploy-pages)
  participant Pages as GitHub Pages

  Dev->>GH: push to main/dev
  GH->>Runner: trigger workflow
  Runner->>Build: start build job
  Build->>Build: checkout + setup Node 20
  Build->>Build: pnpm install (./docs) & pnpm build
  Build->>Art: upload docs/build artifact
  Runner->>Deploy: start deploy job (depends on build)
  Deploy->>Art: download artifact
  Deploy->>Deploy: actions/deploy-pages@v4 deploy
  Deploy->>Pages: publish site
  Pages-->>GH: site updated
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested reviewers

  • sosweetham

Poem

🐰 I hopped through files both near and far,

Built pages bright beneath Node's star,
CI stitched the hops in flight,
Docs now bloom for day and night,
A tiny rabbit cheers—deploy's delight! 🎉

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Docs/bootstrap docusaurus' accurately reflects the main objective of bootstrapping a Docusaurus-based documentation site with all the related configuration and deployment files.
Description check ✅ Passed The PR description follows the repository template structure with Issue Number (#687), Type of change (Chore), and a Change checklist. However, the 'How the change has been tested' section is left blank.
Linked Issues check ✅ Passed The PR successfully implements the core objective from issue #687 by creating a complete Docusaurus-based documentation site with configuration files, documentation content, and GitHub Pages deployment workflow.
Out of Scope Changes check ✅ Passed All changes in this PR are directly related to bootstrapping Docusaurus documentation as specified in issue #687. The modification to pnpm-workspace.yaml and GitHub Actions workflow are necessary supporting changes.

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

✨ Finishing touches
  • 📝 Generate docstrings

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

🤖 Fix all issues with AI agents
In @.github/workflows/docusaurus.yml:
- Around line 39-57: The deploy job named "deploy" is running for pull_request
events where actions/deploy-pages@v4 fails; add a job-level conditional to run
only on push events by adding an if: github.event_name == 'push' to the deploy
job (the job with id 'deployment' that uses actions/deploy-pages@v4) so the step
is skipped for PR workflows.
- Around line 16-37: Remove the invalid working-directory keys from the uses
steps (actions/checkout@v4 and actions/setup-node@v4 and the upload action
step), leaving working-directory only on run steps (the "Install dependencies"
and "Build website" steps); keep actions/checkout@v4 and actions/setup-node@v4
as plain uses steps, and for the "Upload Build Artifact" step update the
artifact path to point to the subdirectory (set with.path to ./app/build)
instead of relying on working-directory.

In `@docs/docs/W3DS` Basics/getting-started.md:
- Line 45: The sentence uses a bare URL which violates markdownlint MD034;
update the line in getting-started.md (the sentence containing
http://localhost:3000/) to wrap the URL in angle brackets like
<http://localhost:3000/> or convert it to a Markdown link (e.g.,
[http://localhost:3000/](http://localhost:3000/)) so the URL is not bare in the
Markdown source.

In `@docs/docusaurus.config.ts`:
- Around line 60-78: Update the navbar config to replace template placeholders:
change navbar.title from "My Site" to "W3DS Documentation", update
navbar.logo.alt to a project-specific string (e.g., "W3DS Logo"), and replace
the items[href] value that points to "https://github.com/facebook/docusaurus"
with the project’s GitHub URL; locate these fields under the navbar object
(title, logo.alt, and the items array entry with href) and update their values
accordingly.
- Around line 47-48: The editUrl in the Docusaurus site config is pointing to
the upstream template repo; update the editUrl property in
docs/docusaurus.config.ts (the editUrl field) to the correct URL for this
repository's docs source (e.g., the GitHub tree/path for the repo and docs
directory) so the "Edit this page" links point to this project's repo instead of
facebook/docusaurus.
- Around line 86-93: Update the footer link and copyright text in
docusaurus.config.ts: change the 'to' value for the footer item with label
'Tutorial' from '/docs/intro' to the actual doc path '/docs/getting-started' (or
the correct route that maps to getting-started.md) so the link resolves, and fix
the copyright string that contains "MetasState" to "MetaState" in the same
config constant.

In `@docs/README.md`:
- Around line 7-39: Update the README to align package manager commands with the
repository's pnpm workspace: replace or augment every occurrence of the yarn
commands (yarn, yarn start, yarn build, yarn deploy, USE_SSH=true yarn deploy,
GIT_USER=... yarn deploy) with their pnpm equivalents (or add a short note
stating that yarn is also supported), and add a brief note about running package
scripts from the docs package in a pnpm workspace (e.g., using pnpm --filter or
workspace run conventions) so contributors know which command to use in this
repo.

In `@docs/src/pages/index.tsx`:
- Line 1: Remove the unused useEffect import and the empty effect call: edit the
import statement to drop useEffect (keep ReactNode if used elsewhere) and remove
the no-op useEffect hook invocation (search for useEffect(...) in this file).
Ensure the component references (e.g., ReactNode) remain unchanged and no other
logic depends on the removed hook.
- Around line 11-34: Delete the empty useEffect call inside the HomepageHeader
component (remove the lines containing useEffect(() => { }, []) ) since it
serves no purpose; after removing it, also remove the unused useEffect import
from React (or adjust the import statement in the file) to avoid unused-import
warnings.
🧹 Nitpick comments (8)
docs/docs/W3DS Protocol/_category_.json (1)

1-7: Directory name contains a space.

The directory W3DS Protocol contains a space, which will result in URL-encoded paths (e.g., /W3DS%20Protocol/). Consider using kebab-case (w3ds-protocol) for cleaner URLs and avoiding potential path issues.

If you prefer to keep the directory name as-is for display purposes, you can use the slug property in the category configuration to customize the URL path while retaining the readable label.

docs/src/pages/markdown-page.md (1)

1-7: Remove or customize boilerplate example page.

This appears to be a scaffold placeholder from create-docusaurus. Consider removing this file before merging, or replacing it with actual project content to avoid publishing template pages to the documentation site.

docs/docs/Getting Started/_category_.json (1)

1-7: Same directory naming consideration applies.

Similar to the W3DS Protocol category, consider using kebab-case (getting-started) for the directory name to produce cleaner URLs. Configuration structure is correct otherwise.

docs/.gitignore (1)

18-20: Consider adding pnpm debug log pattern.

Since this project uses pnpm (per pnpm-workspace.yaml), consider adding pnpm-debug.log* for consistency with the other package manager debug logs.

Suggested addition
 npm-debug.log*
 yarn-debug.log*
 yarn-error.log*
+pnpm-debug.log*
docs/docs/Getting Started/getting-started.md (1)

1-47: Boilerplate content should be customized for W3DS documentation.

This page contains the default Docusaurus tutorial content rather than project-specific documentation. Since this is the "Getting Started" section for W3DS Documentation, consider replacing this with actual W3DS getting started content.

Additionally, Line 47 references docs/intro.md which doesn't match the actual file structure (getting-started.md).

docs/docs/W3DS Protocol/getting-started.md (1)

1-47: Duplicate boilerplate content - needs protocol-specific documentation.

This file is identical to docs/docs/Getting Started/getting-started.md. The W3DS Protocol section should contain protocol-specific documentation rather than duplicated generic Docusaurus tutorial content.

Consider either:

  1. Adding actual W3DS Protocol documentation
  2. Removing this placeholder until real content is ready
docs/src/pages/index.tsx (1)

25-29: Update link destination and button text for W3DS.

The button links to /docs/intro which may not exist in the current structure, and the text references "Docusaurus Tutorial" rather than W3DS documentation.

Suggested fix
                     <Link
                         className="button button--secondary button--lg"
-                        to="/docs/intro">
-                        Docusaurus Tutorial - 5min ⏱️
+                        to="/docs/Getting Started/getting-started">
+                        Get Started with W3DS ⏱️
                     </Link>
docs/src/components/HomepageFeatures/index.tsx (1)

12-43: Update feature content to reflect W3DS documentation.

The feature list contains generic Docusaurus boilerplate. These should be updated to reflect W3DS-specific features and value propositions (e.g., "Easy to Use" and "Powered by React" currently describe Docusaurus, not W3DS).


The `cd` command changes the directory you're working with. In order to work with your newly created Docusaurus site, you'll need to navigate the terminal there.

The `npm run start` command builds your website locally and serves it through a development server, ready for you to view at http://localhost:3000/.
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Avoid bare URL to satisfy markdownlint (MD034).

Wrap the URL in angle brackets or a Markdown link.

✏️ Suggested fix
-The `npm run start` command builds your website locally and serves it through a development server, ready for you to view at http://localhost:3000/.
+The `npm run start` command builds your website locally and serves it through a development server, ready for you to view at <http://localhost:3000/>.
📝 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
The `npm run start` command builds your website locally and serves it through a development server, ready for you to view at http://localhost:3000/.
The `npm run start` command builds your website locally and serves it through a development server, ready for you to view at <http://localhost:3000/>.
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

45-45: Bare URL used

(MD034, no-bare-urls)

🤖 Prompt for AI Agents
In `@docs/docs/W3DS` Basics/getting-started.md at line 45, The sentence uses a
bare URL which violates markdownlint MD034; update the line in
getting-started.md (the sentence containing http://localhost:3000/) to wrap the
URL in angle brackets like <http://localhost:3000/> or convert it to a Markdown
link (e.g., [http://localhost:3000/](http://localhost:3000/)) so the URL is not
bare in the Markdown source.

Comment on lines +47 to +48
editUrl:
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Update editUrl to point to this repository.

The editUrl currently points to Facebook's Docusaurus template repository. This should be updated to enable proper "Edit this page" functionality.

Suggested fix
                     editUrl:
-                        'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
+                        'https://github.com/MetaState-Prototype-Project/prototype/tree/main/docs/',
📝 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
editUrl:
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
editUrl:
'https://github.com/MetaState-Prototype-Project/prototype/tree/main/docs/',
🤖 Prompt for AI Agents
In `@docs/docusaurus.config.ts` around lines 47 - 48, The editUrl in the
Docusaurus site config is pointing to the upstream template repo; update the
editUrl property in docs/docusaurus.config.ts (the editUrl field) to the correct
URL for this repository's docs source (e.g., the GitHub tree/path for the repo
and docs directory) so the "Edit this page" links point to this project's repo
instead of facebook/docusaurus.

Comment on lines 60 to 78
navbar: {
title: 'My Site',
logo: {
alt: 'My Site Logo',
src: 'img/logo.svg',
},
items: [
{
type: 'docSidebar',
sidebarId: 'tutorialSidebar',
position: 'left',
label: 'Tutorial',
},
{
href: 'https://github.com/facebook/docusaurus',
label: 'GitHub',
position: 'right',
},
],
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Update placeholder values in navbar configuration.

Several navbar values are still using Docusaurus template defaults:

  • Line 61: Title is "My Site" instead of "W3DS Documentation"
  • Line 63: Logo alt text should be project-specific
  • Line 74: GitHub link points to facebook/docusaurus instead of this project
Suggested fix
         navbar: {
-            title: 'My Site',
+            title: 'W3DS Documentation',
             logo: {
-                alt: 'My Site Logo',
+                alt: 'W3DS Logo',
                 src: 'img/logo.svg',
             },
             items: [
                 {
                     type: 'docSidebar',
                     sidebarId: 'tutorialSidebar',
                     position: 'left',
                     label: 'Tutorial',
                 },
                 {
-                    href: 'https://github.com/facebook/docusaurus',
+                    href: 'https://github.com/MetaState-Prototype-Project/prototype',
                     label: 'GitHub',
                     position: 'right',
                 },
             ],
         },
📝 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
navbar: {
title: 'My Site',
logo: {
alt: 'My Site Logo',
src: 'img/logo.svg',
},
items: [
{
type: 'docSidebar',
sidebarId: 'tutorialSidebar',
position: 'left',
label: 'Tutorial',
},
{
href: 'https://github.com/facebook/docusaurus',
label: 'GitHub',
position: 'right',
},
],
navbar: {
title: 'W3DS Documentation',
logo: {
alt: 'W3DS Logo',
src: 'img/logo.svg',
},
items: [
{
type: 'docSidebar',
sidebarId: 'tutorialSidebar',
position: 'left',
label: 'Tutorial',
},
{
href: 'https://github.com/MetaState-Prototype-Project/prototype',
label: 'GitHub',
position: 'right',
},
],
🤖 Prompt for AI Agents
In `@docs/docusaurus.config.ts` around lines 60 - 78, Update the navbar config to
replace template placeholders: change navbar.title from "My Site" to "W3DS
Documentation", update navbar.logo.alt to a project-specific string (e.g., "W3DS
Logo"), and replace the items[href] value that points to
"https://github.com/facebook/docusaurus" with the project’s GitHub URL; locate
these fields under the navbar object (title, logo.alt, and the items array entry
with href) and update their values accordingly.

Comment on lines 86 to 93
{
label: 'Tutorial',
to: '/docs/intro',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} Stichting MetasState Foundation. Built with Docusaurus.`,
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix footer link and typo in copyright.

  • Line 88: The footer link /docs/intro may not resolve correctly given the actual doc structure uses getting-started.md
  • Line 93: Typo "MetasState" should be "MetaState"
Suggested fix
                         {
                             label: 'Tutorial',
-                            to: '/docs/intro',
+                            to: '/docs/Getting Started/getting-started',
                         },
                     ],
                 },
             ],
-            copyright: `Copyright © ${new Date().getFullYear()} Stichting MetasState Foundation. Built with Docusaurus.`,
+            copyright: `Copyright © ${new Date().getFullYear()} Stichting MetaState Foundation. Built with Docusaurus.`,
         },
🤖 Prompt for AI Agents
In `@docs/docusaurus.config.ts` around lines 86 - 93, Update the footer link and
copyright text in docusaurus.config.ts: change the 'to' value for the footer
item with label 'Tutorial' from '/docs/intro' to the actual doc path
'/docs/getting-started' (or the correct route that maps to getting-started.md)
so the link resolves, and fix the copyright string that contains "MetasState" to
"MetaState" in the same config constant.

Comment on lines +7 to +39
```bash
yarn
```

## Local Development

```bash
yarn start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

## Build

```bash
yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

## Deployment

Using SSH:

```bash
USE_SSH=true yarn deploy
```

Not using SSH:

```bash
GIT_USER=<Your GitHub username> yarn deploy
```
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Align commands with the workspace package manager.

Since the repo is configured as a pnpm workspace, consider adding pnpm equivalents (or clarifying yarn is supported) to prevent setup confusion.

📝 Suggested clarification
 ## Installation

 ```bash
 yarn

+If your workspace standardizes on pnpm, use the equivalent pnpm commands.

Local Development

yarn start

+If using pnpm in the workspace, run the equivalent pnpm start command for the docs package.

</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

In @docs/README.md around lines 7 - 39, Update the README to align package
manager commands with the repository's pnpm workspace: replace or augment every
occurrence of the yarn commands (yarn, yarn start, yarn build, yarn deploy,
USE_SSH=true yarn deploy, GIT_USER=... yarn deploy) with their pnpm equivalents
(or add a short note stating that yarn is also supported), and add a brief note
about running package scripts from the docs package in a pnpm workspace (e.g.,
using pnpm --filter or workspace run conventions) so contributors know which
command to use in this repo.


</details>

<!-- fingerprinting:phantom:poseidon:eagle -->

<!-- This is an auto-generated comment by CodeRabbit -->

@@ -0,0 +1,48 @@
import { useEffect, type ReactNode } from 'react';
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Remove unused useEffect import.

The useEffect hook is imported but not meaningfully used (the effect on lines 13-14 is empty).

Suggested fix
-import { useEffect, type ReactNode } from 'react';
+import type { ReactNode } from 'react';
🤖 Prompt for AI Agents
In `@docs/src/pages/index.tsx` at line 1, Remove the unused useEffect import and
the empty effect call: edit the import statement to drop useEffect (keep
ReactNode if used elsewhere) and remove the no-op useEffect hook invocation
(search for useEffect(...) in this file). Ensure the component references (e.g.,
ReactNode) remain unchanged and no other logic depends on the removed hook.

Comment on lines 11 to 34
function HomepageHeader() {

useEffect(() => {
}, [])

const { siteConfig } = useDocusaurusContext();
return (
<header className={clsx('hero hero--primary', styles.heroBanner)}>
<div className="container">
<Heading as="h1" className="hero__title">
{siteConfig.title}
</Heading>
<p className="hero__subtitle">{siteConfig.tagline}</p>
<div className={styles.buttons}>
<Link
className="button button--secondary button--lg"
to="/docs/intro">
Docusaurus Tutorial - 5min ⏱️
</Link>
</div>
</div>
</header>
);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Remove empty useEffect hook.

The useEffect on lines 13-14 has no body and serves no purpose. This appears to be leftover scaffolding code.

Suggested fix
 function HomepageHeader() {
-
-    useEffect(() => {
-    }, [])
-
     const { siteConfig } = useDocusaurusContext();
     return (
📝 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
function HomepageHeader() {
useEffect(() => {
}, [])
const { siteConfig } = useDocusaurusContext();
return (
<header className={clsx('hero hero--primary', styles.heroBanner)}>
<div className="container">
<Heading as="h1" className="hero__title">
{siteConfig.title}
</Heading>
<p className="hero__subtitle">{siteConfig.tagline}</p>
<div className={styles.buttons}>
<Link
className="button button--secondary button--lg"
to="/docs/intro">
Docusaurus Tutorial - 5min ⏱️
</Link>
</div>
</div>
</header>
);
}
function HomepageHeader() {
const { siteConfig } = useDocusaurusContext();
return (
<header className={clsx('hero hero--primary', styles.heroBanner)}>
<div className="container">
<Heading as="h1" className="hero__title">
{siteConfig.title}
</Heading>
<p className="hero__subtitle">{siteConfig.tagline}</p>
<div className={styles.buttons}>
<Link
className="button button--secondary button--lg"
to="/docs/intro">
Docusaurus Tutorial - 5min ⏱️
</Link>
</div>
</div>
</header>
);
}
🤖 Prompt for AI Agents
In `@docs/src/pages/index.tsx` around lines 11 - 34, Delete the empty useEffect
call inside the HomepageHeader component (remove the lines containing
useEffect(() => { }, []) ) since it serves no purpose; after removing it, also
remove the unused useEffect import from React (or adjust the import statement in
the file) to avoid unused-import warnings.

@coodos coodos merged commit 12d07a1 into main Jan 19, 2026
3 of 4 checks passed
@coodos coodos deleted the docs/bootstrap-docusaurus branch January 19, 2026 10:44
Copy link
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

🤖 Fix all issues with AI agents
In `@docs/src/pages/index.tsx`:
- Line 17: Remove the stray standalone expression "useHistory" from the file
(it's a no-op and triggers no-unused-expressions); locate the occurrence in
docs/src/pages/index.tsx (the lone useHistory token not used in any expression
or hook call) and delete it, and also remove any unused import of useHistory if
it was imported but is no longer used.
🧹 Nitpick comments (3)
.github/workflows/docusaurus.yml (1)

17-27: Use pnpm/action-setup before setup-node for proper caching integration.

The current workflow installs pnpm globally without caching or version pinning on every run. Instead, use pnpm/action-setup before setup-node to enable caching and ensure consistent pnpm versions. The order matters: pnpm/action-setup must be installed first so the store path exists before setup-node attempts cache restoration.

♻️ Suggested improvement
       - uses: actions/checkout@v4
         with:
           fetch-depth: 0
+      - uses: pnpm/action-setup@v4
+        with:
+          version: 10
       - uses: actions/setup-node@v4
         with:
           node-version: 20
+          cache: pnpm

       - name: Install Dependencies
         working-directory: ./docs
         run: |
-          echo "installing pnpm"
-          npm install -g pnpm
-          echo "installing deps for packages"
           pnpm i

Adjust pnpm version to match your project's requirements (10 is current as of 2025).

docs/src/pages/index.tsx (2)

13-15: Include history in the effect dependency array.

Prevents stale closures and avoids hook-lint failures.

♻️ Proposed fix
-    useEffect(() => {
-        history.push("/prototype/docs/Getting Started/getting-started")
-    }, [])
+    useEffect(() => {
+        history.push("/prototype/docs/Getting Started/getting-started")
+    }, [history])

9-15: Avoid hard-coded baseUrl + space in path; verify the actual docs route.

The redirect includes a hard-coded /prototype and a space in the path. Docusaurus routing often depends on baseUrl and slug normalization/encoding, so this can 404 across environments. Please verify the generated URL and consider useBaseUrl (or an encoded path) to keep it portable.

♻️ Possible approach
+import useBaseUrl from '@docusaurus/useBaseUrl';
@@
-    useEffect(() => {
-        history.push("/prototype/docs/Getting Started/getting-started")
-    }, [history])
+    const target = useBaseUrl('/docs/Getting%20Started/getting-started');
+    useEffect(() => {
+        history.push(target);
+    }, [history, target])

history.push("/prototype/docs/Getting Started/getting-started")
}, [])

useHistory
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Remove the stray useHistory expression.

It’s a no-op and can trip no-unused-expressions lint.

🧹 Proposed fix
-    useHistory
📝 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
useHistory
🤖 Prompt for AI Agents
In `@docs/src/pages/index.tsx` at line 17, Remove the stray standalone expression
"useHistory" from the file (it's a no-op and triggers no-unused-expressions);
locate the occurrence in docs/src/pages/index.tsx (the lone useHistory token not
used in any expression or hook call) and delete it, and also remove any unused
import of useHistory if it was imported but is no longer used.

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.

[feature] Docusaurus Deployment

3 participants