Skip to content

chore: integrate @phenotype/docs#919

Merged
KooshaPari merged 1 commit intomainfrom
chore/integrate-phenotype-docs
Mar 26, 2026
Merged

chore: integrate @phenotype/docs#919
KooshaPari merged 1 commit intomainfrom
chore/integrate-phenotype-docs

Conversation

@KooshaPari
Copy link
Copy Markdown
Owner

@KooshaPari KooshaPari commented Mar 26, 2026

Summary

  • Add phenodocs git submodule at vendor/phenodocs
  • Update VitePress config to use createPhenotypeConfig() from @phenotype/docs/config
  • Update theme to re-export from @phenotype/docs/theme
  • Add file: dependency and .npmrc for GitHub Packages

Test plan

  • Run cd docs && bun install && bun run build to verify VitePress builds

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Refactored documentation configuration and theme setup to use a centralized factory pattern from a shared package.
    • Updated npm dependency management and build scripts for the documentation package.
    • Added Git submodule integration for vendored documentation tools.

Add phenodocs git submodule, update VitePress config to use
createPhenotypeConfig(), theme to export from @phenotype/docs/theme,
and package.json to use file: dependency.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gemini-code-assist
Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 26, 2026

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key(s) in object: 'pre_merge_checks'
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
📝 Walkthrough

Walkthrough

Introduces a new Git submodule vendor/phenodocs and refactors the VitePress documentation setup to centralize configuration and theme management by delegating to the @phenotype/docs package, replacing local implementations with imports from the vendored dependency. Includes npm registry configuration and updated build scripts.

Changes

Cohort / File(s) Summary
Git Submodule Setup
.gitmodules, vendor/phenodocs, docs/.npmrc
Added Git submodule configuration for vendor/phenodocs pointing to the phenodocs repository, updated submodule pointer to commit 35e0e90, and configured npm to resolve @phenotype scope via GitHub Packages registry.
Documentation Build Configuration
docs/package.json
Renamed npm scripts from docs:* to shorter names (dev, build, preview), added postinstall hook to install dependencies within the phenodocs package, and declared @phenotype/docs as a local file dependency from ../vendor/phenodocs/packages/docs.
VitePress Theme & Config Refactoring
docs/.vitepress/config.ts, docs/.vitepress/theme/index.ts
Migrated local VitePress configuration to use createPhenotypeConfig from @phenotype/docs/config, restructured theme options into top-level fields, added dynamic base path for GitHub Actions deployments, and replaced local theme implementation with a re-export from @phenotype/docs/theme.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰 A vendor's gift of blessed phenodocs,
Now bundled neat in submodule box,
Config and themes, no longer spread,
Centralized wisdom, cleaner and fed. ✨

🚥 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 clearly summarizes the main change: integrating the @phenotype/docs package through configuration updates and submodule addition.
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
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/integrate-phenotype-docs

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
Copy Markdown

@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

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

Inline comments:
In `@docs/package.json`:
- Line 6: The postinstall script "postinstall": "cd
../vendor/phenodocs/packages/docs && bun install" unconditionally requires Bun
and breaks the pr-test-build.yml job; either make the postinstall script guard
the bun call (run bun install only if bun is available, e.g., check for
bun/command existence before invoking) or add a Bun setup step in the
pr-test-build.yml workflow before the npm install step so Bun is provisioned for
the docs postinstall; update either the "postinstall" script or the CI job
accordingly and ensure the change references the existing "postinstall" entry
and the docs-build/pr-test-build.yml npm install step.

In `@vendor/phenodocs`:
- Line 1: The vendor/phenodocs submodule points to a non-existent commit
`35e0e90a19dfd93ce4e1a81210ade92088b2bbbc`, causing fresh clones/CI to fail; fix
by either pushing that commit to the phenodocs remote or updating the submodule
reference to a valid commit already on the remote and committing the change.
Locate the submodule entry for vendor/phenodocs (the gitlink in the
index/.gitmodules and the working tree folder) and either (a) push the missing
commit to the remote branch referenced by the submodule, or (b) checkout a valid
commit on the phenodocs repo, run the submodule update (or git add the updated
submodule state) and commit the new gitlink so vendor/phenodocs points to an
existing remote commit instead of `35e0e90a19dfd93ce4e1a81210ade92088b2bbbc`.
🪄 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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 81f8bd0e-c382-42bc-94c3-acac50808a13

📥 Commits

Reviewing files that changed from the base of the PR and between a0ae985 and 388efd7.

📒 Files selected for processing (6)
  • .gitmodules
  • docs/.npmrc
  • docs/.vitepress/config.ts
  • docs/.vitepress/theme/index.ts
  • docs/package.json
  • vendor/phenodocs

Comment thread docs/package.json
"docs:dev": "vitepress dev .",
"docs:build": "vitepress build .",
"docs:preview": "vitepress preview ."
"postinstall": "cd ../vendor/phenodocs/packages/docs && bun install",
Copy link
Copy Markdown

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:

#!/bin/bash
set -euo pipefail

# Verify whether CI/workflows provision Bun before dependency installation
rg -n -C3 '\bbun\b|npm|pnpm|yarn|install|docs' .github/workflows || true

# Verify current toolchain declarations
rg -n -C3 '"postinstall"|packageManager|engines|bun install' docs/package.json package.json || true

Repository: KooshaPari/cliproxyapi-plusplus

Length of output: 10601


postinstall unconditionally requires Bun and breaks CI in pr-test-build.yml.

Line 6 executes bun install unconditionally. In .github/workflows/pr-test-build.yml, the docs-build job runs npm install without provisioning Bun first (lines 364), causing the postinstall hook to fail.

The docs.yml workflow mitigates this by setting up Bun before npm install (lines 31–37), but pr-test-build.yml does not.

Add Bun setup to pr-test-build.yml before the npm install step, or declare the toolchain requirement explicitly:

Suggested changes to docs/package.json
 {
   "name": "cliproxyapi-plusplus-docs",
   "private": true,
   "type": "module",
+  "packageManager": "bun@1.2.0",
+  "engines": {
+    "bun": ">=1.2.0"
+  },
   "scripts": {
     "postinstall": "cd ../vendor/phenodocs/packages/docs && bun install",
     "dev": "vitepress dev .",
     "build": "vitepress build .",
     "preview": "vitepress preview ."
   },
📝 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
"postinstall": "cd ../vendor/phenodocs/packages/docs && bun install",
{
"name": "cliproxyapi-plusplus-docs",
"private": true,
"type": "module",
"packageManager": "bun@1.2.0",
"engines": {
"bun": ">=1.2.0"
},
"scripts": {
"postinstall": "cd ../vendor/phenodocs/packages/docs && bun install",
"dev": "vitepress dev .",
"build": "vitepress build .",
"preview": "vitepress preview ."
},
}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/package.json` at line 6, The postinstall script "postinstall": "cd
../vendor/phenodocs/packages/docs && bun install" unconditionally requires Bun
and breaks the pr-test-build.yml job; either make the postinstall script guard
the bun call (run bun install only if bun is available, e.g., check for
bun/command existence before invoking) or add a Bun setup step in the
pr-test-build.yml workflow before the npm install step so Bun is provisioned for
the docs postinstall; update either the "postinstall" script or the CI job
accordingly and ensure the change references the existing "postinstall" entry
and the docs-build/pr-test-build.yml npm install step.

Comment thread vendor/phenodocs
@@ -0,0 +1 @@
Subproject commit 35e0e90a19dfd93ce4e1a81210ade92088b2bbbc
Copy link
Copy Markdown

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:

#!/bin/bash
set -euo pipefail

echo "Checking submodule URL from .gitmodules..."
git config -f .gitmodules --get submodule.vendor/phenodocs.url

SUBMODULE_URL="$(git config -f .gitmodules --get submodule.vendor/phenodocs.url)"
PINNED_COMMIT="$(git ls-tree HEAD vendor/phenodocs | awk '{print $3}')"

echo "Pinned commit: ${PINNED_COMMIT}"
echo "Remote URL: ${SUBMODULE_URL}"

echo "Verifying commit exists on remote..."
if git ls-remote "${SUBMODULE_URL}" "${PINNED_COMMIT}" | grep -q "${PINNED_COMMIT}"; then
  echo "OK: commit is reachable on remote."
else
  echo "FAIL: commit is NOT reachable on remote."
  exit 1
fi

Repository: KooshaPari/cliproxyapi-plusplus

Length of output: 351


Fix unreachable submodule commit.

Commit 35e0e90a19dfd93ce4e1a81210ade92088b2bbbc referenced in vendor/phenodocs does not exist on the remote repository. This will break fresh clones and CI builds during submodule initialization. Either push the commit to the remote or point to a commit that is already available.

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

In `@vendor/phenodocs` at line 1, The vendor/phenodocs submodule points to a
non-existent commit `35e0e90a19dfd93ce4e1a81210ade92088b2bbbc`, causing fresh
clones/CI to fail; fix by either pushing that commit to the phenodocs remote or
updating the submodule reference to a valid commit already on the remote and
committing the change. Locate the submodule entry for vendor/phenodocs (the
gitlink in the index/.gitmodules and the working tree folder) and either (a)
push the missing commit to the remote branch referenced by the submodule, or (b)
checkout a valid commit on the phenodocs repo, run the submodule update (or git
add the updated submodule state) and commit the new gitlink so vendor/phenodocs
points to an existing remote commit instead of
`35e0e90a19dfd93ce4e1a81210ade92088b2bbbc`.

@KooshaPari KooshaPari merged commit e8aa374 into main Mar 26, 2026
1 check passed
@KooshaPari KooshaPari deleted the chore/integrate-phenotype-docs branch March 29, 2026 07:09
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