4.9 KiB
Code review — NEO-16 (ZoomBandConfig + discrete zoom)
Date: 2026-04-08
Scope: Branch NEO-16-zoom-band-config-discrete-input vs origin/main (NEO-16 zoom bands + follow-up .tres tuning commits). Issue NEO-16; no PR URL supplied.
Base: origin/main @ 88653292104eddfc1db702f97b02a088fb80c1c7 (merge-base with HEAD at review time).
Follow-up: Suggestions and nits below were implemented in-repo (README, plan typing note, positive-distance validation, _sync_camera_state(effective_distance), telemetry TODO wording) and re-reviewed after ff83081.
Verdict
Approve
Summary
The branch delivers data-driven discrete zoom via ZoomBandConfig, InputMap actions, _unhandled_input on the follow rig, and CameraState updates for effective distance and band index, with clamp semantics and follow_distance fallback when config is missing, empty, or invalid. GdUnit coverage was added for the resource and effective_follow_distance. Module and dependency-register docs were updated. Overall risk is low: client-local camera only, no server coupling; logic is straightforward. Re-review after the follow-up commit found no additional issues.
Documentation checked
| Document | Result |
|---|---|
docs/plans/NEO-16-implementation-plan.md |
Matches — technical approach updated to document Resource export + get_script() and positive-distance fallback; aligns with implementation. |
docs/decomposition/modules/E1_M2_IsometricCameraController.md |
Matches — implementation snapshot updated for NEO-16 (config path, input actions, distance-only bands, fallback, signal + E9.M1 TODO). |
docs/decomposition/modules/module_dependency_register.md |
Matches — E1.M2 note reflects zoom bands shipped. |
docs/decomposition/modules/client_server_authority.md (camera client-local) |
Matches — no server use of camera pose introduced. |
docs/decomposition/modules/documentation_and_implementation_alignment.md |
N/A for mandatory table edits; E1.M2 status remains “In progress” appropriately (NEO-17/28 open). |
Blocking issues
None.
Suggestions
-
Done. Scope bullet extended; short Camera zoom note added for Input Map / layout remapping.client/README.md(testing section) — The bullet that lists covered scripts is now slightly stale: it does not mentionisometric_follow_camera.gd,camera_state.gd, orzoom_band_config.gd, thoughclient/test/includes suites for them. Per testing-expectations, consider extending that sentence so contributors know camera/zoom logic is under GdUnit. -
Done.ZoomBandConfigvalidation — Designer-editableband_distancescould theoretically include non-positive values, which would produce odd framing. Optional:_validate_propertyor a short runtime guard in the rig when loading config (non-blocking for prototype).all_band_distances_positive()on the resource;_zoom_config_valid()andeffective_follow_distancefall back when any distance is ≤ 0; tests added. -
Plan vs implementation (typing) — As above, add a brief note toDone. Technical approach step 2 rewritten accordingly.NEO-16-implementation-plan.mdthatzoom_band_configis exported asResource(or untyped) with script identity checked at runtime, so future readers are not confused by the plan’s “ZoomBandConfig” type mention.
Nits
-
Done._current_follow_distance()is invoked multiple times per_process/_sync_camera_state; a single localvar dper frame would avoid redundant calls (micro-optimization, clarity)._sync_camera_state(focus, effective_distance)takes the distance computed once per frame (and_readypassesdist0). -
Keyboard zoom:Done. Documented under Camera zoom in=without Shift may not match all layouts’ “+” expectations; wheel and keypad bindings mitigate this. Document in README or input remap note if QA reports gaps.client/README.md. -
Signal name vs telemetry TODO: Comment mentionsDone. TODO now references mapping product telemetry tocamera_zoom_changed; signal iszoom_band_changed— harmless but slightly inconsistent wording for whoever wires E9.M1 later.zoom_band_changed.
Verification
- From
client/: Godot 4.6 headless import (if needed) then GdUnit:
godot --headless --import --path . --quit-after 8
godot --headless --path . -s res://addons/gdUnit4/bin/GdUnitCmdTool.gd --ignoreHeadlessMode -a res://test - Observed on re-review: GdUnit passed locally: 28 test cases, 0 failures.
- Manual: F5, cycle zoom (wheel,
=,-, keypad), confirm framing and thatCameraState-consumers (if any) see band index + distance; confirmzoom_band_configcleared falls back tofollow_distance.