Skip to content

fix(prompts): answering a prompt via its card can still leave text permanently refused #954

Description

@RonenMars

What happened

Observed live on hardware (Android, Xiaomi 2109119DG) during E2EE program G-2 device testing, 2026-09-04. This is a worse-case variant of #953: this time the app DID render a proper answer card for a detected prompt (a "=== 120 markers emitted; type anything and press Enter ===" banner from a test harness was rendered as a structured APPROVAL card with a tappable "Continue" option), and the user tapped it correctly.

After tapping Continue:

  • The card disappeared.
  • The banner text above it changed to: "That question isn't open anymore."
  • But the composer stayed permanently blocked, still showing: "A prompt is waiting for an answer; answer or dismiss it before sending text."

The prompt is simultaneously reported as answered/gone ("isn't open anymore") and as still blocking input. There is no further affordance — no way to clear this state from the client short of killing the session and starting a new one.

Why this is worse than #953

In #953, the user never had an affordance to try, so the dead end is at least discoverable immediately. Here, the user did exactly the right thing — answered the prompt through the UI the app itself presented — and ended up in a permanently locked state anyway. This is very likely the mobile-client-side manifestation of the same class of bug fixed server-side in streamer #757 (fix(sessions): refuse input on the prompt registry's live state, not map membership, RonenMars/threadbase-streamer): a client-side "is a prompt open" flag that isn't cleared correctly when the answer completes / when the server-side prompt record transitions to a terminal state via a route the client's local gate-clearing logic doesn't recognize.

Reproduction

  1. Trigger any prompt that renders a structured approval/question card in the app (permission gate, question gate, or — as observed — a plain terminal banner that some detection heuristic classified as prompt-shaped).
  2. Tap the card's answer option (e.g. "Continue").
  3. Observe: card disappears, message updates to "That question isn't open anymore," but the composer remains locked with "A prompt is waiting for an answer."
  4. Attempt to type/send text: refused.
  5. Only recourse: kill the session.

Suggested investigation starting points

  • Find the client-side state (likely a boolean/flag mirroring "is there a pending prompt for this session") that gates the composer's text-send action, and check whether it's cleared on the SAME event that produces the "isn't open anymore" message, or on a different one — a race/desync between those two would explain exactly this symptom (one part of the UI thinks it's closed, another part thinks it's still open).
  • Cross-reference with streamer fix(android): deny cleartext to numeric host forms the resolver reads as public #757's root cause: a server-side map entry (pendingPermission/pendingQuestions) could outlive the prompt registry record when a prompt closed via a route other than the normal answer/expiry paths — check if the mobile client has an analogous local cache (e.g. a per-session "openPromptId" or similar) that isn't cleared by every route that can close a prompt server-side, only by the ones the client currently recognizes.
  • Confirm whether the client's composer-block flag is keyed off a specific promptId that becomes stale, similar to the server-side bug's shape, or off a simpler open/closed boolean that just isn't reset.

Related

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions