Skip to content

feat: improve Ask Flash conversations and regression coverage - #812

Merged
islandbitcoin merged 18 commits into
mainfrom
fix/ask-flash-wallet-and-contact-copy
Oct 23, 2026
Merged

islandbitcoin merged 18 commits into
mainfrom
fix/ask-flash-wallet-and-contact-copy

Conversation

@islandbitcoin

@islandbitcoin islandbitcoin commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Ask Flash was rejecting ordinary follow-ups and misheard usernames, losing suggestions after contact removal or restart, and giving unsupported requests an unhelpful response. It now preserves recent conversation context, offers verified username choices across actions, and provides an explicit in-app support handoff. Direct Bitcoin-account controls stay in the thread with their existing setup and balance guards.

Conversation context resolves “open it,” repeats information reads, and carries a selected, verified person into profile, contact, history, or explicitly priced payment requests. Unchosen suggestions do not supply a recipient or reuse a previous amount. Payments prepare a fresh review with Confirm and the existing voice authentication policy; “again” and “yes” cannot repeat or confirm a payment. Conversation memory stays local to the session and is not automatically sent to support.

Username recovery combines similar known names with a bounded public directory search after an exact miss. It can discover people outside contacts/history/session through the new backend read in lnflash/flash#530. Every suggested identity is independently reverified and requires a selection. An exact verified identity retains the existing direct review. Removed contacts remain useful search hints. Live account and host switches isolate collected hints before the new session index can persist them, including when the screen stays mounted.

An unrelated transcript such as “flashbacks” for “dreadmax” no longer produces a list of the user's contacts. With no genuinely similar verified matches, the user gets an inline username correction/search field and an explicit support option. Corpus 1.3.0 retains those original transcripts and corrects the rejected known-user fallback expectations. Missing-field validation responses from older servers (including HTTP 400) preserve exact/local lookup; actual network, authentication, rate-limit, and directory failures remain errors with retry. Directory searches never run offline or per keystroke. Profile verification distinguishes the NIP-05 endpoint’s explicit missing-user response from transport, HTTP, malformed-response, and timeout failures; those failures offer retry instead of false “not found” results. Reopening an unresolved contact card offline shows an offline instruction and retries on reconnect, while an already verified profile remains available offline. Backend #530 is merged and deployed in test and production in release 0.9.79.

Bitcoin account controls show filled action buttons with spoken labels matching their state. Unsupported requests offer a filled support button through the existing Chat/email fallback, and the configured support conversation shows “Support Chat” independently of profile loading. Common contact wording, polite requests and observed speech variants are handled consistently; negative/compound requests retain their safeguards. Native vocabulary includes complete contact/payment phrases without invented amounts. Conversion review uses the existing “Review conversion” heading.

The versioned scenario library runs unattended with yarn test:assistant-scenarios. Corpus 1.3.0 contains 1,814 scenarios and 2,585 user turns: 118 regressions, 12 separately authored acceptance cases, and 1,684 generated cases. It includes 243 conversations, 39 failure/recovery cases, and 119 rendered Ask Flash flows. Fifty flows press routing buttons and verify route names/parameters online and offline. Production Apollo queries/cache, username discovery, router, registry, and executor run against scripted service/OS boundaries; unscripted network requests fail.

Coverage changes balances/connectivity, restarts and switches accounts, fails/restores services, revokes identity verification, cancels removals, and rejects contact publications without false success. Strangers are suggested across add/remove/profile/payment without prior contact knowledge. Directory outage/retry, unrelated results, and failed verification are covered. Payment choices preserve amount/input origin and stop offline. Native event replay covers permission/provider failures, cancellation, interruption, stale/duplicate completion and text recovery; held previews cannot submit before release. Transcript replay does not measure native ASR recognition quality.

Strict fixtures, corpus versions/digests, deterministic seeds, coverage floors and JSON/Markdown reports make failures reproducible. Unexpected support/navigation/state changes, financial dispatches, empty selections and incomplete results fail the gate. Relevant PRs, main pushes, manual dispatch and nightly CI run the complete corpus and upload reports. Amount tests also preserve unsupported currency symbols and require clarification instead of silently assuming a currency. No new app dependency is added.

Validation: all 1,814 scenarios pass with seeds 754 and 271828, with zero unexpected support handoffs or financial dispatches. All 101 assistant suites / 2,738 tests and six snapshots pass, as do 13 framework safeguards, TypeScript, generated GraphQL/translation checks and diff checks. ESLint reports zero errors (19 existing test assertions warn). New tests rerender the real username hook across same-host and changed-host account switches, exercise the actual verification helper at its fetch boundary, and reopen unresolved cards offline before reconnecting. They do not mock away NIP-05 failure semantics.

Earlier read-only device checks used synthetic inputs to verify suppression of unrelated contacts and verification of a directory candidate. Earlier physical checks confirmed wallet enable/disable and matching speech, username recovery after restart, and the support heading on Pixel. Pixel's GrapheneOS installation has microphone permission but no configured on-device speech recognizer; Speech Services there currently provides TTS only. No live payments or support messages were sent by these checks.

The shared iOS e2e setup failure is fixed by pinning breez-sdk-spark 0.18.0, which publishes the Python 3.12/macOS ARM64 wheel the runner needs. A clean install, all eight fixtures and nine existing card/top-up integration tests pass locally against the pinned simulator applet. Backend #530 merged at 5740e7da after a clean two-round review and green CI, and release 0.9.79 is live in both environments. This PR’s checks must pass at the reviewed head before merge; CI is rerunning after the review fixes.

@github-actions

Copy link
Copy Markdown
Contributor

this PR needs to be updated to follow conventional commits message

@islandbitcoin islandbitcoin changed the title Fix Ask Flash Bitcoin wallet route and payee wording fix: route Bitcoin wallet setup and clarify payee picker Oct 22, 2026
@islandbitcoin islandbitcoin changed the title fix: route Bitcoin wallet setup and clarify payee picker fix: toggle Bitcoin account and suggest matching usernames in Ask Flash Oct 22, 2026
@islandbitcoin islandbitcoin changed the title fix: toggle Bitcoin account and suggest matching usernames in Ask Flash feat: improve Ask Flash conversation, actions, and support Oct 22, 2026
@islandbitcoin islandbitcoin changed the title feat: improve Ask Flash conversation, actions, and support feat: improve Ask Flash conversations and regression coverage Oct 22, 2026
Keep live account switches from persisting previous Chat hints, retain real profile verification failures for retry, and show offline recovery instead of an indefinite contact lookup. Exercise the actual fetch boundary and mounted hook; preserve the explicit missing-user response and already verified offline profiles.
@islandbitcoin
islandbitcoin merged commit 22d80c7 into main Oct 23, 2026
13 of 14 checks passed
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