Skip to content

Keyboard: no prediction beside the undo chip after an autocorrection #460

In review

Description

@Pivii

Found while checking #458. After an autocorrection, the bar shows the undo chip alone: the two slots beside it stay empty (see the "undo offered" row of the boards on proofs/457, light and dark, switch on and off).

The bar itself already does what iOS does: suggestionSlots() in ime/src/main/java/dev/pivisolutions/dictus/ime/ui/SuggestionBar.kt returns listOf(undoOffer.original) + suggestions.take(2) since #276 (bed0fad), for both looks. Tests AutocorrectUndoChipUiTest ("after a correction the first slot shows the typed word and the predictions follow") and SuggestionBarCapsulesTest cover it. iOS: DictusKeyboard/TextPrediction/SuggestionState.swift:370-375 and :652-656 on dictus-ios develop @ 4e29e82f.

So no prediction reaches _suggestions after the correction on the emulator. Two leads, not checked:

  • the prediction ticket is cancelled by late selection updates after the replacement (editorChanged then clearSuggestionState);
  • the n-gram model has no prediction after "Bonjour" at the start of the text.

Expected: after bonjout + Space → Bonjour, the bar shows ↶ bonjout and two next-word predictions, as on iOS.

To do: reproduce on dictus_api35 with the bar's trace line in dictus.log, find which of the two it is, fix it on develop without a switch (it is a bug, not a new behaviour).

Refs #458, #457, #276.

Activity

  1. added
    bug
    on Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions