Skip to content

feat(drive): Digits 1 to 9 play the Character's Behaviors - #2062

Merged
omesser merged 2 commits into
mainfrom
feat/1949-digit-behaviors
Nov 1, 2026
Merged

omesser merged 2 commits into
mainfrom
feat/1949-digit-behaviors

Conversation

@omesser

@omesser omesser commented Nov 1, 2026

Copy link
Copy Markdown
Owner

Why

While a fidget is possessed, the arrows walk it and Space jumps it, and the other Behaviors have no key. Digits 1 to 9 now play those Behaviors, in name order, skipping walk and jump. A press goes through the Engine's existing permitted gate, the same one a proposal uses. Letters stay unbound, so A and D do not collide with WASD.

What changed

The mapping lives on the possession path. possession.rs turns a digit press into an intent, and the Engine starts that Behavior with start_behavior. There is no drive.rs. The shell already had the key path, and an empty file would only split it.

The bindings card lists each digit with its Behavior name. A Character with more than nine eligible Behaviors binds only the first nine. A digit past the list does nothing. Up and Down climb is not in this change.

How to verify

cargo test -p fidget-core --lib passed, 726 tests. The new ones are digits_follow_behavior_names_skipping_walk_and_jump, only_the_first_nine_behaviors_get_digits, a_digit_plays_that_behavior_and_one_past_the_list_does_nothing, a_digit_the_state_forbids_is_refused_like_a_proposal, and a_character_with_more_than_nine_behaviors_binds_only_the_first_nine.

node --test tests/possession-card.test.js passed, 14 tests, including the card lists digits for the character's behaviors, skipping walk and jump and a character with more than nine behaviors gets digits for the first nine.

cargo test -p fidget --bin fidget -- possession:: only_the_bubble_owner passed, 7 tests.

Notes

Not rebased onto the open climb pull request. A digit the State forbids is reported as refused, the same as a proposal.

Closes #1949

— Grok Build, on @omesser's behalf.

A press plays the Behavior in that name-order place, skipping walk and jump, through the Engine's existing permitted gate.
@omesser omesser added the enhancement New feature or request label Nov 1, 2026
omesser

This comment was marked as outdated.

The card numbered a second copy of the mapping, so a non-ASCII name could label the wrong Behavior. The shell now sends the mapped list and the card only numbers it. Digits come from Digit1 and Numpad1, so an AZERTY top row still plays. A digit's trace says possession, and the card writes the name as a label.
@omesser

omesser commented Nov 1, 2026

Copy link
Copy Markdown
Owner Author

Addressed the non-blocking notes at e9cc2063.

  • One list. The frame loop sends digit_behaviors, and the card only numbers that list. It no longer sorts or drops names, so a non-ASCII name cannot label the wrong Behavior.
  • Layouts. A digit is Digit1 through Digit9 or Numpad1 through Numpad9. On AZERTY the top row still plays, because the page no longer reads the character the layout produces.
  • Trace. A digit still goes into director::remember, since that is what was on screen. The trace line says possession: for a digit and director: for a proposal, including a refusal.
  • Labels. The card writes nod as Nod, beside Walk and Jump.

node --test tests/possession-card.test.js passed, 14 tests. The digit mapping tests and only_the_bubble_owner passed. Workspace clippy is clean.

— Grok Build, on @omesser's behalf.

@omesser omesser left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Soft CLEARED

Tip: e9cc2063

What changed

  • One list: the frame loop sends the digit_behaviors list to the card, and the card only numbers it and capitalizes each name. The JS copy of the rule is gone.
  • Physical keys: digits come from event.code Digit1 to Digit9 or Numpad1 to Numpad9, so the AZERTY top row plays too.
  • Trace: a digit-played or digit-refused Behavior logs possession: <id> <name>, and a proposal keeps director:.

What is wrong
Nothing blocking. All four earlier notes are addressed. No log reader matches the new possession: lines, and no prompt, MCP, ACP or serialized field changed.

Soft-FIX
None.

Non-blocking

  • Numpad with NumLock off: event.code is still Numpad1 when NumLock is off and the key means End, so it now plays digit 1. That is probably fine while possessed.
  • Refused label: the refused line picks its word from whether a digit was pressed this tick, so a Poke refused on the same tick as a digit would log as possession:. That case is rare and only affects the trace.

Verified: tests/possession-card.test.js 14 pass, core possession tests 44 pass, the shell placement test passes with the new list, fmt clean.

— Cursor agent (Architect), on @omesser's behalf.

@omesser
omesser merged commit 1127d21 into main Nov 1, 2026
10 checks passed
omesser added a commit that referenced this pull request Nov 1, 2026
Keeps Up and Down beside #2062's digits: the card, the keymap,
parse_key and Key carry both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@omesser
omesser deleted the feat/1949-digit-behaviors branch November 2, 2026 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(drive): Digits 1 to 9 play the Character's Behaviors

1 participant