Skip to content

docs: Add VitePress community, development, and search localization updates - #163

Open
claycuy wants to merge 20 commits into
mainfrom
docs
Open

docs: Add VitePress community, development, and search localization updates#163
claycuy wants to merge 20 commits into
mainfrom
docs

Conversation

@claycuy

@claycuy claycuy commented Jul 26, 2026

Copy link
Copy Markdown
Collaborator

What did you change?

Change type

  • Fix (Bug/Patch)
  • Feature (New Feature)
  • Refactor (Code Polish)
  • Docs (Documentation)
  • Chore (Build/Maintenance)

Checklist

  • I have done tests on this change
  • The code is in accordance with the project style guide.
  • I have updated the documentation if necessary.

Link Issue (if any)

Summary by CodeRabbit

  • New Features
    • Added localized search UI strings for English and Indonesian docs.
    • Added “Community” and “Development” sections to the navigation.
    • Introduced PWA support with compressed assets for improved load performance.
  • Bug Fixes
    • Improved forum page rendering to properly load the forum component.
  • Documentation
    • Updated navigation/sidebars by removing “Support Levels” and adjusting support/community links.
    • Updated API docs and examples to use Tick/Halt/Panic.
    • Refreshed footer license/copyright links and updated site statistics.
    • Updated README to direct users to the official documentation.

@vercel

vercel Bot commented Jul 26, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
lightvm Ready Ready Preview, Comment Jul 28, 2026 1:57pm

@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

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

The documentation site gains localized search strings, expanded navigation, updated footer links, async forum components, typed event examples, revised event names, Vite build plugins, updated type declarations, conditional CI installation, a documentation link, and refreshed statistics.

Changes

Documentation site configuration

Layer / File(s) Summary
Localized navigation and search configuration
docs/.vitepress/{config,en,id}.ts, docs/.vitepress/lang/{en,id}/*
Adds Community and Development navigation, updates support entries and sidebar routes, and configures English and Indonesian search translations.
Navigation and search type declarations
docs/types/{config,en,id}.d.ts, docs/types/lang/{en,id}/*
Adds declarations for localized search and navigation exports, sidebar structures, and explicit sidebar entry unions.
Site content rendering and attribution
docs/.vitepress/lang/{en,id}/base.ts, docs/{en,id}/forum.md
Links license and copyright footer text, and asynchronously loads the Forum component in both locales.

Event API documentation

Layer / File(s) Summary
Typed event examples and reference text
docs/{en,id}/api-reference/method-functions/on-method.md, docs/examples/methodFunctions/*
Capitalizes documented event names and changes TypeScript and Rust halt subscriptions to typed event constants.

Build tooling and documentation metrics

Layer / File(s) Summary
Vite build plugin configuration
package.json, vite.config.ts
Adds compression and PWA dependencies and configures Brotli compression, service-worker asset patterns, and bundle visualization.
Documentation statistics data
docs/data/stats.json
Updates weekly, all-time, and timestamp statistics.

Project documentation and CI

Layer / File(s) Summary
README and dependency installation
README.md, .github/workflows/ci.yml
Replaces the README content with an external documentation link and selects npm dependency installation based on lockfile presence.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Visitor
  participant VitePressSearch
  participant VitePressConfig
  participant LocaleSearchData
  Visitor->>VitePressSearch: Open localized documentation search
  VitePressSearch->>VitePressConfig: Read locale search mapping
  VitePressConfig->>LocaleSearchData: Select enUsSearch or idIdSearch
  LocaleSearchData-->>VitePressSearch: Provide localized UI translations
  VitePressSearch-->>Visitor: Render translated search interface
Loading

Possibly related PRs

Suggested labels: generated

Suggested reviewers: elderellerser

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main docs changes: new community/development navigation and search localization updates.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🧹 Nitpick comments (3)
vite.config.ts (2)

19-20: 🩺 Stability & Availability | 🔵 Trivial

Make browser launch opt-in.

open: true opens the generated report in the default browser. Gate this behind a non-CI condition or omit it so headless documentation builds do not attempt a GUI side effect. (github.com)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@vite.config.ts` around lines 19 - 20, Update the visualizer configuration to
make browser launching opt-in by removing open: true or setting it only when not
running in CI, while preserving the existing report generation behavior.

Source: MCP tools


8-10: 🩺 Stability & Availability | 🔵 Trivial

Verify deployment handling for .br files.

The compression plugin generates compressed sidecars but does not configure the static host/CDN. Ensure requests supporting Brotli are mapped to the .br file with the original Content-Type, Content-Encoding: br, and appropriate Vary: Accept-Encoding; otherwise the artifacts may be unused or served incorrectly. (github.com)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@vite.config.ts` around lines 8 - 10, Update the deployment configuration
associated with the Vite compression setup, including the viteCompression
configuration, so Brotli-capable requests resolve to the generated .br sidecar
while preserving the original Content-Type, setting Content-Encoding to br, and
adding Vary: Accept-Encoding; ensure the static host or CDN serves these
artifacts rather than relying solely on plugin generation.

Source: MCP tools

docs/.vitepress/lang/en/base.ts (1)

35-36: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Use explicit rel="noopener noreferrer" on all new-tab footer links.

  • docs/.vitepress/lang/en/base.ts#L35-L36: add rel to the Apache license and SoTeen Studio anchors.
  • docs/.vitepress/lang/id/base.ts#L35-L36: add the same rel attributes to both localized footer anchors.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/.vitepress/lang/en/base.ts` around lines 35 - 36, Add rel="noopener
noreferrer" to both new-tab footer anchors in docs/.vitepress/lang/en/base.ts
lines 35-36, and apply the same change to both localized footer anchors in
docs/.vitepress/lang/id/base.ts lines 35-36.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/.vitepress/en.ts`:
- Line 57: Update the removeRecentSearchButtonTitle localization string to use
“Remove from recent searches” instead of wording that implies adding the search.

In `@docs/.vitepress/id.ts`:
- Around line 31-35: Restore a sidebar mapping for the /id/support-levels route
in the sidebar configuration, using an appropriate existing sidebar or a
dedicated support-levels sidebar. Keep the existing mappings for
/id/get-started/, /id/api-reference/, and /id/concepts/ unchanged.

In `@docs/examples/methodFunctions/on_code.rs`:
- Around line 1-3: Update the VmEvent variant reference in the vm.on example to
use Rust’s enum path syntax, changing VmEvent.Halt to VmEvent::Halt while
preserving the surrounding callback.

In `@vite.config.ts`:
- Around line 6-26: Move the viteCompression and visualizer plugins from the
root Vite configuration into the VitePress configuration’s vite field so
docs:build applies them. Remove the standalone configuration if unused, and
relocate VitePWA to the VitePress-supported integration or client-only path
rather than registering it in the root plugins array.

---

Nitpick comments:
In `@docs/.vitepress/lang/en/base.ts`:
- Around line 35-36: Add rel="noopener noreferrer" to both new-tab footer
anchors in docs/.vitepress/lang/en/base.ts lines 35-36, and apply the same
change to both localized footer anchors in docs/.vitepress/lang/id/base.ts lines
35-36.

In `@vite.config.ts`:
- Around line 19-20: Update the visualizer configuration to make browser
launching opt-in by removing open: true or setting it only when not running in
CI, while preserving the existing report generation behavior.
- Around line 8-10: Update the deployment configuration associated with the Vite
compression setup, including the viteCompression configuration, so
Brotli-capable requests resolve to the generated .br sidecar while preserving
the original Content-Type, setting Content-Encoding to br, and adding Vary:
Accept-Encoding; ensure the static host or CDN serves these artifacts rather
than relying solely on plugin generation.
🪄 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.yml

Review profile: CHILL

Plan: Pro Plus

Run ID: 5eb5c279-dc23-43f8-a06a-54d38e88e89f

📥 Commits

Reviewing files that changed from the base of the PR and between a34500d and e811f9b.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (23)
  • docs/.vitepress/config.ts
  • docs/.vitepress/en.ts
  • docs/.vitepress/id.ts
  • docs/.vitepress/lang/en/base.ts
  • docs/.vitepress/lang/en/index.ts
  • docs/.vitepress/lang/en/navCommunity.ts
  • docs/.vitepress/lang/en/navDevelopment.ts
  • docs/.vitepress/lang/en/navSupport.ts
  • docs/.vitepress/lang/en/sidebarGetStarted.ts
  • docs/.vitepress/lang/id/base.ts
  • docs/.vitepress/lang/id/index.ts
  • docs/.vitepress/lang/id/navCommunity.ts
  • docs/.vitepress/lang/id/navDevelopment.ts
  • docs/.vitepress/lang/id/navSupport.ts
  • docs/data/stats.json
  • docs/en/api-reference/method-functions/on-method.md
  • docs/en/forum.md
  • docs/examples/methodFunctions/onCode.ts
  • docs/examples/methodFunctions/on_code.rs
  • docs/id/api-reference/method-functions/on-method.md
  • docs/id/forum.md
  • package.json
  • vite.config.ts
💤 Files with no reviewable changes (1)
  • docs/.vitepress/lang/en/sidebarGetStarted.ts

Comment thread docs/.vitepress/en.ts
recentSearchesTitle: 'Recent',
noRecentSearchesText: 'No recent searches',
saveRecentSearchButtonTitle: 'Save to recent searches',
removeRecentSearchButtonTitle: 'Remove to recent searches',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Fix the recent-search removal label.

Remove to recent searches implies adding the search; use Remove from recent searches.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/.vitepress/en.ts` at line 57, Update the removeRecentSearchButtonTitle
localization string to use “Remove from recent searches” instead of wording that
implies adding the search.

Comment thread docs/.vitepress/id.ts
Comment on lines 31 to 35
sidebar: {
'/id/get-started/': sidebarGetStarted,
'/id/api-reference/': sidebarAPIReferences,
'/id/concepts/': sidebarConcepts,
'/id/support-levels': sidebarGetStarted,
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Keep a sidebar mapping for /id/support-levels.

docs/.vitepress/lang/id/navSupport.ts still links users to /id/support-levels, but removing this mapping leaves the page unmatched because the remaining keys only cover /id/get-started/, /id/api-reference/, and /id/concepts/. Restore the route mapping or add a dedicated support-levels sidebar; the item inside sidebarGetStarted does not select a sidebar for the destination page.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/.vitepress/id.ts` around lines 31 - 35, Restore a sidebar mapping for
the /id/support-levels route in the sidebar configuration, using an appropriate
existing sidebar or a dedicated support-levels sidebar. Keep the existing
mappings for /id/get-started/, /id/api-reference/, and /id/concepts/ unchanged.

Comment thread docs/examples/methodFunctions/on_code.rs
Comment thread vite.config.ts
Comment on lines +6 to +26
export default defineConfig({
plugins: [
viteCompression({
algorithm: 'brotliCompress',
ext: '.br'
}),
VitePWA({
registerType: 'autoUpdate',
injectRegister: 'auto',
workbox: {
globPatterns: ['**/*.{ts,css,vue,md,html,svg}']
}
}),
visualizer({
open: true,
filename: 'stats.html',
gzipSize: true,
brotliSize: true
})
]
})

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== repo files relevant =="
git ls-files | sed -n '1,200p'
echo
echo "== vite.config.ts =="
if [ -f vite.config.ts ]; then
  nl -ba vite.config.ts | sed -n '1,120p'
fi
echo
echo "== docs/.vitepress presence =="
git ls-files 'docs/.vitepress/*' | sed -n '1,200p' | nl -ba
for f in docs/.vitepress/config.*; do
  if [ -f "$f" ]; then
    echo "-- $f ----------------------------------"
    nl -ba "$f" | sed -n '1,240p'
  fi
done
echo
echo "== config package references =="
rg -n "vitepress|--vitepress|-C|vite.config|docs/.vitepress|`@vite-pwa/vitepress`|`@vite-pwa`|workbox|brotli" -S . --glob '!node_modules' --glob '!dist' --glob '!build' || true
echo
echo "== package scripts =="
if [ -f package.json ]; then
  jq '.scripts, .dependencies, .devDependencies' package.json
fi

Repository: soteenstudio/lightvm

Length of output: 8570


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== tools availability =="
command -v sed || true
command -v rg || true

if [ -f vite.config.ts ]; then
  echo "== vite.config.ts =="
  sed -n '1,160p' vite.config.ts
fi

echo
echo "== docs/.vitepress/config.ts =="
if [ -f docs/.vitepress/config.ts ]; then
  sed -n '1,260p' docs/.vitepress/config.ts
fi

echo
echo "== package.json =="
if [ -f package.json ]; then
  sed -n '1,240p' package.json
fi

echo
echo "== references =="
rg -n "vitepress|--vitepress|-C|vite.config|docs/.vitepress|`@vite-pwa/vitepress`|`@vite-pwa`|workbox|brotli|compress" \
  -S . --glob '!node_modules' --glob '!dist' --glob '!build' || true

Repository: soteenstudio/lightvm

Length of output: 19670


Attach these plugins to the VitePress build configuration.

docs:build runs vitepress build docs, which uses docs/.vitepress/config.ts; the root vite.config.ts is not loaded by that path. Move the compression/visualizer setup into the VitePress vite field or remove this standalone config, and wire PWA through the VitePress integration/client-only path instead of VitePWA here.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@vite.config.ts` around lines 6 - 26, Move the viteCompression and visualizer
plugins from the root Vite configuration into the VitePress configuration’s vite
field so docs:build applies them. Remove the standalone configuration if unused,
and relocate VitePWA to the VitePress-supported integration or client-only path
rather than registering it in the root plugins array.

Source: MCP tools

@claycuy
claycuy requested a review from Elderellerser July 26, 2026 02:42
@claycuy

claycuy commented Jul 26, 2026

Copy link
Copy Markdown
Collaborator Author

@Elderellerser Review this when I'm done

@claycuy claycuy changed the title Update documentation docs: Add VitePress community, development, and search localization updates Jul 26, 2026
@claycuy

claycuy commented Jul 26, 2026

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@claycuy

claycuy commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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 (1)
docs/types/en.d.ts (1)

3-42: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use two-space indentation across the new declarations.

All listed declaration blocks use four-space indentation, violating the repository-wide formatting rule. As per coding guidelines, **/* files must always use 2 spaces for indentation.

  • docs/types/en.d.ts#L3-L42: reindent nested enUsSearch members to two-space levels.
  • docs/types/id.d.ts#L3-L42: reindent nested idIdSearch members to two-space levels.
  • docs/types/lang/en/navCommunity.d.ts#L2-L6: reindent navigation fields and items.
  • docs/types/lang/id/navDevelopment.d.ts#L2-L6: reindent navigation fields and items.
  • docs/types/lang/id/sidebarInstructionSet.d.ts#L2-L7: reindent sidebar fields and items.
  • docs/types/lang/id/sidebarMethodFunctions.d.ts#L2-L17: reindent both union branches and nested items.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/types/en.d.ts` around lines 3 - 42, Reindent all new declaration members
to two-space indentation without changing their types or structure: update
docs/types/en.d.ts lines 3-42 and docs/types/id.d.ts lines 3-42 for the nested
search translation declarations, docs/types/lang/en/navCommunity.d.ts lines 2-6
and docs/types/lang/id/navDevelopment.d.ts lines 2-6 for navigation fields and
items, docs/types/lang/id/sidebarInstructionSet.d.ts lines 2-7 for sidebar
fields and items, and docs/types/lang/id/sidebarMethodFunctions.d.ts lines 2-17
for both union branches and nested items.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/types/config.d.ts`:
- Line 1: Update the _default declaration to use UserConfig<DefaultTheme.Config>
instead of UserConfig<any>, preserving DefaultTheme.Config type-checking for
themeConfig while intersecting any existing custom theme fields required by the
configuration.

In `@docs/types/lang/en/navDevelopment.d.ts`:
- Around line 2-6: Normalize the nested declaration indentation to two spaces in
docs/types/lang/en/navDevelopment.d.ts lines 2-6,
docs/types/lang/id/navCommunity.d.ts lines 2-6,
docs/types/lang/en/sidebarAPIReferences.d.ts lines 19-24,
docs/types/lang/en/sidebarInstructionSet.d.ts lines 2-7,
docs/types/lang/en/sidebarMethodFunctions.d.ts lines 2-17, and
docs/types/lang/id/sidebarAPIReferences.d.ts lines 19-24; preserve the existing
declaration structure and content while applying two-space indentation
consistently.

---

Nitpick comments:
In `@docs/types/en.d.ts`:
- Around line 3-42: Reindent all new declaration members to two-space
indentation without changing their types or structure: update docs/types/en.d.ts
lines 3-42 and docs/types/id.d.ts lines 3-42 for the nested search translation
declarations, docs/types/lang/en/navCommunity.d.ts lines 2-6 and
docs/types/lang/id/navDevelopment.d.ts lines 2-6 for navigation fields and
items, docs/types/lang/id/sidebarInstructionSet.d.ts lines 2-7 for sidebar
fields and items, and docs/types/lang/id/sidebarMethodFunctions.d.ts lines 2-17
for both union branches and nested items.
🪄 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.yml

Review profile: CHILL

Plan: Pro Plus

Run ID: 326ca25a-9da0-4b72-af81-93f86c3ab5c6

📥 Commits

Reviewing files that changed from the base of the PR and between e811f9b and 6b98b8e.

📒 Files selected for processing (15)
  • docs/types/config.d.ts
  • docs/types/en.d.ts
  • docs/types/id.d.ts
  • docs/types/lang/en/index.d.ts
  • docs/types/lang/en/navCommunity.d.ts
  • docs/types/lang/en/navDevelopment.d.ts
  • docs/types/lang/en/sidebarAPIReferences.d.ts
  • docs/types/lang/en/sidebarInstructionSet.d.ts
  • docs/types/lang/en/sidebarMethodFunctions.d.ts
  • docs/types/lang/id/index.d.ts
  • docs/types/lang/id/navCommunity.d.ts
  • docs/types/lang/id/navDevelopment.d.ts
  • docs/types/lang/id/sidebarAPIReferences.d.ts
  • docs/types/lang/id/sidebarInstructionSet.d.ts
  • docs/types/lang/id/sidebarMethodFunctions.d.ts

Comment thread docs/types/config.d.ts
@@ -1,2 +1,2 @@
declare const _default: import("vitepress").UserConfig<import("vitepress").DefaultTheme.Config>;
declare const _default: import("vitepress").UserConfig<any>;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== files =="
git ls-files | sed -n '1,120p'

echo "== relevant files =="
fd -a 'config\.d\.ts|package\.json|*.vitepress|package-lock.json|pnpm-lock.yaml|yarn.lock|bun.lockb' . | sed 's#^\./##' | sed -n '1,120p'

echo "== docs/types/config.d.ts =="
if [ -f docs/types/config.d.ts ]; then
  cat -n docs/types/config.d.ts
fi

echo "== package info =="
for f in package.json docs/types/config.d.ts; do
  [ -f "$f" ] && { echo "--- $f"; cat -n "$f"; }
done

echo "== search UserConfig usage =="
rg -n "UserConfig|DefaultTheme|themeConfig|docs/types/config" . --glob '!node_modules' --glob '!dist' --glob '!build' || true

Repository: soteenstudio/lightvm

Length of output: 4984


🏁 Script executed:

#!/bin/bash
set -euo pipefail
git ls-files | rg 'docs/types/config\.d\.ts|package\.json|package-lock\.json|pnpm-lock\.yaml|yarn\.lock|bun\.lockb|docs/.vitepress/config\.ts|docs/.vitepress/(theme/index\.ts|env\.d\.ts)' || true

echo "== docs/types/config.d.ts =="
if [ -f docs/types/config.d.ts ]; then
  cat -n docs/types/config.d.ts
else
  echo "missing docs/types/config.d.ts"
fi

echo "== vitepress package declarations =="
fd -e json -e lock -e yaml package.json docs -x sh -c 'echo "--- $1"; sed -n "1,220p" "$1"' sh {} | sed -n '1,240p'

echo "== docs config relevant =="
for f in docs/.vitepress/config.ts docs/.vitepress/theme/index.ts docs/.vitepress/env.d.ts; do
  [ -f "$f" ] && { echo "--- $f"; cat -n "$f"; }
done

echo "== package lock vitepress versions =="
rg -n '"vitepress"|"`@vitejs/plugin-vue`"|vitepress|DefaultTheme|DefaultTheme' package.json package-lock.json pnpm-lock.yaml yarn.lock bun.lockb docs -g '!node_modules' -g '!dist' -g '!build' || true

Repository: soteenstudio/lightvm

Length of output: 8967


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== inspect relevant generated declaration context =="
for f in docs/types/theme/index.d.ts docs/en/types/*.d.ts docs/id/types/*.d.ts; do
  [ -f "$f" ] && { echo "--- $f"; cat -n "$f"; }
done

echo "== package lock vitepress package metadata =="
python3 - <<'PY'
import json, re, pathlib
p = pathlib.Path("package-lock.json")
data=json.loads(p.read_text())
for key in ("node_modules/vitepress",):
    d=data["packages"].get(key) or data["dependencies"].get(key)
    print("[", key, "]")
    if d:
        for k in ("version","resolved","dependencies","peerDependencies","scripts"):
            if k in d:
                print(k, ":", d[k])
PY

echo "== TypeScript UserConfig signatures from lock metadata if available =="
if [ -d node_modules/vitepress ]; then
  fd '.*\.d\.ts' node_modules/vitepress -x sh -c 'echo "--- $1"; rg -n "export .*UserConfig|interface UserConfig|type UserConfig" "$1" | sed -n "1,60p"' sh {} || true
else
  echo "node_modules/vitepress not present"
fi

Repository: soteenstudio/lightvm

Length of output: 1602


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== vitepress npm package files/directories =="
mktmpdir() { mktemp -d; }
tmp="$(mktmpdir)"
npm pack vitepress@1.6.4 --pack-destination "$tmp" >/dev/null
tar -tzf "$tmp"/vitepress-1.6.4.tgz | rg '(^dist/types/(types/)?|node_modules/vitepress/(types/|dist/types/)|(dist/)?config\.d\.ts|\.d\.ts$)' | sed -n '1,120p'

tmpdir="$(mktmpdir)"
tar -xzf "$tmp"/vitepress-1.6.4.tgz -C "$tmpdir"
echo "== candidate config/userconfig declarations =="
find "$tmpdir/package" \( -name 'types.d.ts' -o -name '*.d.ts' \) -type f | while read -r f; do
  rg -n "export .*UserConfig|interface UserConfig|type UserConfig|interface *DefaultTheme|namespace *Theme|export .*DefaultTheme" "$f" && echo "---FILE--- $f"
done | sed -n '1,220p'

Repository: soteenstudio/lightvm

Length of output: 13895


🏁 Script executed:

#!/bin/bash
set -euo pipefail

tmpdir="$(mktemp -d)"
npm pack vitepress@1.6.4 --pack-destination "$tmpdir" >/dev/null
tar -xzf "$tmpdir"/vitepress-1.6.4.tgz -C "$tmpdir"

echo "== shared exports/imports around defineConfig withTheme =="
rg -n "defineConfig" "$tmpdir/package/dist/node/index.d.ts" -A 6 -B 6

echo "== full UserConfig and relevant defaults from shared.d.ts =="
sed -n '1,2265p' "$tmpdir/package/dist/node/index.d.ts" | grep -n "interface UserConfig\\|interface LocaleSpecificConfig\\|interface Config\\|export declare const defineConfigWithTheme\\|DefaultTheme" -A 12 -B 12 | sed -n '1,220p'

echo "== types/shared declarations =="
sed -n '1,180p' "$tmpdir/package/types/shared.d.ts"
echo "== types/default-theme declarations =="
sed -n '1,220p' "$tmpdir/package/types/default-theme.d.ts"

echo "== package type files =="
for f in "$tmpdir/package/theme.d.ts" "$tmpdir/package/types/index.d.ts"; do
  echo "--- $f"
  cat -n "$f"
done

Repository: soteenstudio/lightvm

Length of output: 26827


Preserve the VitePress default-theme config type.

This declaration now declares the whole config as UserConfig<any>, so themeConfig loses type-checking while docs/types/en.d.ts and docs/types/id.d.ts still keep DefaultTheme.Config. Use UserConfig<DefaultTheme.Config> and combine it with any custom theme fields needed.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/types/config.d.ts` at line 1, Update the _default declaration to use
UserConfig<DefaultTheme.Config> instead of UserConfig<any>, preserving
DefaultTheme.Config type-checking for themeConfig while intersecting any
existing custom theme fields required by the configuration.

Comment thread docs/types/lang/en/navDevelopment.d.ts
# Conflicts:
#	package-lock.json
# Conflicts:
#	package-lock.json

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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 current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@README.md`:
- Line 52: Update the documentation list item on line 52 to use exactly two
leading spaces before its marker, preserving the existing text and formatting.
🪄 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.yml

Review profile: CHILL

Plan: Pro Plus

Run ID: c617420d-ea22-4223-87b1-4d1ebabbee64

📥 Commits

Reviewing files that changed from the base of the PR and between 6b98b8e and 011e858.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (3)
  • .github/workflows/ci.yml
  • README.md
  • package.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • package.json

Comment thread README.md Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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 current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@README.md`:
- Line 25: Update the releases link in README.md to point directly to the
repository’s releases page at soteenstudio/lightvm/releases, preserving the
existing link text and surrounding documentation.
- Around line 5-9: Replace the empty alt text in each badge image at the top of
the README with concise descriptive labels identifying its purpose, including
Build status, npm version, nightly version, GitHub stars, and License; keep the
existing badge URLs and links unchanged.
🪄 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.yml

Review profile: CHILL

Plan: Pro Plus

Run ID: 2110ee19-d4e8-4996-a6f5-f67fd9672c31

📥 Commits

Reviewing files that changed from the base of the PR and between 011e858 and 82954e8.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (1)
  • README.md

Comment thread README.md Outdated
Comment thread README.md Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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 current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@README.md`:
- Line 8: Update the badge alt text in the README from “github stars” to “GitHub
stars,” preserving the existing badge URL and formatting.
🪄 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.yml

Review profile: CHILL

Plan: Pro Plus

Run ID: 11ce2b43-c2e5-4aac-a270-fec19a13af3c

📥 Commits

Reviewing files that changed from the base of the PR and between 82954e8 and 7ded286.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (1)
  • README.md

Comment thread README.md Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant