-
Notifications
You must be signed in to change notification settings - Fork 2
chore: change legacy docs usage #189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
close IDP-1319
🦋 Changeset detectedLatest commit: 91e9724 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates legacy documentation URLs and version handling in the VersionsNav component. It standardizes version format by removing the "v" prefix from the LEGACY_VERSIONS array and updates the legacy documentation domain configuration.
- Removed "v" prefix from legacy version strings for consistency
- Changed legacy documentation URL structure to point to the new cloud.alauda.cn domain
- Removed docs.alauda.io from the allowed legacy domains list
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Signed-off-by: JounQin <admin@1stg.me>
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughAdds a changeset documenting a patch release for @alauda/doom. Updates VersionsNav to remove leading "v" from legacy versions, adjust legacy navigation URLs with version and language parameters, and restrict allowed legacy domains to docs.alauda.cn (plus localhost in non-production). Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant UI as VersionsNav (UI)
participant Nav as Link Builder
participant Guard as Domain Allowlist
participant Ext as Legacy Docs Site
User->>UI: Select legacy version
UI->>Nav: Request URL for selected version + lang
Nav->>Guard: Validate target domain (docs.alauda.cn / localhost in non-prod)
Guard-->>Nav: Allowed / Blocked
alt Allowed
Nav-->>UI: Return formatted URL (?version=...&lang=...)
UI->>Ext: Navigate to legacy docs
Ext-->>User: Render legacy docs
else Blocked
UI-->>User: Navigation prevented
end
note over Nav,Guard: Version strings no longer include leading "v"
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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 |
commit: |
There was a problem hiding this 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
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.changeset/eighty-candles-wave.md(1 hunks)packages/doom/src/global/VersionsNav/index.tsx(1 hunks)
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{ts,tsx,js,jsx,md,yml,yaml,json}
📄 CodeRabbit inference engine (AGENTS.md)
Format code using the repository’s Prettier configuration (yarn format)
Files:
packages/doom/src/global/VersionsNav/index.tsx
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx}: Code must adhere to TypeScript strict-mode rules (no implicit any, strict null checks, etc.)
Maintain strong type coverage; validate with yarn typecov
Files:
packages/doom/src/global/VersionsNav/index.tsx
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
Follow ESLint project-specific rules; avoid disabling rules without justification
Files:
packages/doom/src/global/VersionsNav/index.tsx
packages/**
📄 CodeRabbit inference engine (AGENTS.md)
Organize code as a Yarn workspaces monorepo; place package code under packages/
Files:
packages/doom/src/global/VersionsNav/index.tsx
packages/doom/**
📄 CodeRabbit inference engine (AGENTS.md)
Place the main documentation tool and CLI in packages/doom/
Files:
packages/doom/src/global/VersionsNav/index.tsx
🧠 Learnings (1)
📚 Learning: 2025-09-24T04:08:32.103Z
Learnt from: CR
PR: alauda/doom#0
File: AGENTS.md:0-0
Timestamp: 2025-09-24T04:08:32.103Z
Learning: Applies to packages/doom/** : Place the main documentation tool and CLI in packages/doom/
Applied to files:
.changeset/eighty-candles-wave.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
- GitHub Check: Build and Lint with Node.js 22 on ubuntu-latest
- GitHub Check: Build and Lint with Node.js 18 on ubuntu-latest
- GitHub Check: Build and Lint with Node.js 24 on ubuntu-latest
- GitHub Check: Build and Lint with Node.js 20 on ubuntu-latest
- GitHub Check: Build and Lint with Node.js 22 on ubuntu-latest
- GitHub Check: Build and Lint with Node.js 20 on ubuntu-latest
- GitHub Check: Build and Lint with Node.js 24 on ubuntu-latest
- GitHub Check: Build and Lint with Node.js 18 on ubuntu-latest
🔇 Additional comments (2)
.changeset/eighty-candles-wave.md (1)
1-5: LGTM! Changeset correctly formatted.The changeset follows the standard format and appropriately categorizes this as a patch-level change for the
@alauda/doompackage.packages/doom/src/global/VersionsNav/index.tsx (1)
29-29: Good data normalization pattern.Storing version numbers without the "v" prefix in the
LEGACY_VERSIONSarray and adding it programmatically in the URL template (line 33) is a clean separation of data and presentation. This approach makes the version data more reusable and the formatting explicit.Regarding the past review comment: The current implementation is correct. The backend URL expects
version=v3.18.1format, so adding the "v" prefix in the template literal is necessary and intentional.Also applies to: 33-33
There was a problem hiding this 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
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.changeset/eighty-candles-wave.md(1 hunks)packages/doom/src/global/VersionsNav/index.tsx(1 hunks)
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{ts,tsx,js,jsx,md,yml,yaml,json}
📄 CodeRabbit inference engine (AGENTS.md)
Format code using the repository’s Prettier configuration (yarn format)
Files:
packages/doom/src/global/VersionsNav/index.tsx
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx}: Code must adhere to TypeScript strict-mode rules (no implicit any, strict null checks, etc.)
Maintain strong type coverage; validate with yarn typecov
Files:
packages/doom/src/global/VersionsNav/index.tsx
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
Follow ESLint project-specific rules; avoid disabling rules without justification
Files:
packages/doom/src/global/VersionsNav/index.tsx
packages/**
📄 CodeRabbit inference engine (AGENTS.md)
Organize code as a Yarn workspaces monorepo; place package code under packages/
Files:
packages/doom/src/global/VersionsNav/index.tsx
packages/doom/**
📄 CodeRabbit inference engine (AGENTS.md)
Place the main documentation tool and CLI in packages/doom/
Files:
packages/doom/src/global/VersionsNav/index.tsx
🧠 Learnings (1)
📚 Learning: 2025-09-24T04:08:32.103Z
Learnt from: CR
PR: alauda/doom#0
File: AGENTS.md:0-0
Timestamp: 2025-09-24T04:08:32.103Z
Learning: Applies to packages/doom/** : Place the main documentation tool and CLI in packages/doom/
Applied to files:
.changeset/eighty-candles-wave.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: Build and Lint with Node.js 22 on ubuntu-latest
- GitHub Check: Build and Lint with Node.js 18 on ubuntu-latest
- GitHub Check: Build and Lint with Node.js 24 on ubuntu-latest
- GitHub Check: Build and Lint with Node.js 20 on ubuntu-latest
- GitHub Check: Build and Lint with Node.js 20 on ubuntu-latest
- GitHub Check: Build and Lint with Node.js 18 on ubuntu-latest
🔇 Additional comments (2)
.changeset/eighty-candles-wave.md (1)
1-5: LGTM!The changeset correctly documents a patch release for the legacy docs configuration changes.
packages/doom/src/global/VersionsNav/index.tsx (1)
29-34: LGTM! Clean version handling.The refactor to store versions without the "v" prefix in the array (line 29) and add it back in the URL template (line 33 via
v${v}) is a good practice—it separates data storage from presentation formatting. The previous comment about inconsistency is no longer applicable.
close IDP-1319
Summary by CodeRabbit
Bug Fixes
Chores