Skip to content

feat(spacing): signal-driven grace duration + live knobs (#24)#93

Closed
AsafMah wants to merge 1 commit into
devfrom
feat/spacing-signal-grace
Closed

feat(spacing): signal-driven grace duration + live knobs (#24)#93
AsafMah wants to merge 1 commit into
devfrom
feat/spacing-signal-grace

Conversation

@AsafMah

@AsafMah AsafMah commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Phase 2 increment of the spacing-policy epic (#14) — implements #24's signal-driven grace + the first #26 live knobs.

What

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 (complete) commits sooner (− completeBonus);
  • an extendable prefix-rich stem waits longer (+ prefixPenalty·score).

Wired into enterCombiningMode behind the default-off flag PREF_SPACING_SIGNAL_DRIVEN_GRACE. The formula is a pure static helper (signalDrivenGraceMs) for unit-testing; base = the existing PREF_COMBINING_GRACE_MS; the min/max clamp is hardcoded (100–3000 ms).

Live knobs (#26) — experimental, on the Two-thumb screen

  • Adapt pause to the word (toggle, default off)
  • Finished-word speed-up = completeBonus (slider, default 200 ms)
  • Extendable-stem patience = prefixPenalty (slider, default 400 ms)

Verification

SpacingSignalsTest (+6 signalDrivenGraceMs cases: neutral=base, complete shortens, prefix-rich lengthens, combined, floor/ceiling clamp) / SettingsContainerTest / InputLogicTest128 completed, 3 failed (the AGENTS.md pre-existing baseline), 1 skipped0 new failures. Default-off → existing grace behavior unchanged.

On-device: enable "Adapt pause to the word" (with the grace timer on), type, and tune the two sliders by feel — finished words should commit a touch faster, extendable stems linger. Building the .dbgtest APK.

Next: the two-gate Assisted tier (Gate A instant / Gate B pause) + the A11 insight readout.

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.
@AsafMah

AsafMah commented Jun 12, 2026

Copy link
Copy Markdown
Owner Author

Parking/closing after on-device testing changed the product conclusion.

The adaptive timer lever is weaker than expected: tap-only stems are now protected by Only auto-finish swiped words, while pure swipes usually resolve to a full word (not a prefix stem), so the prefix-richness patience path is hard to exercise/feel. This adds knobs and behavior complexity without touching the main problem often enough.

Keep the underlying signal layer from #92; revisit only if we find a concrete surface where adaptive timer changes are observable and valuable (likely multipart/tap-then-swipe), not as a broad user-facing feature.

@AsafMah AsafMah closed this Jun 12, 2026
@AsafMah AsafMah deleted the feat/spacing-signal-grace branch June 12, 2026 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant