Skip to content

Conversation

neuromancer
Copy link

@neuromancer neuromancer commented Aug 16, 2025

This PR brings the ZOOM platform to Heroic.

image

The code is based on the corresponding Lutris PR, which is known to work correctly. Please help me providing feedback and flagging unrelated changed as this was heavily assisted by Gemini taking the Lutris implementation as a base (which I developed personally).

Checklist

  • Tested the feature and it's working on a current and clean install.
  • Tested the main App features and they are still working on a current and clean install. (Login, Install, Play, Uninstall, Move games, etc.)
  • Created / Updated Tests (If necessary)
  • Created / Updated documentation (If necessary)

@flavioislima
Copy link
Member

flavioislima commented Aug 16, 2025

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@neuromancer
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

Copy link
Collaborator

@CommandMC CommandMC left a comment

Choose a reason for hiding this comment

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

There seem to be unnecessary Added Zoom/similar comments in changes concerning the Frontend. Remnant of LLM w/ Agent mode?

Comment on lines 141 to 152
const zoomLibraryStore = new CacheStore<GameInfo[], 'games'>('zoom_library', null) // Added zoomLibraryStore
const zoomInstalledGamesStore = new TypeCheckedStoreFrontend( // Added zoomInstalledGamesStore
'zoomInstalledGamesStore',
{
cwd: 'zoom_store',
name: 'installed'
}
)
const zoomConfigStore = new TypeCheckedStoreFrontend('zoomConfigStore', { // Added zoomConfigStore
cwd: 'zoom_store'
})

Copy link
Collaborator

Choose a reason for hiding this comment

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

The Frontend directly messing with Electron Stores is a practice I'd like to avoid in the future if possible. Ideally use a Zustand store & push updates from the Backend

Copy link
Author

Choose a reason for hiding this comment

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

Do you have a good example of how the code could look like from other stores? (or even from other codebases)

@neuromancer
Copy link
Author

I'm also unsure how to deal with the linting. The CI output shows a large number of things to fix, but in code that was never modified in this PR. How to restrict the output to only the issues that are related with the code modified?

@arielj
Copy link
Collaborator

arielj commented Aug 17, 2025

I'm also unsure how to deal with the linting. The CI output shows a large number of things to fix, but in code that was never modified in this PR. How to restrict the output to only the issues that are related with the code modified?

you only need to worry about the errors, not the warnings, like:

/home/runner/work/HeroicGamesLauncher/HeroicGamesLauncher/src/backend/storeManagers/zoom/electronStores.ts
Error:   4:10  error  'ZoomGameInfo' is defined but never used  @typescript-eslint/no-unused-vars

there are 12 errors and those are part of this PR

@CommandMC
Copy link
Collaborator

You can also run pnpm lint --quiet locally to make ESLint only show errors, that's probably more convenient than searching through the action log here

@neuromancer
Copy link
Author

CI is finally passing 🎉 . This PR still need a good amount of work, but this is the right track already. Thanks for your feedback and comments. 🙏

nile: 'Amazon Games',
sideload: 'Other'
sideload: 'Other',
zoom: 'Zoom'
Copy link

@doZennn doZennn Aug 17, 2025

Choose a reason for hiding this comment

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

I think references to the store should be "ZOOM Platform" or even "zp" if a short string is needed not "Zoom" as that's simply wrong.
Not sure if classes/variables and stuff should be changed too.

Copy link
Member

@imLinguin imLinguin left a comment

Choose a reason for hiding this comment

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

Sorry for reviews while this is still a draft. Just wanted to point these obvious things out before the integration is too reliant on those points 🙏

Comment on lines 359 to 400
export function openAuthWindow(
url: string,
successUrl: string,
callback: (url: string) => Promise<{ status: 'done' | 'error' }>
): Promise<{ status: 'done' | 'error' }> {
return new Promise((resolve) => {
let resolved = false
const authWindow = new BrowserWindow({
width: 800,
height: 600,
show: false,
webPreferences: {
nodeIntegration: false,
contextIsolation: true
}
})

authWindow.on('closed', () => {
if (!resolved) {
resolved = true
resolve({ status: 'error' })
}
})

authWindow.webContents.on('did-navigate', async (event, newUrl) => {
if (newUrl.startsWith(successUrl)) {
const result = await callback(newUrl)
if (result.status === 'done') {
if (!resolved) {
resolved = true
resolve(result)
}
authWindow.close()
}
}
})

authWindow.loadURL(url)
authWindow.show()
})
}

Copy link
Member

Choose a reason for hiding this comment

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

Lets avoid doing separate windows for auth. We already have auth flow ready WebView component, which it seems like you already adjusted

Copy link
Author

Choose a reason for hiding this comment

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

Can you take a look to see if the new code makes sense? It a bit buggy but at least wanted to know if it is going into the right direction.

@neuromancer
Copy link
Author

Reviews and comments even at this point are very appreciated, since this is my first PR to Heroic (and a large one!)

@neuromancer neuromancer changed the title ZOOM Platform runner/service implementation [Feat] ZOOM Platform runner/service implementation Aug 21, 2025
@neuromancer
Copy link
Author

Can I get a second round of reviews and comments please? 😇

@neuromancer neuromancer marked this pull request as ready for review September 23, 2025 20:51
@neuromancer
Copy link
Author

Should I add specific tests and documentation for this?

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.

6 participants