Skip to content

Move misplaced root-level docs into proper subdirectories#2351

Merged
ihabadham merged 2 commits intomasterfrom
ihabadham/fix/misplaced-docs
Feb 4, 2026
Merged

Move misplaced root-level docs into proper subdirectories#2351
ihabadham merged 2 commits intomasterfrom
ihabadham/fix/misplaced-docs

Conversation

@ihabadham
Copy link
Copy Markdown
Collaborator

@ihabadham ihabadham commented Feb 4, 2026

Summary

CI_OPTIMIZATION.md and swc-migration.md were placed at the docs/ root (in PRs #1902 and #1932 respectively), causing them to appear as uncategorized items at the top of the website sidebar — above "Getting Started" with no section header.

Changes:

  • Move CI_OPTIMIZATION.mddocs/contributor-info/ (internal contributor doc, excluded from website)
  • Move swc-migration.mddocs/guides/ (user-facing, now properly categorized)
  • Update all references to the old paths in CONTRIBUTING.md and internal analysis docs
  • Add docs/ directory structure guidance to CLAUDE.md to prevent recurrence

Test plan

  • Verify the website sidebar at /react-on-rails/docs/ no longer shows "CI OPTIMIZATION" and "Swc Migration" at the top
  • Verify swc-migration now appears under the "Guides" section
  • Verify CI_OPTIMIZATION.md is no longer published to the website (it's in contributor-info/ which is excluded)
  • Verify links in CONTRIBUTING.md still work

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Reorganized documentation structure for improved navigation and clarity.
    • Updated documentation links and references to use the new contributor-info location and standardized naming.
    • Added guidance on publishing docs to subdirectories (discouraging docs at the docs/ root) and a mapping of content types to subdirectories.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 4, 2026

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

💤 Files selected but had no reviewable changes (1)
  • docs/migrating/babel-to-swc-migration.md

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review

Walkthrough

Documentation paths were standardized: references to CI_OPTIMIZATION.md were updated to docs/contributor-info/ci-optimization.md, and a new "Documentation Files (docs/)" guidance block was added to CLAUDE.md. Changes are documentation-only.

Changes

Cohort / File(s) Summary
Documentation Guidance
CLAUDE.md
Added a "Documentation Files (docs/)" guidance section describing permitted subdirectories under docs/, forbidding root-level docs placement, and mapping content types to subfolders.
Documentation Path Updates
.claude/docs/analysis/CI_OPTIMIZATION_SUMMARY.md, CONTRIBUTING.md, react_on_rails_pro/CONTRIBUTING.md
Replaced references to CI_OPTIMIZATION.md with docs/contributor-info/ci-optimization.md (lowercased path and moved into contributor-info).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • Judahmeek
  • justin808

Poem

🐰 I hopped through folders bright and neat,

Paths aligned beneath my feet,
CI notes tucked in their new home,
No more root — now neatly roamed,
Carpets of docs where bunnies meet.

🚥 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 accurately reflects the main change: moving misplaced root-level documentation files into proper subdirectories as evidenced by updates across multiple files and directories.
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 unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ihabadham/fix/misplaced-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.

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Feb 4, 2026

PR Review: Move misplaced root-level docs into proper subdirectories

✅ Overall Assessment

This is a well-executed cleanup PR that addresses a real UX issue with the documentation website. The changes are minimal, focused, and thoroughly cover all necessary updates.

🎯 Strengths

  1. Clear Problem Statement: The PR correctly identifies that root-level docs appear uncategorized on the website sidebar, which creates a poor user experience.

  2. Appropriate Categorization:

    • CI_OPTIMIZATION.mddocs/contributor-info/ - Correct! This is internal documentation that shouldn't be published.
    • swc-migration.mddocs/guides/ - Correct! This is user-facing migration guidance.
  3. Complete Reference Updates: All internal references have been updated:

    • .claude/docs/analysis/CI_OPTIMIZATION_SUMMARY.md (3 occurrences)
    • CONTRIBUTING.md (1 occurrence)
    • react_on_rails_pro/CONTRIBUTING.md (1 occurrence)
  4. Preventive Documentation: The addition to CLAUDE.md provides clear guidance with a helpful table of content types and their proper locations. This should prevent recurrence.

  5. No Breaking Changes: These are internal documentation moves with no impact on code functionality.

🔍 Verification Performed

I verified that:

  • ✅ Files exist at new locations
  • ✅ Files no longer exist at old locations
  • ✅ No lingering references to old paths remain in the codebase
  • ✅ The directory structure guidance matches actual directories

💡 Minor Observations

  1. Other Root-Level Docs: There are still several .md files at docs/ root:

    • README.md - ✅ Appropriate (landing page for GitHub)
    • introduction.md - ✅ Appropriate (linked from README)
    • MONOREPO_MERGER_PLAN.md / MONOREPO_MERGER_PLAN_REF.md - 🤔 Could potentially move to docs/contributor-info/ or docs/planning/
    • JS_PRO_PACKAGE_SEPARATION_PLAN.md - 🤔 Could potentially move to docs/contributor-info/ or docs/planning/
    • DIRECTORY_LICENSING.md / LICENSING_FAQ.md - 🤔 These might be fine at root given their importance

    However, these are outside the scope of this PR and can be addressed separately if needed.

  2. Directory Structure Table: The table in CLAUDE.md is comprehensive and helpful. It includes all the directories I found in the actual structure.

📋 Test Plan Recommendations

The test plan looks good. To fully verify:

  1. ✅ Check that CI passes (linting, formatting)
  2. ✅ Verify documentation website renders correctly (if you have access to preview)
  3. ✅ Confirm links in CONTRIBUTING.md work (they should, since they're relative paths)

🚀 Ready to Merge

This PR is ready to merge once CI passes. It's a straightforward improvement with no risk and clear benefits:

  • Improves documentation website UX
  • Adds preventive guidance for future documentation
  • Complete and thorough reference updates

No changes requested. Great work on cleaning this up and documenting the pattern!

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Feb 4, 2026

Greptile Overview

Greptile Summary

This PR fixes a documentation organization issue where two files were incorrectly placed at the docs/ root, causing them to appear as uncategorized items at the top of the website sidebar.

Changes made:

  • Moved CI_OPTIMIZATION.mddocs/contributor-info/ (internal contributor doc, excluded from website)
  • Moved swc-migration.mddocs/guides/ (user-facing guide, now properly categorized)
  • Updated all references to these files in CONTRIBUTING.md, react_on_rails_pro/CONTRIBUTING.md, and .claude/docs/analysis/CI_OPTIMIZATION_SUMMARY.md
  • Added comprehensive docs directory structure guidance to CLAUDE.md to prevent recurrence

Impact:

  • Website sidebar will no longer show uncategorized items at the top
  • swc-migration.md will now appear under the "Guides" section where users can find it
  • CI_OPTIMIZATION.md will be excluded from the website (as intended for internal contributors only)
  • Future documentation will be placed in the correct subdirectories from the start

The changes are straightforward file moves with path updates. All references have been properly updated and no content was modified.

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • This is a low-risk documentation reorganization PR. The changes are purely structural: moving two documentation files to proper subdirectories and updating all references. No code logic is modified, no API changes, and all file path references have been verified and updated correctly. The addition of directory structure guidance to CLAUDE.md will prevent similar issues in the future.
  • No files require special attention

Important Files Changed

Filename Overview
CLAUDE.md Added docs directory structure guidance table to prevent future misplacements
docs/contributor-info/CI_OPTIMIZATION.md Moved from docs root to contributor-info subdirectory (no content changes)
docs/guides/swc-migration.md Moved from docs root to guides subdirectory (no content changes)

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant Docs as docs/ root
    participant ContribInfo as docs/contributor-info/
    participant Guides as docs/guides/
    participant Website as ShakaCode Website
    
    Note over Dev,Website: Before PR (Broken State)
    Dev->>Docs: Create CI_OPTIMIZATION.md (PR #1902)
    Dev->>Docs: Create swc-migration.md (PR #1932)
    Docs->>Website: Publish files at root
    Website-->>Website: ❌ Display as uncategorized items<br/>at top of sidebar
    
    Note over Dev,Website: After PR (Fixed State)
    Dev->>Docs: Move CI_OPTIMIZATION.md
    Docs->>ContribInfo: Place in contributor-info/
    Note right of ContribInfo: Internal doc<br/>(excluded from website)
    
    Dev->>Docs: Move swc-migration.md
    Docs->>Guides: Place in guides/
    Guides->>Website: Publish under "Guides" section
    Website-->>Website: ✅ Properly categorized
    
    Dev->>Dev: Update all references in<br/>CONTRIBUTING.md,<br/>CLAUDE.md, etc.
    
    Note over Dev,Website: Prevention
    Dev->>Dev: Add directory structure<br/>guidance to CLAUDE.md
    Dev-->>Dev: Future docs placed in<br/>correct subdirectories
Loading

CI_OPTIMIZATION.md and swc-migration.md were placed at the docs/ root,
causing them to appear as uncategorized items at the top of the website
sidebar (shakacode.com/react-on-rails/docs/). This looked broken because
the sidebar renders root-level files without a category header.

- Move CI_OPTIMIZATION.md to docs/contributor-info/ (internal, not
  published to website)
- Move swc-migration.md to docs/guides/ (user-facing, properly
  categorized)
- Update all references to the old paths
- Add docs/ directory structure guidance to CLAUDE.md to prevent
  recurrence

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@ihabadham ihabadham force-pushed the ihabadham/fix/misplaced-docs branch from 75d086f to 58bb279 Compare February 4, 2026 19:29
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Feb 4, 2026

Code Review

✅ Excellent Work

This PR effectively addresses the documentation organization issue with a clean, well-documented solution.

Strengths

  1. Problem Correctly Identified: The PR accurately identifies that files at docs/ root appear as uncategorized items in the website sidebar, which looks unprofessional.

  2. Appropriate File Placement:

    • CI_OPTIMIZATION.mddocs/contributor-info/: Correct, as this is internal documentation for contributors, not end users
    • swc-migration.mddocs/migrating/: Correct, this is a user-facing migration guide
  3. Complete Reference Updates: All references to the old paths have been updated:

    • .claude/docs/analysis/CI_OPTIMIZATION_SUMMARY.md (3 references)
    • CONTRIBUTING.md
    • react_on_rails_pro/CONTRIBUTING.md
  4. Proactive Documentation: The addition of the directory structure table to CLAUDE.md is excellent preventive documentation that will help prevent this issue from recurring.

  5. Clean Git History: The files were properly moved (preserving git history) rather than deleted and recreated.

Verification Results

I verified the following:

✅ Old files no longer exist at docs/CI_OPTIMIZATION.md and docs/swc-migration.md
✅ New files exist at correct locations with intact content
✅ No remaining references to old paths in the codebase
✅ All directories listed in the CLAUDE.md table exist

Minor Observations

  1. Table Completeness: The CLAUDE.md table lists all major docs directories. I noticed a few additional directories exist that aren't in the table:

    • docs/advanced-topics/
    • docs/ai-agents/
    • docs/configuration/
    • docs/pro/
    • docs/planning/
    • docs/testimonials/
    • docs/assets/ and docs/images/ (asset directories)

    Not a blocker: The table covers the most common/important directories. You could optionally add these for completeness, but the current table is sufficient for preventing the root-level placement issue.

  2. Test Plan: The test plan items are good but would require manual verification on the actual deployed website. Consider adding a note about when/how to verify (e.g., "after deploy to staging" or "check build artifacts").

Code Quality Assessment

  • Best Practices: ✅ Follows project conventions
  • Potential Bugs: ✅ None identified
  • Performance: ✅ No impact
  • Security: ✅ No concerns
  • Test Coverage: ✅ Appropriate for documentation changes

Recommendation

✅ APPROVE - This PR is ready to merge. The changes are well-executed, thoroughly documented, and all references have been properly updated.


Note: This is a documentation-only change, so CI should skip most tests per the path-based filtering rules (which is exactly what the moved ci-optimization.md document describes! 🎯)

Match the naming convention in docs/migrating/ where filenames specify
both sides of the migration.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Feb 4, 2026

Code Review

Summary

This PR addresses a documentation organization issue by moving misplaced root-level docs into proper subdirectories according to the website's structure. The changes are clean, well-documented, and follow best practices.

Strengths

  1. Problem Identification: Correctly identifies that docs at docs/ root appear as uncategorized items in the website sidebar
  2. Appropriate Categorization:
    • CI_OPTIMIZATION.mddocs/contributor-info/ci-optimization.md (internal, not published)
    • swc-migration.mddocs/migrating/babel-to-swc-migration.md (user-facing migration guide)
  3. Complete Reference Updates: All references to old paths updated in:
    • CONTRIBUTING.md
    • react_on_rails_pro/CONTRIBUTING.md
    • .claude/docs/analysis/CI_OPTIMIZATION_SUMMARY.md
  4. Documentation: Adds excellent guidance to CLAUDE.md with a clear table mapping content types to directories
  5. File Naming: Renamed swc-migration.mdbabel-to-swc-migration.md (more descriptive)

Code Quality

  • No broken links: Verified no remaining references to old paths using grep
  • Files properly moved: Both files exist at new locations, old locations removed
  • Consistent formatting: Changes follow markdown conventions
  • Clear commit intent: PR description explains the problem and solution well

Best Practices Followed

  1. CLAUDE.md guidance: Adds proactive documentation to prevent recurrence
  2. Directory structure: Follows established patterns in the codebase
  3. License compliance: contributor-info/ directory is correctly excluded from website (internal docs)
  4. Minimal changes: Only touches necessary files, no scope creep

🔍 Minor Observations

  1. Remaining root-level docs: There are still several files at docs/ root:

    • introduction.md - Appears intentional (main entry point)
    • README.md - Appears intentional (navigation guide)
    • MONOREPO_MERGER_PLAN.md, JS_PRO_PACKAGE_SEPARATION_PLAN.md - These look like internal planning docs that could potentially go in contributor-info/ or a planning/ subdirectory
    • DIRECTORY_LICENSING.md, LICENSING_FAQ.md - License docs (likely intentional at root)

    Note: This is NOT a blocker for this PR. The PR addresses the immediate issue. A follow-up PR could evaluate whether these other root-level docs should be moved.

  2. Test plan: The test plan checklist in the PR description is thorough but requires manual verification on the deployed website. Consider adding a note in CLAUDE.md about how to verify website sidebar structure locally if there's a way to preview the docs site.

🎯 Recommendations

No changes required for this PR. The code is ready to merge as-is.

Optional follow-up work (separate PRs):

  1. Evaluate whether MONOREPO_MERGER_PLAN.md and similar planning docs should move to contributor-info/
  2. Consider adding a CI check to prevent new files from being added to docs/ root (enforce subdirectory structure)
  3. Add documentation about how to preview the docs website locally for verification

📊 Final Verdict

LGTM

This is a clean, focused PR that solves a specific documentation organization problem. The changes are minimal, well-tested, and include preventive guidance to avoid recurrence. All references are properly updated, and no broken links remain.

The addition of the directory structure table in CLAUDE.md is particularly valuable for preventing similar issues in the future.


Checklist Completion:

  • ✅ Code quality and best practices: Excellent
  • ✅ Potential bugs or issues: None identified
  • ✅ Performance considerations: N/A (documentation only)
  • ✅ Security concerns: None
  • ✅ Test coverage: Appropriate for documentation changes (manual verification required)

Great work on improving the documentation structure! 🎉

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Feb 4, 2026

Code Review - Documentation Organization

✅ Overall Assessment

Excellent work! This PR effectively resolves the documentation organization issue and prevents future recurrence. The changes are well-executed and comprehensive.


🎯 Strengths

1. Problem Correctly Identified

  • Clear identification of root cause: misplaced docs appearing uncategorized on website sidebar
  • Proper categorization: CI_OPTIMIZATION.md → contributor docs, swc-migration.md → user-facing migration guide

2. Comprehensive Reference Updates

✅ All references to moved files updated:

  • CONTRIBUTING.md
  • react_on_rails_pro/CONTRIBUTING.md
  • .claude/docs/analysis/CI_OPTIMIZATION_SUMMARY.md

No orphaned references found in codebase.

3. Naming Improvements

Great attention to detail with filename normalization:

  • CI_OPTIMIZATION.mdci-optimization.md (kebab-case consistency)
  • swc-migration.mdbabel-to-swc-migration.md (more descriptive)

4. Preventative Documentation

The new CLAUDE.md guidance is excellent:

  • Clear mapping table of content types → directories
  • Explicit warning about root-level placement
  • Covers all existing subdirectories
  • Will prevent this issue from recurring

🔍 Verification Checks Performed

Reference completeness: All links updated (checked via grep)
No orphaned references: Searched for old paths across codebase
Directory structure: Verified target directories exist
Naming consistency: Kebab-case used throughout
No test impacts: No test specs reference these files
No external URL hardcoding: No shakacode.com URLs pointing to old paths


📋 Recommendations

Minor Suggestions (Optional)

  1. Consider URL redirects: If the ShakaCode website tracks analytics, the old URLs might be linked externally. Consider adding redirects:

    • /docs/CI_OPTIMIZATION/docs/contributor-info/ci-optimization (though this is excluded from site)
    • /docs/swc-migration/docs/migrating/babel-to-swc-migration
  2. CLAUDE.md table formatting: Consider adding a header row to make the table more accessible:

    | Content Type | Directory |
    |--------------|-----------|

    (Currently just has pipes without labels, which is valid but less clear)

Non-Blocking Observations

  • The docs/contributor-info/ directory is mentioned as "NOT published" — ensure your website build config actually excludes this directory
  • Consider documenting this exclusion in a docs/contributor-info/README.md for clarity

🚀 Test Plan Review

Your test plan is solid:

  • ✅ Verify sidebar no longer shows uncategorized docs at top
  • ✅ Verify swc-migration appears under "Guides" (actually "Migrating" based on path)
  • ✅ Verify CI_OPTIMIZATION not published (contributor-info exclusion)
  • ✅ Verify links still work

Minor note: The file moved to docs/migrating/babel-to-swc-migration.md, so it should appear under "Migrating" section, not "Guides" section.


🎉 Summary

Approve to merge. This is a clean, well-executed refactoring that:

  • Fixes the immediate problem (misplaced docs on website)
  • Prevents future occurrences (CLAUDE.md guidance)
  • Maintains all references correctly
  • Improves naming consistency

No blocking issues found. The optional suggestions above are nice-to-haves, not requirements.

Great work on the thoroughness and attention to detail! 🙌

@ihabadham ihabadham merged commit ebe4005 into master Feb 4, 2026
3 checks passed
@ihabadham ihabadham deleted the ihabadham/fix/misplaced-docs branch February 4, 2026 20:08
justin808 pushed a commit that referenced this pull request Feb 8, 2026
CI_OPTIMIZATION.md and swc-migration.md were placed at the docs/ root
(in PRs #1902 and #1932), causing them to appear as uncategorized items
at the top of the website sidebar with no section header.

- CI_OPTIMIZATION.md → docs/contributor-info/ci-optimization.md
  (internal doc, excluded from website, renamed to kebab-case)
- swc-migration.md → docs/migrating/babel-to-swc-migration.md
  (user-facing, properly categorized, renamed for clarity)
- Update all references in CONTRIBUTING.md and internal docs
- Add docs/ directory structure guidance to CLAUDE.md to prevent
  future misplacement

Co-Authored-By: Claude Opus 4.5 <[email protected]>
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