Skip to content

Integrate PrintedWaste queue API and add QueueServerSelectModal#214

Merged
Kief5555 merged 13 commits intoOpenCloudGaming:devfrom
Kief5555:main
Apr 11, 2026
Merged

Integrate PrintedWaste queue API and add QueueServerSelectModal#214
Kief5555 merged 13 commits intoOpenCloudGaming:devfrom
Kief5555:main

Conversation

@Kief5555
Copy link
Copy Markdown
Collaborator

@Kief5555 Kief5555 commented Apr 8, 2026

This pull request introduces a new integration with the PrintedWaste GFN queue API, allowing the app to fetch and display real-time queue wait times for free-tier users before launching a game. It also refactors the game launch flow to present a queue server selection modal to free users, improving the user experience. Supporting changes include updates to IPC channels, shared types, and API definitions.

PrintedWaste Queue Integration:

  • Added a new IPC handler in index.ts to fetch queue data from the PrintedWaste API, including custom User-Agent headers and error handling.
  • Defined new types PrintedWasteZone and PrintedWasteQueueData in gfn.ts to represent the structure of the queue data returned by the API.
  • Added the fetchPrintedWasteQueue method to the OpenNowApi interface and exposed it in the preload script for renderer access. [1] [2] [3]
  • Registered a new IPC channel constant PRINTEDWASTE_QUEUE_FETCH in ipc.ts.

Game Launch Flow and UI:

  • Refactored the game launch handler in App.tsx to show a queue server selection modal (QueueServerSelectModal) for free-tier users before starting a session. The modal uses the new PrintedWaste queue data to inform server selection. [1] [2] [3] [4] [5] [6] [7] [8] [9]

Dependency and Metadata Updates:

  • Updated package-lock.json to version 0.3.2 and made minor adjustments to dependency metadata, such as adding or removing the peer field for several packages. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]

Closes: #160

Kief5555 added 2 commits April 7, 2026 23:45
…d QueueServerSelectModal component

- Updated package version to 0.3.2.
- Implemented IPC handler for fetching queue data from PrintedWaste API.
- Added fetchPrintedWasteQueue method to OpenNowApi interface.
- Created QueueServerSelectModal component for user interaction with queue data.
- Enhanced App component to handle queue selection for free-tier users.
@Kief5555 Kief5555 marked this pull request as draft April 8, 2026 06:48
@Kief5555
Copy link
Copy Markdown
Collaborator Author

Kief5555 commented Apr 8, 2026

5479

…d cleaning up unused code

- Removed the regions prop from QueueServerSelectModal as it was no longer needed.
- Cleaned up unused imports and constants related to region handling.
- Updated related logic to ensure proper functionality without the regions data.
@Kief5555 Kief5555 marked this pull request as ready for review April 8, 2026 07:03
…Card functionality

- Removed unnecessary autoZone comparison logic for cleaner code.
- Updated the layout of the recommended server cards to always display two side by side.
- Improved RecommendCard component to handle null zone values and added disabled state for better user experience.
- Adjusted styles for better visual feedback during loading and interaction.
@Kief5555
Copy link
Copy Markdown
Collaborator Author

Kief5555 commented Apr 8, 2026

@zortos293

@zortos293
Copy link
Copy Markdown
Collaborator

They look into it when I have time. Not a high priority at the moment

@Kief5555 Kief5555 changed the title [DRAFT] Integrate PrintedWaste queue API and add QueueServerSelectModal Integrate PrintedWaste queue API and add QueueServerSelectModal Apr 8, 2026
@zortos293 zortos293 changed the base branch from main to dev April 8, 2026 19:59
@zortos293
Copy link
Copy Markdown
Collaborator

Can you fix merge conflicts?

Kief5555 and others added 7 commits April 8, 2026 14:32
- Changed the .gitignore entry for package-lock.json to ensure opennow-stable/package-lock.json is tracked.
- Removed outdated dependencies and added new ones for improved functionality.
- Updated node engine requirements for compatibility.
- Cleaned up unnecessary entries to streamline the package-lock file.
- Added new dev dependencies for jsonfile and universalify to enhance functionality.
- Updated existing entries to ensure compatibility with the latest versions.
…theming

- Changed hardcoded color values to CSS variables for better theming consistency.
- Updated ping and queue color functions to use new color values.
- Adjusted text and background colors to align with the new design system.
…etter user experience

- Updated hover effects for the Cancel and Launch buttons to improve visual feedback.
- Changed background, border, and text color styles to utilize CSS variables for consistency.
- Enhanced the Launch button with a gradient background and box shadow on hover.
@Kief5555
Copy link
Copy Markdown
Collaborator Author

@zortos293 bump

@zortos293
Copy link
Copy Markdown
Collaborator

@capyai review this

@zortos293 zortos293 self-requested a review April 11, 2026 08:48
@Kief5555 Kief5555 requested a review from Copilot April 11, 2026 18:57
@Kief5555 Kief5555 self-assigned this Apr 11, 2026
Copy link
Copy Markdown
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

Adds a PrintedWaste queue-data integration (via IPC) and introduces a new renderer modal that lets free-tier users choose a preferred GFN routing zone (auto/closest/manual) before launching.

Changes:

  • Added a new IPC channel + main/preload plumbing to fetch queue wait-time data from api.printedwaste.com.
  • Extended shared OpenNowApi + types with fetchPrintedWasteQueue() and PrintedWaste queue payload types.
  • Refactored the renderer launch flow to gate FREE-tier launches behind a new QueueServerSelectModal UI.

Reviewed changes

Copilot reviewed 6 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
opennow-stable/src/shared/ipc.ts Adds PRINTEDWASTE_QUEUE_FETCH IPC channel constant.
opennow-stable/src/shared/gfn.ts Adds PrintedWaste queue types and the new OpenNowApi.fetchPrintedWasteQueue() method.
opennow-stable/src/preload/index.ts Exposes fetchPrintedWasteQueue() to the renderer via window.openNow.
opennow-stable/src/main/index.ts Registers an IPC handler that fetches PrintedWaste queue JSON from the main process.
opennow-stable/src/renderer/src/components/QueueServerSelectModal.tsx New modal UI to display queue + ping data and select a routing zone.
opennow-stable/src/renderer/src/App.tsx Adds FREE-tier gating and wires the new modal into the play flow.
opennow-stable/package-lock.json Dependency lock updates.
.gitignore Updates lockfile ignore rules.
Files not reviewed (1)
  • opennow-stable/package-lock.json: Language not supported

…data normalization

- Introduced timeout handling for API requests and responses.
- Added validation for API response structure to ensure expected data types.
- Normalized queue data format for better consistency and error handling.
- Updated QueueServerSelectModal to utilize initial queue data and refresh it while open.
- Implemented session storage for ping results to optimize performance.
@Kief5555 Kief5555 merged commit 2a1b031 into OpenCloudGaming:dev Apr 11, 2026
5 checks passed
@Kief5555 Kief5555 mentioned this pull request Apr 11, 2026
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.

Queue Tracker

3 participants