[chore] Remove dead attachInput() + fix stale OS-key-repeat comment in input.ts #51
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
frankenbit/cellblock#51
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up from PR #47 (#31 soft-drop) review — Surveyor + Shipwright agreed.
client/src/input.tsexportsattachInput()(keydown/keyup wiring with a held-set +ONCE_PER_PRESS), but it is never called —main.tsimports onlyactionForCode; the live keyboard handler is inline inmain.ts. SoattachInputis dead code.Worse, its comment is now doc-rot:
After #47, soft-drop is game-tick driven, not OS-key-repeat — so this comment actively contradicts the live behaviour and would mislead the next reader.
Options
attachInput()+ONCE_PER_PRESSentirely (keepactionForCode+KEY_MAP+Action), drop the stale comment. Simplest — removes the unused surface. Right if we don't intend to consolidate the inline handler back into a reusable attach fn.attachInput()— fold the inlinemain.tskeyboard handler into it (incl. the new soft-drop held-state + loop coupling) and fix the comment. Right if we want the input wiring testable in isolation / reused. Bigger — the soft-drop loop driver lives in the render loop, so this isn't a clean lift.Lean: Option 1 (delete) for jam-scope — the inline handler is the de-facto one and works. Revisit Option 2 only if input grows.
Scope / effort
Shipwright — input-handling. Size/XS (delete + comment) or Size/S (Option 2). Not urgent.