Skip to content

Conversation

@prisca-c
Copy link
Owner

Description

Type of Change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • Unit tests
  • Integration tests
  • End-to-end tests
  • Manual testing
  • Other (please describe):

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Related Issues

Fixes #3

Screenshots (if applicable)

N/A

Additional Context

N/A

@prisca-c prisca-c requested a review from Copilot April 20, 2025 16:41
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 introduces tuyau integration and updates navigation by replacing traditional href/src links with a new route-based approach across several pages. Key changes include:

  • Adding a new tuyau client configuration and provider for SSR and client-side hydration.
  • Updating the Link component to differentiate between internal route links and external links.
  • Propagating a new queueCount prop into the Search page and refactoring the matchmaking hook accordingly.

Reviewed Changes

Copilot reviewed 24 out of 27 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
inertia/pages/search.tsx Added queueCount property to SearchProps.
inertia/pages/profile.tsx, login.tsx, landing_page.tsx, home.tsx, game_session.tsx, profile_card.tsx Replaced src-based navigation with route-based links.
inertia/features/utils/components/link.tsx Updated Link component to support route and external props.
inertia/features/matchmaking/use_matchmaking.ts Updated matchmaking hook to use useForm for state updates and modified queueCount handling.
inertia/app/tuyau.ts, inertia/app/ssr.tsx, inertia/app/app.tsx, config files (.adonisjs/api.ts, config/tuyau.ts, cors.ts, adonisrc.ts) Integrated tuyau client configuration and commands for API routing and code generation support.
Files not reviewed (3)
  • .env.ci: Language not supported
  • .env.example: Language not supported
  • Makefile: Language not supported

@prisca-c prisca-c force-pushed the feat/setup_tuyau branch 7 times, most recently from cda5843 to 563dc01 Compare April 20, 2025 23:09
@prisca-c prisca-c requested a review from Copilot April 20, 2025 23:12
Repository owner deleted a comment from Copilot AI Apr 20, 2025
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 introduces the tuyau integration to improve navigation links and API interactions, along with updating the build and configuration tools to use the latest corepack tool.

  • Updated link components in various pages to use the "route" attribute instead of "src".
  • Integrated TuyauProvider in both SSR and client app setups.
  • Updated the matchmaking hook to use the Inertia useForm hook and adjusted docker-compose commands alongside several configuration files.

Reviewed Changes

Copilot reviewed 31 out of 36 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
inertia/pages/home.tsx Replaced "src" with "route" for the start button link.
inertia/pages/game_session.tsx Updated "src" to "route" for the back-to-menu link.
inertia/features/utils/components/link.tsx Refactored Link component to separate internal and external props.
inertia/features/matchmaking/use_matchmaking.ts Updated matchmaking hook to use useForm and adjust queue count state.
inertia/features/home/components/profile_card.tsx Replaced "src" with "route" for the profile link.
inertia/app/tuyau.ts Added tuyau client configuration.
inertia/app/ssr.tsx & inertia/app/app.tsx Wrapped app with TuyauProvider for enhanced API integration.
docker-compose.tools.yaml Updated commands to install the latest corepack version.
config/tuyau.ts, config/cors.ts, adonisrc.ts Configurations updated to support tuyau usage.
.github/workflows/tools.yml Adjusted workflow commands; removed biome-check run.
.adonisjs/api.ts Introduced new API definition and routes for tuyau integration.
Files not reviewed (5)
  • .env.ci: Language not supported
  • .env.example: Language not supported
  • Dockerfile: Language not supported
  • Makefile: Language not supported
  • biome.json: Language not supported

Comment on lines +23 to +25
})

setQueueCount(queueCountProps)
Copy link

Copilot AI Apr 20, 2025

Choose a reason for hiding this comment

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

Using queueCountProps to update state after posting may not reflect the new queue count returned from the API. Consider updating the state with the response data from the API call instead.

Suggested change
})
setQueueCount(queueCountProps)
onSuccess: (response: { queueCount: number }) => {
if (response.queueCount !== undefined) {
setQueueCount(response.queueCount)
}
},
})

Copilot uses AI. Check for mistakes.
@prisca-c prisca-c merged commit c887a2e into develop Apr 20, 2025
4 checks passed
@prisca-c prisca-c deleted the feat/setup_tuyau branch April 20, 2025 23:14
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.

[FEAT] : Make API typesafe and sync it to frontend

1 participant