add renpy#31
Conversation
|
Claude finished @cloud9c's task in 2m 17s —— View job Code ReviewAdds Ren'Py as a fifth engine. The change is small (+27/−1) and faithfully follows the JsDos/Ruffle pattern across Two issues worth fixing before merge, plus one optional cleanup. Issues1. Stale error message in The conflict-detection branch now also fires for A user who puts 2. Stale doc comments referencing only JSDOS/Ruffle (inline comment posted) Four spots still say "For JSDOS/Ruffle" but now also apply to Ren'Py:
Optional — refactor to reduce duplication
Notes
Todos
|
| } else if let Some(ref renpy) = self.renpy { | ||
| let mut params = serde_json::json!({ "executable": renpy.executable }); | ||
| if let Some(ref loader_url) = renpy.loader_url { | ||
| params["loaderUrl"] = serde_json::json!(loader_url); | ||
| } | ||
| Some(params) |
There was a problem hiding this comment.
This branch is the third near-identical copy of the same shape (executable + optional loader_url). Two related observations:
- The doc comment on
executable_entrypoint_params(line 297) and onexecutable_files_to_validate(line 322) still say "For JSDOS/Ruffle engines" — they need an update to include Ren'Py. Same for the comments atsrc/file_staging.rs:35andsrc/builds.rs:71. - Since
JsDosSection,RuffleSection, andRenPySectionare now byte-for-byte identical (version,executable,loader_url), consider extracting a sharedExecutableEngineSectionstruct and a small helper that yields(executable, loader_url)for whichever variant is active. Would collapse the three if/else branches here and inexecutable_files_to_validateandengine_versioninto a single match, and make adding the next engine a one-line change. Not blocking — just calling out that the duplication has crossed the threshold where it's starting to cost.
|
Claude finished @cloud9c's task in 2m 31s —— View job Code Review (re-run after sync)Re-reviewed after the push. The renpy diff is unchanged from the prior review — none of the previously flagged issues have been addressed yet. The two new commits on the branch ( Outstanding from prior review (all still present)1. Stale error message — The conflict-detection branch now fires for
2. Stale doc comments referencing only JSDOS/Ruffle (inline comment posted) Four spots still say "For JSDOS/Ruffle" but now also apply to Ren'Py:
3. Duplication (optional refactor)
New since last review
Notes
Todos
|
| params["loaderUrl"] = serde_json::json!(loader_url); | ||
| } | ||
| Some(params) | ||
| } else if let Some(ref renpy) = self.renpy { |
There was a problem hiding this comment.
Still unaddressed from the prior review — two related items:
1. Stale doc comments. Four spots still describe these helpers as "For JSDOS/Ruffle" only:
src/config.rs:297— doc onexecutable_entrypoint_paramssrc/config.rs:322— doc onexecutable_files_to_validatesrc/file_staging.rs:35—// Validate executable and loader_url files exist (for JSDOS/Ruffle)src/builds.rs:71—// Add entrypointParams if provided (for JSDOS/Ruffle)
All four now also apply to Ren'Py.
2. Duplication (optional). JsDosSection, RuffleSection, and RenPySection are byte-for-byte identical, and this is now the third copy of the same if/else shape (also in engine_version and executable_files_to_validate). Extracting a shared ExecutableEngineSection plus a small helper that yields (executable, loader_url) for whichever variant is active would collapse three branches into a match and make the next engine a one-line change. Not blocking.
| padding-top: ${TITLEBAR_STRIP_PX}px !important; | ||
| background-clip: content-box !important; | ||
| } | ||
| :is(header, nav)[class*="fixed"][class*="top-0"] { |
There was a problem hiding this comment.
Minor: [class*="fixed"][class*="top-0"] is a substring match, so it also catches Tailwind responsive variants like lg:top-0 (which intentionally only pin at one breakpoint) or fractional classes like top-0.5. Likely fine in practice given Wavedash's current SiteHeader markup, but worth knowing: this rule will pin those down by TITLEBAR_STRIP_PX unconditionally, ignoring breakpoint logic.
Not blocking — and this commit looks unrelated to the renpy feature; flagging here only because it landed in the same PR.
|
Claude finished @cloud9c's task in 1m 9s —— View job Code Review (re-run after sync)The latest push addresses all blocking feedback from the prior two reviews. Branch is now a clean single commit ( Previously flagged — now fixed
Still open (non-blocking)Duplication. Notes
VerdictLGTM. All blocking items addressed; only the optional refactor remains, which I'd leave to a follow-up. Todos
|
|
Claude finished @cloud9c's task in 1m 8s —— View job Code Review (re-run after refactor push)The latest push goes beyond addressing the prior feedback — it implements the optional refactor that was flagged but not blocking. Net diff is now +46/−50 (line reduction despite adding an engine), and the duplication concern from the last three reviews is fully resolved. Previously flagged — all fixed
Quality of the refactor
Notes (non-blocking)
VerdictLGTM. All prior feedback addressed, including the optional refactor. Clean implementation. Todos
|
|
Claude finished @cloud9c's task in 3m 52s —— View job Code Review (re-run after
|
| @@ -53,6 +54,12 @@ const PASSTHROUGH_PREFIXES = [ | |||
| // from /local-embed to /<entrypoint> after cookie planting; we inject the | |||
| // SDK bootstrap here as the file is served from disk. | |||
| const EMBED_BOOTSTRAP_TAG = '<script src="/embed.js?v=local"></script>'; | |||
| // Order is load-bearing: the loader shim installs setters on window.progress / | |||
| // Module.print / window.presplashEnd that must wrap renpy-pre.js's assignments, | |||
| // and depends on window.Wavedash existing from the SDK bootstrap. | |||
| const RENPY_ENGINE = "RENPY"; | |||
| const RENPY_LOADER_TAG = '<script src="/renpy-loader.js?v=local"></script>'; | |||
| const EMBED_BOOTSTRAP_WITH_RENPY = EMBED_BOOTSTRAP_TAG + RENPY_LOADER_TAG; | |||
There was a problem hiding this comment.
Two implicit cross-codebase contracts are now load-bearing here — both worth knowing about even though neither is fixable in this PR:
-
/renpy-loader.jsmust be served by origin. It's inPASSTHROUGH_PREFIXES, so the local dev server reverse-proxies the request to the real play worker. If the play worker isn't yet serving/renpy-loader.jsin whichever environment a developer is pointed at (staging vs prod), the<script>tag will inject but the fetch will 404 and the game silently fails to boot. -
The
?engine=RENPYquery param must be appended by the play worker's/local-embed → /<entrypoint>302. The detection atserver.ts:300(searchParams.get("engine") === RENPY_ENGINE) only fires when the browser arrives at the entrypoint with that query string. The CLI tells the API the build's engine viacreate_local_build(src/dev/mod.rs:132), but it's the play worker's redirect that has to translate that into a query-param tag on the Location header. If that side isn't deployed in sync, the loader tag won't be injected even when[renpy]is set inwavedash.toml.
Also: RENPY_ENGINE = "RENPY" here is a string duplicate of EngineKind::RenPy.as_label() in src/config.rs:197. They're effectively part of the API contract already (the label is also sent to the server), so the duplication is acceptable — flagging only because a silent rename on one side would break the other.
Not blocking. Worth a smoke test in wavedash dev against a real [renpy] config before merging if the play worker changes haven't shipped yet.
No description provided.