feat(spacing/a11): live spacing-policy signal readout overlay (#26)#95
Closed
AsafMah wants to merge 4 commits into
Closed
feat(spacing/a11): live spacing-policy signal readout overlay (#26)#95AsafMah wants to merge 4 commits into
AsafMah wants to merge 4 commits into
Conversation
Phase 2 of the spacing-policy epic (#14). The combining grace-timer duration now adapts to the #92 word-state signals instead of a fixed value: graceMs = clamp(base - completeBonus*complete + prefixPenalty*prefixRichScore, 100, 3000) A finished dictionary word commits sooner; an extendable prefix-rich stem waits longer. Wired into enterCombiningMode behind the default-off experimental flag PREF_SPACING_SIGNAL_DRIVEN_GRACE; the formula is a pure static helper (signalDrivenGraceMs) for testability. Live tuning knobs (#26), all experimental on the Two-thumb screen: - PREF_SPACING_SIGNAL_DRIVEN_GRACE (toggle, default off) - PREF_SPACING_COMPLETE_BONUS_MS (slider, default 200) - PREF_SPACING_PREFIX_PENALTY_MS (slider, default 400) base = the existing PREF_COMBINING_GRACE_MS; min/max clamp hardcoded. Verify: SpacingSignalsTest (+6 graceMs cases) / SettingsContainerTest / InputLogicTest -> 128 completed, 3 failed (pre-existing baseline), 1 skipped; 0 new failures. Feel/tuning is on-device.
Add SpacingInsightDrawingPreview — a debug HUD drawn on the
DrawingPreviewPlacerView that shows the per-keystroke spacing-policy
signals at combining-mode arm time:
spacing | c:Y px:72% g:380ms [timer]
Fields:
c – complete (Y/N): typed stem is a dictionary word
px – prefix-rich score (0-100%): fraction of suggestions that are
completions of the current stem
g – resolved graceMs after signal-driven adjustment
gate – active commit gate; "timer" for the current single-timer model;
reserved for the two-gate branch (see updateGate() integration hook)
Gating: co-gated behind PREF_GESTURE_DEBUG_DRAW_POINTS (the existing
gesture debug setting). No new preference.
Integration points:
DrawingProxy.setSpacingInsight(complete, prefixRichScore, graceMs, gate)
– called from InputLogic.enterCombiningMode on each arm, and cleared
on cancelCombiningMode / onCombiningGraceExpired.
SpacingInsightDrawingPreview.updateGate(gate)
– gate branch calls this once its gate decision is made to re-stamp
the gate label without resetting the signal snapshot.
Hot-path: string is built once per keystroke commit (not per frame);
drawPreview() is allocation-free. Enabled flag check short-circuits both
paths when the debug toggle is off.
The first spacing HUD exposed raw telemetry (c/px/g), which was hard to read while typing and disappeared too quickly. Make it practical: - decision-first labels: FAST / WAIT / TIMER / INSTANT - detail line explains finished-word vs many-continuations - linger briefly after commit/cancel so the user can read it - inset/two-line box to avoid clipping Add docs/SPACING_TEST_PLAN.md with concrete playtest scenarios for complete words, extendable stems, Adapt on/off, shortcuts, corrections, and punctuation. Verification: :app:compileStandardDebugJavaWithJavac -> BUILD SUCCESSFUL.
Owner
Author
|
Updated after on-device feedback: HUD is now decision-first (FAST/WAIT/TIMER/INSTANT), two-line/inset to avoid clipping, and lingers briefly after commit/cancel. Added docs/SPACING_TEST_PLAN.md with practical playtest scenarios. |
The first playtest plan mixed input modality with timing behavior. Rewrite it around the actual axes: auto-finish vs auto-space, tap-only vs swipe vs tap-then-swipe, and which timing settings affect each path. Adds timing presets, explicit path matrix, and practical tests for tap-only safety, swiped complete words, swiped stems, tap-then-swipe extension, Adapt on/off, corrections, and deferred punctuation. Verification: :app:compileStandardDebugJavaWithJavac -> BUILD SUCCESSFUL.
|
Updated again: it now explicitly separates tap-only / swipe / tap-then-swipe paths from auto-finish vs auto-space timing, with a settings matrix and clearer practical tests. |
Owner
Author
|
Updated docs/SPACING_TEST_PLAN.md again: it now explicitly separates tap-only / swipe / tap-then-swipe paths from auto-finish vs auto-space timing, with a settings matrix and clearer practical tests. |
Owner
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #93 (
feat/spacing-signal-grace). Visual diagnostic only.What
Adds
SpacingInsightDrawingPreview, a small fixed-position HUD on the same drawing-preview surface as the gesture debug points overlay. It snapshots one line whenever combining mode arms:c— complete (Y/N): typed stem is a dictionary wordpx— prefix-rich score (0–100%)g— resolved graceMs after signal-driven adjustmenttimerfor the single-timer model; exposesGATE_TIMER/GATE_NONEand accepts nullable strings so feat(spacing): tested two-gate Assisted decision model (#24) #94 / the gate branch can plug inINSTANT/PAUSEwithout coupling.Gating
Co-gated behind the existing experimental Draw gesture debug points setting (
PREF_GESTURE_DEBUG_DRAW_POINTS). No new setting.Performance
The display string is built once per combining-mode arm, not per draw frame.
drawPreview()is allocation-free. With the debug setting off,setSpacingInsight()returns immediately after the boolean check.Verification
Subagent verified
:app:compileStandardDebugJavaWithJavac— clean, no errors/warnings introduced.On-device
Enable Settings → Experimental → Draw gesture debug points, then type/gesture with the grace timer on. The HUD appears at bottom-left of the keyboard area and should let us tune #93's
Finished-word speed-up/Extendable-stem patiencelive.