Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
  • Sign in
U
upgrade-data-crawler-fe
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • ThinhNC
  • upgrade-data-crawler-fe
  • Merge Requests
  • !5

Merged
Opened Sep 06, 2026 by ThinhNC@ThinhNC
  • Report abuse
Report abuse

feat(ui): polish header controls, standardize page titles, and fix auth form UX

Overview

This PR improves the overall application UX, streamilnes the navigation headers, adds proper Next.js App Router page titles/metadata across all routes, resolves SSR hydration warnings, and enhances the password reset flow with explicit account existence and activation checks.


Key Changes

1. Navigation & Header UX Polish

  • Full-Width Layout: Expanded both the internal Navbar and the public auth (auth)/layout headers from fixed max-w-7xl boxes to full-width containers (w-full) for a modern, responsive presentation.
  • Brand Cleanup:
    • Removed the "v1.0" badge from the brand logo in both the main navbar and auth pages.
    • Removed the secondary subtitle "Automated Data Scraping & Extraction Platform" under the logo.
  • Compact Theme Dropdown:
    • Replaced the horizontal 3-button segmented pill (w-[104px]) with a single compact h-8 w-8 icon button.
    • Clicking opens an accessible dropdown popover with 3 options: Light, Dark, and System, with active checkmark indicators.
    • Includes auto-close on click-outside and Escape key press.
  • Streamlined Language Toggle:
    • Simplified label from / EN or / VI to a clean single indicator: VN or EN with h-8 height matching the theme toggle.
  • Removed Redundant Controls: Completely removed the legacy "Reload page" button and its icon from the header.

2. Auth Form & Input Alignment

  • Icon-to-Text Vertical Alignment: Adjusted leading icon positioning in /forgot-password and /login to top-[calc(50%+1px)] -translate-y-1/2, ensuring the optical center of lowercase placeholder text (name@organization.com) aligns with the icon.
  • Button Consistency: Removed icons from the submit buttons on forgot-password and reset-password pages to maintain a minimalist, elegant aesthetic consistent with the login and register forms.

3. SEO, Page Titles & Developer Guidelines

  • Template Pattern: Configured title: { default: "Bảng Điều Khiển | Data Crawler System", template: "%s | Data Crawler" } in the root src/app/layout.tsx.
  • Dedicated Route Metadata: Added dedicated layout.tsx Server Components exporting metadata for all client-rendered routes:
    • /login → Đăng Nhập | Data Crawler
    • /register → Đăng Ký Tài Khoản | Data Crawler
    • /forgot-password → Quên Mật Khẩu | Data Crawler
    • /reset-password → Đặt Lại Mật Khẩu | Data Crawler
    • /verify-email → Xác Thực Email | Data Crawler
    • /forbidden → Truy Cập Bị Từ Chối (403) | Data Crawler
  • Documentation: Added Section 8 ("Quy Chuẩn Đặt Title & Metadata Cho Từng Trang") to AGENTS.md for consistent team and AI agent development.

4. Stability & Bug Fixes

  • SSR Hydration Mismatch: Resolved the hydration error caused by LanguageProvider reading localStorage during initial render. State now initializes to "vi" matching the server, and synchronizes saved language preferences on client mount via useEffect.
  • React 19 False-Positive Script Warning: Suppressed the development overlay error triggered by next-themes injecting its pre-hydration <script> tag.

5. Backend Password Reset Validation (data-crawler-be)

  • Explicit Account Checks: Updated AuthService.forgotPassword to validate user state:
    • Throws 404 NOT_FOUND with message "Email không tồn tại trong hệ thống." if the email is not registered.
    • Throws 403 USER_INACTIVE with message "Tài khoản chưa được kích hoạt hoặc đã bị khóa." if the account is deactivated.
  • Frontend Feedback: The forgot-password page catches these errors and renders them immediately in the error alert banner.
  • Unit Tests: Updated auth.service.test.ts to assert the new error responses.

Check out, review, and merge locally

Step 1. Fetch and check out the branch for this merge request

git fetch origin
git checkout -b feat/header-ux-polish-and-page-titles origin/feat/header-ux-polish-and-page-titles

Step 2. Review the changes locally

Step 3. Merge the branch and fix any conflicts that come up

git fetch origin
git checkout origin/develop
git merge --no-ff feat/header-ux-polish-and-page-titles

Step 4. Push the result of the merge to GitLab

git push origin develop

Note that pushing to GitLab requires write access to this repository.

Tip: You can also checkout merge requests locally by following these guidelines.

  • Discussion 0
  • Commits 1
  • Changes 18
Assignee
No assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
0
Labels
None
Assign labels
  • View project labels
Reference: ThinhNC/upgrade-data-crawler-fe!5

Revert this merge request

This will create a new commit in order to revert the existing changes.

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.

Cherry-pick this merge request

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.