You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: add a mapping wizard for controllers without a known profile #79
Let users map directions, confirm, back and optional buttons on joysticks SDL doesn't know as gamepads. Today such devices are detected but cannot drive the UI.
Motivation
The spec requires unknown controllers to be configurable; a two-button pad must reach every essential function.
Requirements
Reads raw buttons, hats and axes; calibrates neutral position, inversion and deadzone; allows redoing each step.
Timeout, safe cancel, test mode before saving; never overwrites the only working profile before confirmation.
Versioned JSON profiles with import/export, schema and size validation; no executable content.
Controller UX
Wizard driven by the device being mapped, with keyboard fallback.
Technical Notes
Raw joystick events from Sdl3InputBackend; profiles via a new IControllerProfileStore.
Acceptance Criteria
A generic joystick can be mapped, saved and used after restart.
Testing
Unit tests for new branches and for every bug reproduced before a fix (no trivial variations, see AGENTS.md). Manual with a generic USB pad.
Implemented in #121 (merged). CI covers everything that can run without a joystick:
the wizard state machine: neutral calibration, deadzone, inverted axes, one press per step, refusing reused inputs, skip, redo, timeout, and test mode
profile validation, the security boundary for imports: size, depth, unknown or duplicate fields, ranges, and required controls
the full journey with simulated raw events: map → test → save → restart → profile applied, with replacement only after confirmation, cancel never touching the saved profile, and import/export
Still open: the acceptance criterion needs real hardware. A generic USB joystick hasn't been mapped, saved and used after a restart on Windows yet. The checklist is in docs/TESTING.md under "Joystick sem perfil (assistente, #79)", and results go in docs/controller-compatibility.md. I'm leaving this issue open until that manual check has been done.
Follow-up: a pad with only a D-pad and two buttons can't open Actions or Menu unless those optional steps are mapped. The wizard asks for them first among the optional steps.
#128: profiles mapped without Actions (North) and/or Menu (Start) now open them by holding Confirm / Back for 0.6 s (short presses unchanged; the bottom bar shows "(segure)" on those glyphs). Covered by a unit test through the real router; still needs a manual check with a real two-button joystick (docs/TESTING.md, "Joystick sem perfil").
Implementation complete: wizard, profile store and validation (#121), two-button fallback (#128), covered by unit and journey tests with simulated events. The remaining real-joystick verification is tracked in #78 together with the rest of the hardware matrix.
Activity
nextestudios commentedon Sep 27, 2026
Implemented in #121 (merged). CI covers everything that can run without a joystick:
Still open: the acceptance criterion needs real hardware. A generic USB joystick hasn't been mapped, saved and used after a restart on Windows yet. The checklist is in
docs/TESTING.mdunder "Joystick sem perfil (assistente, #79)", and results go indocs/controller-compatibility.md. I'm leaving this issue open until that manual check has been done.Follow-up: a pad with only a D-pad and two buttons can't open Actions or Menu unless those optional steps are mapped. The wizard asks for them first among the optional steps.
fix: two-button pads reach Actions and Menu (#128)
nextestudios commentedon Sep 27, 2026
#128: profiles mapped without Actions (North) and/or Menu (Start) now open them by holding Confirm / Back for 0.6 s (short presses unchanged; the bottom bar shows "(segure)" on those glyphs). Covered by a unit test through the real router; still needs a manual check with a real two-button joystick (
docs/TESTING.md, "Joystick sem perfil").nextestudios commentedon Sep 27, 2026
Implementation complete: wizard, profile store and validation (#121), two-button fallback (#128), covered by unit and journey tests with simulated events. The remaining real-joystick verification is tracked in #78 together with the rest of the hardware matrix.