Skip to content

Conversation

@amaury901130
Copy link
Collaborator

Description

  • Add bloc use example.
  • Remove GPT action.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the authentication architecture by moving business logic from the AuthService to the AuthCubit, demonstrating proper Bloc usage patterns. It also removes the GPT review GitHub action workflow.

Key changes:

  • Architectural shift: AuthService now acts as a thin wrapper around the repository, while AuthCubit handles state management and orchestrates authentication logic
  • Dependency inversion: AuthCubit now depends on AuthService instead of the opposite relationship
  • UI updates: Pages now interact directly with AuthCubit instead of AuthService

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
modules/domain/lib/bloc/auth/auth_cubit.dart Added business logic methods (login, onValidate, logOut) and dependency on AuthService
modules/domain/lib/services/auth_service.dart Simplified to thin wrapper around repository, removed cubit dependency and state management logic
modules/domain/lib/init.dart Reordered dependency injection to reflect new architecture with AuthCubit depending on AuthService
app/lib/presentation/ui/pages/splash/splash_page.dart Updated to use AuthCubit instead of AuthService, added post-frame callback pattern
app/lib/presentation/ui/pages/login/login_page.dart Refactored to call AuthCubit methods, improved loading screen overlay implementation
app/lib/presentation/ui/pages/home/home_view.dart Changed to use AuthCubit for logout functionality
app/lib/presentation/ui/custom/loading_screen.dart Simplified widget by removing conditional rendering logic, now always displays loading indicator
modules/domain/test/auth_service_test.dart Removed tests as they no longer apply to simplified service
modules/domain/test/auth_cubit_test.dart Removed tests as cubit now has service dependency requiring different test approach
melos.yaml Added run:web script for running app in Chrome
.github/workflows/rs-gpt-review.yml Removed GPT review workflow
.github/pull_request_template.md Removed GPT review mention from template

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (1)

modules/domain/test/auth_service_test.dart:1

  • Tests for AuthService were removed, but the updated AuthCubit with new login(), onValidate(), and logOut() methods lacks test coverage. Since the original cubit tests were also deleted, the enhanced AuthCubit now has no tests covering its new business logic.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@amaury901130 amaury901130 merged commit be28f8f into main Nov 12, 2025
6 checks passed
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.

3 participants