-
Notifications
You must be signed in to change notification settings - Fork 1
Feat: Add tuyau #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: Add tuyau #13
Conversation
There was a problem hiding this 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
cda5843 to
563dc01
Compare
563dc01 to
14f4874
Compare
There was a problem hiding this 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
| }) | ||
|
|
||
| setQueueCount(queueCountProps) |
Copilot
AI
Apr 20, 2025
There was a problem hiding this comment.
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.
| }) | |
| setQueueCount(queueCountProps) | |
| onSuccess: (response: { queueCount: number }) => { | |
| if (response.queueCount !== undefined) { | |
| setQueueCount(response.queueCount) | |
| } | |
| }, | |
| }) |
Description
Type of Change
How Has This Been Tested?
Checklist
Related Issues
Fixes #3
Screenshots (if applicable)
N/A
Additional Context
N/A