Skip to content

Conversation

@iloveuhyeon
Copy link
Collaborator

πŸ’‘ κ°œμš”

  • μ½”μΈν† μŠ€ κ΅¬ν˜„

πŸ“ƒ μž‘μ—…λ‚΄μš©

Simulator.Screen.Recording.-.iPhone.16.Pro.Max.-.2025-06-01.at.03.45.23.mov

πŸ™‹β€β™‚οΈ μ§ˆλ¬Έμ‚¬ν•­

  • κ°œμ„ ν•  점, μ˜€νƒ€, μ½”λ“œμ— μ΄μƒν•œ 뢀뢄이 μžˆλ‹€λ©΄ Comment λ‹¬μ•„μ£Όμ„Έμš”.

🍴 μ‚¬μš©λ°©λ²•

 into feature/#174-matchlistpage-battingModal-api-connaction
Copy link
Contributor

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 implements the Coin Toss mini-game, wires stageId through routing/components, and updates the data/API layers to use a POST-based CoinTossRequest.

  • Introduces CoinTossScreen with video playback and BLoC-driven betting flow
  • Propagates stageId into MinigamePlayComponent and its buttons
  • Changes coin-toss API from a GET-with-amount to a POST-with-CoinTossRequest

Reviewed Changes

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

Show a summary per file
File Description
lib/presentation/loading/screens/un_developed_screen.dart Added placeholder β€œunder development” screen
lib/presentation/home/widgets/minigame/minigame_play_component.dart Added stageId, updated routing logic in minigame buttons
lib/presentation/home/screen/home_screen.dart Passed stageId into MinigamePlayComponent
lib/presentation/cointoss/screens/coin_toss_screen.dart Built Coin Toss UI, video logic, input validation, BLoC
lib/presentation/cointoss/bloc/coin_toss_event.dart Defined GetCoinToss and BettingCoinToss events
lib/presentation/cointoss/bloc/coin_toss_state.dart Added states for loading, success/failure, and error
lib/presentation/cointoss/bloc/coin_toss_bloc.dart Implemented event handlers, repository integration
lib/design_system/component/stage/gogo_stage_card_component.dart Switched from responsive .w width to a fixed value
lib/design_system/component/button/gogo_default_button.dart Introduced optional border parameter
lib/data/repositories/mini_game/mini_game_repository_impl.dart Changed getCoinTossBetting to accept CoinTossRequest
lib/data/repositories/mini_game/mini_game_repository.dart Updated interface signature for coin toss betting
lib/data/models/mini_game/bet_limit_response.dart Renamed GameBetLimit β†’ GameBetSetting, added JSON methods
lib/data/models/mini_game/betting/coin_toss_request.dart Added request model and CoinTossStatus enum
lib/data/data_sources/mini_game/mini_game_data_source_impl.dart Updated data source to use CoinTossRequest
lib/data/data_sources/mini_game/mini_game_data_source.dart Adjusted signature for coin toss betting
lib/data/api/mini_game/mini_game_api.dart Switched coin-toss endpoint to POST, updated body parameter
lib/data/models/shop/response/shop_ticket_status_response.dart Made ticket fields nullable, formatted factories
lib/data/models/shop/enum_type/ticket_type.dart Fixed enum typo from WAVARWEE β†’ YAVARWEE
ios/Runner/Info.plist Enabled io.flutter.embedded_views_preview
android/app/src/main/AndroidManifest.xml Enabled cleartext traffic (for debugging)
Comments suppressed due to low confidence (4)

lib/presentation/loading/screens/un_developed_screen.dart:16

  • The Column widget does not have a spacing parameter. Use SizedBox between children or consider Wrap or ListView.separated for spacing.
child: Column(spacing: 20,

android/app/src/main/AndroidManifest.xml:13

  • Enabling cleartext traffic can expose the app to insecure network requests. Restrict or remove this in production.
android:usesCleartextTraffic="true"

lib/design_system/component/stage/gogo_stage_card_component.dart:37

  • Removing the .w responsive extension may break layouts on different screen sizes. Consider keeping responsive sizing.
width: 343,

lib/data/api/mini_game/mini_game_api.dart:25

  • Switching the coin-toss endpoint from GET to POST is a breaking change. Ensure the backend supports POST and update consumers accordingly.
@POST("/minigame/coin-toss/{stage_id}")

],
),
GogoDefaultButton(
onTap: () => context.pop(context),
Copy link

Copilot AI May 31, 2025

Choose a reason for hiding this comment

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

Calling context.pop(context) passes context twice. It should be context.pop() (or just context.pop() without arguments).

Suggested change
onTap: () => context.pop(context),
onTap: () => context.pop(),

Copilot uses AI. Check for mistakes.
final int stageId;

const MinigameSelectButton({
MinigameSelectButton({
Copy link

Copilot AI May 31, 2025

Choose a reason for hiding this comment

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

[nitpick] The MinigameSelectButton constructor call is not marked const, losing compile-time constant benefits. Add const if its parameters are all const.

Suggested change
MinigameSelectButton({
const MinigameSelectButton({

Copilot uses AI. Check for mistakes.
MinigamePlayComponent(
activeGameResponse:
state.activeGameResponse,
stageId: stageId!,
Copy link

Copilot AI May 31, 2025

Choose a reason for hiding this comment

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

Using the force unwrap stageId! can throw if stageId is null. Consider validating or providing a non-nullable stageId earlier.

Suggested change
stageId: stageId!,
stageId: stageId,

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,21 @@
import 'package:json_annotation/json_annotation.dart';import '../../../../presentation/cointoss/bloc/coin_toss_event.dart';
Copy link

Copilot AI May 31, 2025

Choose a reason for hiding this comment

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

The data model is importing from the presentation layer, creating tight coupling. Move enums/events to the data or domain layer.

Copilot uses AI. Check for mistakes.
Comment on lines 231 to 235
if (_bet != null ||
(_videoPlayerController!
.value.isInitialized &&
_videoPlayerController!
.value.isCompleted)) {
Copy link

Copilot AI May 31, 2025

Choose a reason for hiding this comment

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

The condition uses || which allows betting when _bet is null if the video is ready. Change to && _bet != null to ensure a selection exists.

Suggested change
if (_bet != null ||
(_videoPlayerController!
.value.isInitialized &&
_videoPlayerController!
.value.isCompleted)) {
if (_bet != null &&
_videoPlayerController!
.value.isInitialized &&
_videoPlayerController!
.value.isCompleted) {

Copilot uses AI. Check for mistakes.
@iloveuhyeon iloveuhyeon merged commit 32aef94 into develop Jun 3, 2025
1 check passed
@iloveuhyeon iloveuhyeon deleted the feature/#87-feature-cointoss-minigame branch June 3, 2025 06:30
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