docs: hide CLI, Scaffold, and Hyperboards pages - #157
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughThis change centralizes hidden tool routes, excludes them from search and sitemap generation, removes authored navigation references, updates related documentation, and adds tests verifying source availability and discoverability exclusions. ChangesHidden Tool Visibility
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
test/hidden-tool-visibility.test.js (1)
9-14: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse the shared hidden-route configuration in the test.
This test duplicates
lib/page-visibility.json, so adding a future hidden route can change production behavior without extending regression coverage. ImporthiddenPathsand deriveHIDDEN_PAGE_FILESfrom that shared value.Proposed fix
-const HIDDEN_PATHS = [ - '/tools/hypercerts-cli', - '/tools/scaffold', - '/tools/hyperboards', -]; +const { hiddenPaths: HIDDEN_PATHS } = require('../lib/page-visibility.json');🤖 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 `@test/hidden-tool-visibility.test.js` around lines 9 - 14, Update test/hidden-tool-visibility.test.js to import the shared hiddenPaths configuration from lib/page-visibility.json and derive HIDDEN_PAGE_FILES from it, removing the duplicated HIDDEN_PATHS list. Preserve the existing pages${path}.md mapping so the test automatically covers future hidden routes.
🤖 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 `@test/hidden-tool-visibility.test.js`:
- Around line 29-30: Update the setup around the hidden-tool visibility test and
its execFileSync call to ensure external-docs-content.json is available before
invoking lib/generate-search-index.js. Use the repository’s documented
preparation step or add the required test fixture, while preserving the existing
hidden-page exclusion assertion.
---
Nitpick comments:
In `@test/hidden-tool-visibility.test.js`:
- Around line 9-14: Update test/hidden-tool-visibility.test.js to import the
shared hiddenPaths configuration from lib/page-visibility.json and derive
HIDDEN_PAGE_FILES from it, removing the duplicated HIDDEN_PATHS list. Preserve
the existing pages${path}.md mapping so the test automatically covers future
hidden routes.
🪄 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: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 1c75c9b9-92ef-487c-9bad-292a828fa9b7
📒 Files selected for processing (10)
components/Layout.jscomponents/SearchDialog.jslib/generate-search-index.jslib/generate-sitemap.jslib/navigation.jslib/page-visibility.jsonpages/architecture/account-and-identity.mdpages/getting-started/quickstart.mdpages/tools/hyperscan.mdtest/hidden-tool-visibility.test.js
💤 Files with no reviewable changes (3)
- pages/tools/hyperscan.md
- components/SearchDialog.js
- lib/navigation.js
| test('excludes hidden tool pages from the generated search index', () => { | ||
| execFileSync(process.execPath, ['lib/generate-search-index.js'], { cwd: ROOT }); |
There was a problem hiding this comment.
🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win
Provide the external-docs-content prerequisite before running this test.
execFileSync invokes the search-index generator directly, but CI reports that it crashes with missing external-docs-content.json; the hidden-route assertion is never reached. Add test setup/fixtures for that prerequisite, or invoke the repository’s documented preparation step before generating the index.
🧰 Tools
🪛 GitHub Actions: Docs CI / 0_Test and build documentation.txt
[error] 29-30: Test failed: 'excludes hidden tool pages from the generated search index' (ERR_TEST_FAILURE) due to missing external docs content file.
🪛 GitHub Actions: Docs CI / Test and build documentation
[error] 29-30: Test failed: 'excludes hidden tool pages from the generated search index' due to missing external-docs-content.json (generate-search-index crashed with ERR_TEST_FAILURE).
🤖 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 `@test/hidden-tool-visibility.test.js` around lines 29 - 30, Update the setup
around the hidden-tool visibility test and its execFileSync call to ensure
external-docs-content.json is available before invoking
lib/generate-search-index.js. Use the repository’s documented preparation step
or add the required test fixture, while preserving the existing hidden-page
exclusion assertion.
Source: Pipeline failures
Summary
pages/tools/todrafts/tools/pages/and unlinkedValidation
pnpm test— 31 tests passedpnpm build— passed; the three archived routes are not generated