Wire the Vulcanus volcanism sliders into the preview render request - #401
Conversation
The engine has read volcanismFrequency and volcanismSize since phase 5 (#225), and wasmVulcanusParity.spec.ts sweeps both moved. But renderVulcanusThroughWasm wrote a literal 1 for each, so the Terrain tab's "Vulcanus volcanism" slider did nothing on the preview while every render spec stayed green. Same gap the Fulgora islands pair had, for the same reason: slider_rescale(1, 3) is exactly 1, so at the default both terms vanish and a render that ignores the control looks right. elevationCtxFromPreset now reads autoplaceControls.vulcanus_volcanism (default 1/1), the panel passes it as vulcanusVolcanismControls, and the dispatch reads it with `?? 1`. No Rust changed, so engine.wasm is untouched, and all 26 frozen vulcanus:render rows still match. They pass no volcanism field, so they are the default-unchanged guard. test/vulcanusVolcanismDispatch.spec.ts plants a moved slider. Its first draft stayed red AFTER the wiring, because it graded on the parity spec's "square at origin" window, 64 tiles across at 1 tile/px, which sits entirely inside the starting area where volcanism reaches nothing: 0 of 4096 pixels move for either lever. On the "wide, offset" window 1828 of 2304 move for frequency 2 and 1813 for size 3. The spec keeps the origin window as a control frozen at zero, and holds the neutral render on the wide window to that window's frozen tier-3 row. Why now: #84's remaining residual (21 wrong orientations, 22 surplus, 6 missing of 1569) needs a lever that moves the elevation input to the cliff rule while holding the rule fixed. Volcanism is that lever, and the preview could not exercise it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EadT1PyhSjDbjJwvLfo3zr
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (6)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughVulcanus volcanism frequency and size controls now flow from presets into elevation preview render requests and Vulcanus WASM rendering. Tests cover defaults, configured values, terrain and cliffs output, frozen compatibility, and the origin window. ChangesVulcanus volcanism controls
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to Vulcanus preview renders now reflect preset volcanism frequency and size settings while preserving neutral behavior when controls are absent. The change is ready to merge. Sequence Diagram(s)sequenceDiagram
participant Preset
participant ElevationPreviewCtx
participant ElevationPreviewPanel
participant ElevationRenderRequest
participant VulcanusWASM
Preset->>ElevationPreviewCtx: provide vulcanus_volcanism controls
ElevationPreviewCtx->>ElevationPreviewPanel: expose frequency and size
ElevationPreviewPanel->>ElevationRenderRequest: include vulcanusVolcanismControls
ElevationRenderRequest->>VulcanusWASM: dispatch frequency and size
VulcanusWASM-->>ElevationPreviewPanel: render elevation preview
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 5 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
The "Vulcanus volcanism" slider on the Terrain tab did nothing on the preview. The engine has read both levers since #225, and the field sweep in
test/wasmVulcanusParity.spec.tsmoves them, but the request layer wrote a literal 1 for each. Every render spec stayed green because 1 is the value that hides it:slider_rescale(1, 3)is exactly 1, so both terms vanish at the default. This is the Fulgora islands gap again.What changed
elevationCtxFromPresetreadsautoplaceControls.vulcanus_volcanism, defaulting to 1/1 like the Fulgora islands pair.vulcanusVolcanismControlson the render request.renderVulcanusThroughWasmreads it with?? 1in place of the two literals.No Rust changed and
engine.wasmis untouched. All 26 frozenvulcanus:renderrows still match. They pass no volcanism field, so they are the guard that a default render did not move.The spec, and the window trap it hit
test/vulcanusVolcanismDispatch.spec.tsplants a moved slider and asserts the bytes change. The first draft stayed red after the wiring was in. It graded on the parity spec'ssquare at originwindow, 64 tiles across at 1 tile per pixel, and that whole square sits inside the starting area, where the volcano spots are excluded and the mountain noise is flattened. Pixels moved when a lever is taken off 1, measured on the wired code:A spec on the origin window passes a hardcoded 1, which is the defect it exists to catch. The spec now grades on the
wide, offsetwindow, holds the neutral render there to that window's frozen tier-3 row, and keeps the origin window as a control frozen at zero. If that control ever moves, volcanism has started reaching the starting area, which would be a finding about the engine.Why now
#84's remaining residual (21 wrong orientations, 22 surplus, 6 missing of 1569 cliffs) needs a lever that moves the elevation input to the cliff rule while holding the rule, the collision tests and the ore rule fixed. Volcanism is that lever, and until this change the preview could not exercise it. This PR only wires the slider. The sweep itself is a separate decision.
Gate:
pnpm run verifygreen locally (see the commit).🤖 Generated with Claude Code
https://claude.ai/code/session_01EadT1PyhSjDbjJwvLfo3zr
Summary by CodeRabbit
New Features
Tests