Conversation
fd9f19b to
65888c2
Compare
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughReorganizes VitePress sidebar/navigation for TinyEditor and GenUI SDK, adds Angular packages to the pnpm workspace, updates genui SDK submodule pointer and genui package dependencies, and adjusts root build scripts (adds prebuild and increases Node heap). Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 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. Comment |
4012a04 to
8c54cdf
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @.vitepress/config.mts:
- Around line 465-476: The menu object with text 'Renderer 组件' currently sets
base: '/genui-sdk' and uses absolute item links (leading '/'), causing the base
to be ignored; update the base to include a trailing slash (e.g., '/genui-sdk/')
and change each item link in the items array ({ text: '自定义 Actions', { text:
'配置缓冲字段', { text: '传递合并 State' }) to relative paths (remove the leading '/') so
links resolve under the base (e.g., 'examples/angular/renderer/custom-actions',
etc.).
| { | ||
| text: 'Renderer 组件', | ||
| base: '/genui-sdk', | ||
| items: [ | ||
| { text: '自定义 Actions', link: '/examples/angular/renderer/custom-actions' }, | ||
| { | ||
| text: '配置缓冲字段', | ||
| link: '/examples/angular/renderer/required-complete-field-selectors' | ||
| }, | ||
| { text: '传递合并 State', link: '/examples/angular/renderer/state' } | ||
| ] | ||
| } |
There was a problem hiding this comment.
Same broken base/link pattern — Angular example links will misroute.
Same issue as the Server 指引 section: base: '/genui-sdk' with absolute links (leading /) means the base is ignored, resolving to /examples/angular/renderer/... instead of /genui-sdk/examples/angular/renderer/....
🐛 Proposed fix — use trailing slash on base and relative links
{
text: 'Renderer 组件',
- base: '/genui-sdk',
+ base: '/genui-sdk/examples/angular/renderer/',
items: [
- { text: '自定义 Actions', link: '/examples/angular/renderer/custom-actions' },
+ { text: '自定义 Actions', link: 'custom-actions' },
{
text: '配置缓冲字段',
- link: '/examples/angular/renderer/required-complete-field-selectors'
+ link: 'required-complete-field-selectors'
},
- { text: '传递合并 State', link: '/examples/angular/renderer/state' }
+ { text: '传递合并 State', link: 'state' }
]
}📝 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.
| { | |
| text: 'Renderer 组件', | |
| base: '/genui-sdk', | |
| items: [ | |
| { text: '自定义 Actions', link: '/examples/angular/renderer/custom-actions' }, | |
| { | |
| text: '配置缓冲字段', | |
| link: '/examples/angular/renderer/required-complete-field-selectors' | |
| }, | |
| { text: '传递合并 State', link: '/examples/angular/renderer/state' } | |
| ] | |
| } | |
| { | |
| text: 'Renderer 组件', | |
| base: '/genui-sdk/examples/angular/renderer/', | |
| items: [ | |
| { text: '自定义 Actions', link: 'custom-actions' }, | |
| { | |
| text: '配置缓冲字段', | |
| link: 'required-complete-field-selectors' | |
| }, | |
| { text: '传递合并 State', link: 'state' } | |
| ] | |
| } |
🤖 Prompt for AI Agents
In @.vitepress/config.mts around lines 465 - 476, The menu object with text
'Renderer 组件' currently sets base: '/genui-sdk' and uses absolute item links
(leading '/'), causing the base to be ignored; update the base to include a
trailing slash (e.g., '/genui-sdk/') and change each item link in the items
array ({ text: '自定义 Actions', { text: '配置缓冲字段', { text: '传递合并 State' }) to
relative paths (remove the leading '/') so links resolve under the base (e.g.,
'examples/angular/renderer/custom-actions', etc.).
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@genui/package.json`:
- Line 15: The dependency entry "@opentiny/genui-sdk-vue": "1.0.0-beta.2" in
package.json references a package version that doesn't exist; update
package.json to point to a published version (e.g., change the version string to
"1.0.0-alpha.2") or coordinate to publish "1.0.0-beta.2" before merging, then
run npm install / yarn install and verify CI passes; ensure the updated version
string appears only in the package.json dependency for "@opentiny/genui-sdk-vue"
so lockfiles can be regenerated.
- Line 14: The workspace reference "@opentiny/genui-sdk-angular" in
genui/package.json cannot be resolved because pnpm-workspace.yaml lists
incorrect package paths; open pnpm-workspace.yaml and update the package globs
to the actual repository locations for the SDK (the entries that currently point
to genui/genui-sdk/packages/frameworks/angular, genui/genui-sdk/packages/core,
genui/genui-sdk/projects/tiny-schema-renderer-ng) so they match where those
packages live, or remove/replace the workspace:* dependency in
genui/package.json if the package is not part of the monorepo; also verify the
prebuild script in genui/package.json references the corrected workspace package
names and paths so pnpm can resolve and build `@opentiny/genui-sdk-angular`
successfully.
🧹 Nitpick comments (1)
.vitepress/config.mts (1)
376-388: Inconsistentbase/linkpatterns across guide sections.The Vue section uses
base: '/genui-sdk/guide/'with relative links, but Angular usesbase: '/genui-sdk/'and Server usesbase: '/genui-sdk'with a leading-slash link. While all three likely resolve correctly, the mixed conventions hurt readability and are error-prone.Consider aligning all three sections:
♻️ Suggested alignment
{ text: 'GenUI SDK Angular 指引', - base: '/genui-sdk/', + base: '/genui-sdk/guide/angular/', items: [ - { text: '安装与配置', link: 'guide/angular/install' }, - { text: '使用 Renderer 组件', link: 'guide/angular/start-with-renderer' } + { text: '安装与配置', link: 'install' }, + { text: '使用 Renderer 组件', link: 'start-with-renderer' } ] }, { text: 'GenUI SDK Server 指引', - base: '/genui-sdk', - items: [{ text: 'Server 包使用文档', link: '/guide/server-usage' }] + base: '/genui-sdk/guide/', + items: [{ text: 'Server 包使用文档', link: 'server-usage' }] }
| "license": "MIT", | ||
| "dependencies": { | ||
| "@opentiny/genui-sdk-vue": "1.0.0-beta.1" | ||
| "@opentiny/genui-sdk-angular": "workspace:*", |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check pnpm-workspace.yaml for angular package inclusion
echo "=== pnpm-workspace.yaml ==="
cat pnpm-workspace.yaml 2>/dev/null || echo "File not found"
echo -e "\n=== Root package.json build scripts ==="
cat package.json | grep -A10 '"scripts"'Repository: opentiny/docs
Length of output: 833
🏁 Script executed:
#!/bin/bash
# Check the angular package.json to verify the package name
find . -path "*genui-sdk/packages/frameworks/angular/package.json" -type f | head -1 | xargs cat
echo -e "\n=== Check genui/package.json dependencies ==="
cat genui/package.json | grep -A5 -B5 "@opentiny/genui-sdk-angular"Repository: opentiny/docs
Length of output: 371
🏁 Script executed:
#!/bin/bash
# Find and display angular package.json
cat genui/genui-sdk/packages/frameworks/angular/package.json 2>/dev/null | head -20 || echo "File not found at expected path"
# Alternative: search for it
echo -e "\n=== Searching for angular package.json ==="
find . -name "package.json" -path "*/frameworks/angular/*" -type f -exec cat {} \; 2>/dev/null | head -20Repository: opentiny/docs
Length of output: 100
🏁 Script executed:
#!/bin/bash
# List the directory structure to understand the workspace layout
echo "=== Checking genui-sdk structure ==="
ls -la genui/genui-sdk/packages/frameworks/ 2>/dev/null || echo "Directory not found"
echo -e "\n=== List all files in genui-sdk ==="
find genui/genui-sdk -maxdepth 3 -type d | head -20
echo -e "\n=== Search for any angular package.json ==="
find . -name "package.json" | grep -i angularRepository: opentiny/docs
Length of output: 211
🏁 Script executed:
#!/bin/bash
# Check what's actually in genui directory
echo "=== Contents of genui directory ==="
ls -la genui/
echo -e "\n=== Contents of genui-sdk directory ==="
ls -la genui/genui-sdk/
echo -e "\n=== All package.json files in the repo ==="
find . -name "package.json" -type f | grep -v node_modules | sortRepository: opentiny/docs
Length of output: 552
🏁 Script executed:
#!/bin/bash
# Check if the packages declared in pnpm-workspace.yaml actually exist
echo "=== Verifying packages declared in pnpm-workspace.yaml ==="
pnpm_packages=(
"tiny-robot"
"genui"
"genui/genui-sdk/packages/frameworks/angular"
"genui/genui-sdk/packages/core"
"genui/genui-sdk/projects/tiny-schema-renderer-ng"
)
for pkg in "${pnpm_packages[@]}"; do
if [ -d "$pkg" ]; then
echo "✓ $pkg exists"
else
echo "✗ $pkg DOES NOT EXIST"
fi
done
echo -e "\n=== Check tiny-robot packages ==="
find tiny-robot -maxdepth 2 -type f -name "package.json" 2>/dev/null | head -10Repository: opentiny/docs
Length of output: 359
🏁 Script executed:
#!/bin/bash
# Check git status to see if packages are being ignored or missing
echo "=== Check git status ==="
git status 2>/dev/null | head -30
echo -e "\n=== Check .gitignore for genui-sdk ==="
cat .gitignore 2>/dev/null | grep -i genui
echo -e "\n=== Look for any `@opentiny` packages in node_modules (after install) ==="
find node_modules/@opentiny -maxdepth 2 -type d 2>/dev/null | grep -i angular | head -10Repository: opentiny/docs
Length of output: 394
Fix workspace package paths in pnpm-workspace.yaml — referenced packages do not exist.
The pnpm-workspace.yaml declares packages at paths that don't exist:
genui/genui-sdk/packages/frameworks/angular✗genui/genui-sdk/packages/core✗genui/genui-sdk/projects/tiny-schema-renderer-ng✗
The workspace:* reference to @opentiny/genui-sdk-angular in genui/package.json cannot resolve. The prebuild script will also fail attempting to build a non-existent package. Verify the correct paths for these workspace packages in the repository and update pnpm-workspace.yaml accordingly.
🤖 Prompt for AI Agents
In `@genui/package.json` at line 14, The workspace reference
"@opentiny/genui-sdk-angular" in genui/package.json cannot be resolved because
pnpm-workspace.yaml lists incorrect package paths; open pnpm-workspace.yaml and
update the package globs to the actual repository locations for the SDK (the
entries that currently point to genui/genui-sdk/packages/frameworks/angular,
genui/genui-sdk/packages/core, genui/genui-sdk/projects/tiny-schema-renderer-ng)
so they match where those packages live, or remove/replace the workspace:*
dependency in genui/package.json if the package is not part of the monorepo;
also verify the prebuild script in genui/package.json references the corrected
workspace package names and paths so pnpm can resolve and build
`@opentiny/genui-sdk-angular` successfully.
genui/package.json
Outdated
There was a problem hiding this comment.
Build is broken: @opentiny/genui-sdk-vue@1.0.0-beta.2 does not exist.
The CI pipeline confirms this version isn't published — the latest release is 1.0.0-alpha.2. Either publish the beta.2 package first or pin to an existing version (e.g., 1.0.0-alpha.2).
🤖 Prompt for AI Agents
In `@genui/package.json` at line 15, The dependency entry
"@opentiny/genui-sdk-vue": "1.0.0-beta.2" in package.json references a package
version that doesn't exist; update package.json to point to a published version
(e.g., change the version string to "1.0.0-alpha.2") or coordinate to publish
"1.0.0-beta.2" before merging, then run npm install / yarn install and verify CI
passes; ensure the updated version string appears only in the package.json
dependency for "@opentiny/genui-sdk-vue" so lockfiles can be regenerated.
Summary by CodeRabbit
Documentation
Chores