Skip to content

refactor: rename docs structure file and update imports#2001

Merged
ComputelessComputer merged 1 commit intomainfrom
refactor-docs-structure-file
Nov 30, 2025
Merged

refactor: rename docs structure file and update imports#2001
ComputelessComputer merged 1 commit intomainfrom
refactor-docs-structure-file

Conversation

@ComputelessComputer
Copy link
Collaborator

No description provided.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 30, 2025

📝 Walkthrough

Walkthrough

This PR renames the docs structure file from structure to -structure, adds a new FAQ section to the docs structure with a default page mapping, updates section resolution logic in the docs route to match groups by title comparison, and applies styling adjustments to the DocsNavigation component.

Changes

Cohort / File(s) Change Summary
Import path updates
apps/web/src/routes/_view/docs/$.tsx, apps/web/src/routes/_view/docs/route.tsx, apps/web/src/routes/_view/route.tsx
Updated import path for docsStructure from ./structure or ./docs/structure to ./-structure or ./docs/-structure across multiple route files.
FAQ section addition
apps/web/src/routes/_view/docs/-structure.ts
New file that extends the docs structure sections array with "faq" entry and adds a default page mapping "faq": "faq/general".
Section resolution and styling
apps/web/src/routes/_view/docs/route.tsx
Updated LeftSidebar section resolution logic to match groups by comparing group.title (lowercased) to sectionId (lowercased) instead of direct indexing; added runtime type guard to filter undefined section entries; added left padding (pl-5) to DocsNavigation styling.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • areas requiring extra attention:
    • Section resolution logic change in route.tsx: verify the new title-based matching correctly handles all existing section cases and the new FAQ section
    • Type guard filter in sections map: confirm it doesn't inadvertently remove valid entries or mask mapping issues

Possibly related PRs

Suggested reviewers

  • yujonglee

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Description check ❓ Inconclusive No description was provided, making it impossible to evaluate relevance to the changeset. Add a pull request description explaining the rationale for the file rename and any benefits of the '-structure' naming convention.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: renaming the docs structure file from 'structure' to '-structure' and updating all corresponding imports across multiple files.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor-docs-structure-file

Comment @coderabbitai help to get the list of available commands and usage tips.

@netlify
Copy link

netlify bot commented Nov 30, 2025

Deploy Preview for hyprnote ready!

Name Link
🔨 Latest commit 0016780
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/692bd41a369bdc00087a23ac
😎 Deploy Preview https://deploy-preview-2001--hyprnote.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Nov 30, 2025

Deploy Preview for hyprnote-storybook ready!

Name Link
🔨 Latest commit 0016780
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote-storybook/deploys/692bd41a69fd710008dd1519
😎 Deploy Preview https://deploy-preview-2001--hyprnote-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
apps/web/src/routes/_view/docs/route.tsx (1)

64-73: Section resolution is more robust; consider reusing it for mobile nav

The new case‑insensitive find plus typed filter is a solid improvement over indexing by a derived key, and should handle titles like "FAQ" vs "faq" reliably.

The only follow‑up I’d suggest is to mirror this logic (or extract a shared helper) in MobileDocsDrawer in apps/web/src/routes/_view/route.tsx, which still uses the older capitalization‑based lookup. That will keep desktop and mobile docs navigation in sync, especially for newly added sections like FAQ.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fedec7f and 0016780.

📒 Files selected for processing (4)
  • apps/web/src/routes/_view/docs/$.tsx (1 hunks)
  • apps/web/src/routes/_view/docs/-structure.ts (1 hunks)
  • apps/web/src/routes/_view/docs/route.tsx (3 hunks)
  • apps/web/src/routes/_view/route.tsx (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: Avoid creating a bunch of types/interfaces if they are not shared. Especially for function props, just inline them instead.
Never do manual state management for form/mutation. Use useForm (from tanstack-form) and useQuery/useMutation (from tanstack-query) instead for 99% of cases. Avoid patterns like setError.
If there are many classNames with conditional logic, use cn (import from @hypr/utils). It is similar to clsx. Always pass an array and split by logical grouping.
Use motion/react instead of framer-motion.

Files:

  • apps/web/src/routes/_view/docs/$.tsx
  • apps/web/src/routes/_view/docs/-structure.ts
  • apps/web/src/routes/_view/docs/route.tsx
  • apps/web/src/routes/_view/route.tsx
**/*.ts

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.ts: Agent implementations should use TypeScript and follow the established architectural patterns defined in the agent framework
Agent communication should use defined message protocols and interfaces

Files:

  • apps/web/src/routes/_view/docs/-structure.ts
🧠 Learnings (1)
📚 Learning: 2025-11-24T16:32:19.706Z
Learnt from: CR
Repo: fastrepl/hyprnote PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-24T16:32:19.706Z
Learning: Applies to **/*.{ts,tsx} : Use `motion/react` instead of `framer-motion`.

Applied to files:

  • apps/web/src/routes/_view/docs/$.tsx
⏰ 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). (2)
  • GitHub Check: fmt
  • GitHub Check: ci (macos, macos-14)
🔇 Additional comments (5)
apps/web/src/routes/_view/docs/-structure.ts (1)

2-7: FAQ section wiring looks consistent

Adding "faq" to sections and the faq: "faq/general" default page fits the existing pattern and matches how docsStructure.defaultPages is consumed for redirects. Just make sure there's a doc with slug "faq/general" and the expected section label so it shows up in navigation as intended.

apps/web/src/routes/_view/route.tsx (1)

15-15: Import path update to ./docs/-structure looks correct

The new import path correctly targets the renamed docs structure file and keeps MobileDocsDrawer using the shared structure.

apps/web/src/routes/_view/docs/$.tsx (1)

5-5: Docs route now correctly imports from ./-structure

Using docsStructure from the renamed -structure module keeps the beforeLoad redirect logic intact without any behavioral change.

apps/web/src/routes/_view/docs/route.tsx (2)

10-10: Shared docsStructure import is aligned with other routes

Importing docsStructure from ./-structure here matches the other docs routes and centralizes section configuration correctly.


113-117: DocsNavigation padding adjustment is straightforward

Updating the link classes to use pl-5 pr-3 instead of px-3 is a safe, purely visual tweak and doesn’t affect routing or behavior.

@argos-ci
Copy link

argos-ci bot commented Nov 30, 2025

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
web (Inspect) ⚠️ Changes detected (Review) 3 changed Nov 30, 2025, 5:25 AM

@ComputelessComputer ComputelessComputer merged commit 1f5d3aa into main Nov 30, 2025
13 of 14 checks passed
@ComputelessComputer ComputelessComputer deleted the refactor-docs-structure-file branch November 30, 2025 05:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant