Skip to content

refactor(structure): move libs/types/media under src#91

Merged
ohprettyhak merged 9 commits intomainfrom
refactor/colocation-structure
Jan 31, 2026
Merged

refactor(structure): move libs/types/media under src#91
ohprettyhak merged 9 commits intomainfrom
refactor/colocation-structure

Conversation

@ohprettyhak
Copy link
Member

Summary

  • Move runtime/build-critical folders into src/:
    • libs/ -> src/libs/
    • types/ -> src/types/
    • content/posts/** -> src/media/posts/** (keep public URL prefix as /content/* via route)
  • Tighten TS path aliases so @/* points to src/* (prevents importing random root-level files)
  • Co-locate component dependency hook naming in giscus tester: useCategories.tsx -> use-categories.ts

Notes

  • /content/[...path] route still serves URLs under /content/*, but now reads files from src/media/*

Verification

  • pnpm -C semantic check
  • pnpm -C semantic build

@coauthors
Copy link

coauthors bot commented Jan 31, 2026

People can be co-author:

Candidate Reasons Count Add this as commit message
@ohprettyhak #91 1 Co-authored-by: ohprettyhak <97780352+ohprettyhak@users.noreply.github.com>

@netlify
Copy link

netlify bot commented Jan 31, 2026

Deploy Preview for semantic-template ready!

Name Link
🔨 Latest commit 0242609
🔍 Latest deploy log https://app.netlify.com/projects/semantic-template/deploys/697dd9452dcd13000846f5bb
😎 Deploy Preview https://deploy-preview-91--semantic-template.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.

@gemini-code-assist
Copy link

Summary of Changes

Hello @ohprettyhak, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly refactors the project's internal directory structure by consolidating various critical runtime and build-related folders, such as libs and types, directly under the src/ directory. This reorganization aims to enhance the clarity and maintainability of the codebase by centralizing core components. Additionally, it includes updates to TypeScript path aliases to enforce more precise import resolution and a minor file rename to align with established naming conventions.

Highlights

  • Directory Structure Refactoring: The libs/ and types/ directories have been moved into the src/ directory to centralize core source code.
  • Content Media Relocation: The content/posts/** files have been relocated to src/media/posts/**. The public URL prefix /content/* remains unchanged, with routing adjusted to read from the new src/media/* path.
  • TypeScript Path Alias Tightening: TypeScript path aliases in tsconfig.json have been updated. @/* now points specifically to src/* and @libs/* to src/libs/*, enforcing stricter import rules.
  • File Renaming for Consistency: The useCategories.tsx file within the giscus tester component has been renamed to use-categories.ts for improved naming consistency.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request is a solid refactoring effort that improves the project structure by moving key directories into src/, tightening TypeScript path aliases, and improving file naming conventions. The changes are logical and well-implemented. I have one suggestion regarding the updated path aliases in tsconfig.json to further enhance consistency and maintainability.

@ohprettyhak ohprettyhak merged commit e1ba482 into main Jan 31, 2026
5 checks passed
@ohprettyhak ohprettyhak deleted the refactor/colocation-structure branch January 31, 2026 10:32
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