Skip to content

Conversation

@Che-Zhu
Copy link
Collaborator

@Che-Zhu Che-Zhu commented Jan 19, 2026

Title

refactor: reorganize app directory and optimize image loading

Description

This PR refactors the application directory structure for better organization and improves image loading performance.

🏗 Directory Structure Refactor

  • Route Groups: Organized application routes into (auth) and (dashboard) groups to improve logical separation without affecting URL paths.
  • Error Handling: Introduced global error.tsx and not-found.tsx pages to handle application errors and 404 states gracefully.
  • Code Organization: Moved sealos-auth action to lib/actions and updated relevant imports.

⚡️ Performance & Best Practices

  • Image Optimization: Replaced the native <img> element with the Next.js <Image> component in SettingsDialog to leverage automatic image optimization.
  • Configuration: Updated next.config.ts to include avatars.githubusercontent.com in remotePatterns, allowing secure loading of GitHub user avatars.
  • Style: Optimized import order in modified components for consistency.

Type of change

  • Refactor (no functional changes, no api changes)
  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • Verified that the application builds successfully.
  • Verified that all routes (auth) and (dashboard) are accessible.
  • Verified that the GitHub avatar loads correctly in the Settings dialog.

- Organize application routes into (auth) and (dashboard) groups

- Add global error.tsx and not-found.tsx for better error handling

- Move sealos-auth action to lib directory

- Update references and imports
- Replace string img tag with next/image in settings dialog

- Allow avatars.githubusercontent.com in next.config.ts
@github-actions
Copy link

✅ PR Check Results: Passed

Build Checks

Check Status
Lint & Build ✅ Passed
Docker Build ✅ Passed

✨ Great work!

All checks passed successfully. Your PR is ready for review.

Details:

  • ✅ Code quality verified (linting passed)
  • ✅ Build successful
  • ✅ Docker image build verified (linux/amd64)
    Commit: d3c62b1a536c845d81653979b0bb4ad2b1ce9cda
    Branch: refactor/app-directory-structure

🔗 View Details:

@Che-Zhu Che-Zhu merged commit 1b9b63c into main Jan 19, 2026
9 checks passed
@Che-Zhu Che-Zhu deleted the refactor/app-directory-structure branch January 19, 2026 07:12
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.

2 participants