Repository navigation
Host a new lobby from a poki.com link carrying gdhost - #6104
Conversation
A link like poki.com/en/g/openfront?gdhost=1 now opens OpenFront on Poki straight into hosting a new lobby, the way CrazyGames' instant multiplayer does: PokiSDK.isInstantMultiplayer() reads the param through getURLParam, and Main.handleUrl already opens the host modal for it. An invite (gdgameId) on the same link still joins instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
WalkthroughPokiSDK now detects instant multiplayer host links when the SDK is ready, except when a gameId is present. Main retains the host-modal behavior and changes the log label from CrazyGames to Portal. Tests cover host links, invite links, and off-Poki behavior. ChangesPortal instant multiplayer
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant BrowserURL
participant PokiSDK
participant Main
participant HostModal
Main->>PokiSDK: check instant multiplayer status
PokiSDK->>BrowserURL: read host and gameId parameters
PokiSDK-->>Main: return status
Main->>HostModal: open when instant multiplayer is enabled
Possibly related PRs
Suggested reviewers: Merge Risk: ⚪ Minimal · up to
|
🤖 Claude Code ReviewVerdict: Looks good. Findings: 0 critical, 0 major, 0 minor. No issues found. Checked for bugs and CLAUDE.md compliance.
|
Summary
A poki.com link carrying
gdhostnow opens OpenFront on Poki straight into hosting a new lobby, like CrazyGames' instant multiplayer:Poki passes
gd-prefixed params on its page down to our frame, andPokiSDK.getURLParam("host")reads them.PokiSDK.isInstantMultiplayer()now returns true for one, andMain.handleUrlalready opens the host modal when it does (it always returnedfalsebefore). If the link also carries an invite (gdgameId), the player joins that lobby instead.Poki has no invite button or instant-multiplayer API of its own;
shareableURL/getURLParamare its only sharing primitives (developers.poki.com/guide/sdk-html5).Reloads:
keepPokiParamsalready dropsgdparams from the query it restores, so navigating inside our frame (e.g. back home after a game) doesn't host another lobby. Reloading the whole poki.com page keeps the param and hosts a fresh one.Test plan
PokiSDK.test.ts:gdhost→ hosts;gdhost+gdgameId→ doesn't; off Poki → false.npx vitest tests/client/PokiSDK.test.ts tests/client/MainInitialize.test.ts(45 passed),oxfmt --check.?gdhost=1.🤖 Generated with Claude Code