Highscore initials: input stays active after Enter-commit (Backspace edits, Re-Enter re-submits, no keyboard exit) #80

Closed
opened 2026-06-22 11:43:54 +02:00 by bosun · 1 comment
Owner

Behavior (operator-observed 2026-06-22)

After entering initials at highscore entry + pressing Enter:

  1. Screen did not transition away from the initials-entry state
  2. Re-Enter re-applied the already-committed initials
  3. Backspace continued removing letters from the input despite the prior Enter-commit
  4. Only way to leave was clicking one of the on-screen buttons with the mouse

Multi-layer concerns

Client-side state machine (likely root cause): input field stays active after Enter-commit. Should deactivate or transition the screen.

Server-side dedup question: needs probing — if the client emits a second submit when Re-Enter fires post-commit, does Engineer's server-side path (leaderboard.go Add() + dedup) no-op the duplicate, OR does it create a second leaderboard entry? If the latter, the client-side bug has correctness implications. If the former, it's UX-annoyance only.

Path forward:

  • Client-side fix: deactivate input on Enter-commit (Shipwright lane)
  • Optional server-side: probe dedup behavior + add explicit "this initials+score already submitted" guard if missing (Engineer lane; only needed if probe confirms duplicate path exists)

Lane + size

Shipwright lane primary (client-side state machine, likely size/S — same shape as #59 + #66 + #73 state-machine work).
Engineer lane optional (server-side dedup probe + possible guard; size unclear pending probe).

Acceptance criteria

  1. After Enter-commit on initials, the input field becomes inactive (no Backspace edits, no Re-Enter re-submit)
  2. Screen transitions away from initials-entry to the natural next state (game-over → play-again, or leaderboard-display)
  3. Keyboard navigation away from initials-entry possible (Enter advances, no keyboard-trap)
  4. Server-side: NO content-dedup added — duplicates are SEMANTICALLY VALID on a leaderboard (legit ties: two players, same initials, same score). Engineer probed leaderboard.go:77-95 on current main: submit() has no dedup; second POST with same (initials, score) places a second row when score ranks. Client-only fix kills double-submit at source. Reshape from original AC#4 (which encoded a content-dedup mechanism-assumption that would false-positive on legit ties). FUTURE-TRIGGER: if empirical Re-Enter dups survive client fix in prod, file follow-up for idempotency-token-based guard (Engineer lane) — correct mechanism is per-run client submit-id, NOT content-match.
  5. No regression on first-submit path (current correct behavior)

Cross-ref

Filed alongside cellblock#79 (multiplayer name-entry escape) — both surface the same broader gap: keyboard-navigation-tree completeness, which is filed as a separate meta-tracker.

## Behavior (operator-observed 2026-06-22) After entering initials at highscore entry + pressing Enter: 1. Screen did not transition away from the initials-entry state 2. Re-Enter re-applied the already-committed initials 3. Backspace continued removing letters from the input despite the prior Enter-commit 4. Only way to leave was clicking one of the on-screen buttons with the mouse ## Multi-layer concerns **Client-side state machine (likely root cause)**: input field stays active after Enter-commit. Should deactivate or transition the screen. **Server-side dedup question**: needs probing — if the client emits a second submit when Re-Enter fires post-commit, does Engineer's server-side path (leaderboard.go `Add()` + dedup) no-op the duplicate, OR does it create a second leaderboard entry? If the latter, the client-side bug has correctness implications. If the former, it's UX-annoyance only. **Path forward**: - Client-side fix: deactivate input on Enter-commit (Shipwright lane) - Optional server-side: probe dedup behavior + add explicit "this initials+score already submitted" guard if missing (Engineer lane; only needed if probe confirms duplicate path exists) ## Lane + size Shipwright lane primary (client-side state machine, likely size/S — same shape as #59 + #66 + #73 state-machine work). Engineer lane optional (server-side dedup probe + possible guard; size unclear pending probe). ## Acceptance criteria 1. After Enter-commit on initials, the input field becomes inactive (no Backspace edits, no Re-Enter re-submit) 2. Screen transitions away from initials-entry to the natural next state (game-over → play-again, or leaderboard-display) 3. Keyboard navigation away from initials-entry possible (Enter advances, no keyboard-trap) 4. Server-side: NO content-dedup added — duplicates are SEMANTICALLY VALID on a leaderboard (legit ties: two players, same initials, same score). Engineer probed leaderboard.go:77-95 on current main: submit() has no dedup; second POST with same (initials, score) places a second row when score ranks. Client-only fix kills double-submit at source. Reshape from original AC#4 (which encoded a content-dedup mechanism-assumption that would false-positive on legit ties). FUTURE-TRIGGER: if empirical Re-Enter dups survive client fix in prod, file follow-up for idempotency-token-based guard (Engineer lane) — correct mechanism is per-run client submit-id, NOT content-match. 5. No regression on first-submit path (current correct behavior) ## Cross-ref Filed alongside cellblock#79 (multiplayer name-entry escape) — both surface the same broader gap: keyboard-navigation-tree completeness, which is filed as a separate meta-tracker.
bosun closed this issue 2026-06-22 12:55:49 +02:00
Author
Owner

AC-tick pass — closed by PR #84 @bd14396fe0 (squashed):

  1. After Enter-commit on initials, input becomes inert ✓ — synchronous submitting-phase blocks Backspace edits + Re-Enter re-submission via state-machine inert flag.
  2. Screen transitions away from initials-entry to natural next state ✓ — submitted state shows HIGH SCORES + own entry highlighted + SCORE SAVED! per Herald + Shipwright source-grounding (reuse of existing submitted-state, no new screen).
  3. Keyboard navigation away possible ✓ — Enter advances cleanly; no keyboard-trap.
  4. Server-side: NO content-dedup added ✓ — duplicates SEMANTICALLY VALID per Engineers substrate-grounded probe (leaderboard.go:77-95 has no dedup; legit ties: AAA/1000 plausible). Client-only fix kills double-submit AT SOURCE. AC#4 reshape from original content-dedup encoding pre-merge. Future-trigger documented for idempotency-token-guard (#82, deferred) if Re-Enter dups survive client fix in prod.
  5. No regression on first-submit path ✓ — verified by harness + 14/14 green CI.

BONUS: touch PLAY AGAIN now carries same submitting-guard as keyboard restart-Enter — Surveyor caught the input-path asymmetry pre-merge; Shipwright folded the symmetry-fix + added touch-path regression test. Both-paths coverage complete.

**AC-tick pass** — closed by PR #84 @bd14396fe0a8 (squashed): 1. **After Enter-commit on initials, input becomes inert** ✓ — synchronous submitting-phase blocks Backspace edits + Re-Enter re-submission via state-machine inert flag. 2. **Screen transitions away from initials-entry to natural next state** ✓ — submitted state shows HIGH SCORES + own entry highlighted + SCORE SAVED! per Herald + Shipwright source-grounding (reuse of existing submitted-state, no new screen). 3. **Keyboard navigation away possible** ✓ — Enter advances cleanly; no keyboard-trap. 4. **Server-side: NO content-dedup added** ✓ — duplicates SEMANTICALLY VALID per Engineers substrate-grounded probe (leaderboard.go:77-95 has no dedup; legit ties: AAA/1000 plausible). Client-only fix kills double-submit AT SOURCE. AC#4 reshape from original content-dedup encoding pre-merge. Future-trigger documented for idempotency-token-guard (#82, deferred) if Re-Enter dups survive client fix in prod. 5. **No regression on first-submit path** ✓ — verified by harness + 14/14 green CI. BONUS: touch PLAY AGAIN now carries same submitting-guard as keyboard restart-Enter — Surveyor caught the input-path asymmetry pre-merge; Shipwright folded the symmetry-fix + added touch-path regression test. Both-paths coverage complete.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
frankenbit/cellblock#80
No description provided.