You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bring the ask verb to mobile: a horizontal swipe switches the capture screen between capture mode (default, unchanged) and ask mode, where the user types a question and gets a grounded answer with citations.
Why now
Mobile currently implements only one of the four verbs. It calls exactly four endpoints — /auth/login, /memory/capture, /notifications, /notifications/register-token — and there is no reference to /memory/ask anywhere in apps/mobile. A user can put memories in from their phone but cannot ask anything of them; the "inform" screen is a notification feed, not a recall surface. Recall works end-to-end on the API and in Admin, so this is purely a missing mobile surface.
Scope — bigger than a gesture
This is not just mode-switching. It needs:
api.ask() in apps/mobile/src/lib/api.ts (the AskRequest/AskResponse contracts already exist in @thebrain/types).
An ask UI: query input, answer, citations, loading + honest-miss states.
The gesture + mode state.
How to do it
Axis matters.apps/mobile/app/index.tsx already drives BOTH hold-to-talk and slide-up-to-type from a single vertical Pan (see beginHold / slidingRef / dragY). The vertical axis is fully taken, so mode switching MUST be horizontal — a left/right swipe — or it will fight capture. Concretely this has already bitten us: adb vertical swipes during testing kept starting voice recordings instead of opening the composer.
Add a horizontal Pan (or Gesture.Race with the existing one) with a clear activation threshold and activeOffsetX, so a mostly-vertical drag never switches modes and vice versa.
Keep capture the default mode on every launch — asking is deliberate, capturing is reflexive. Do NOT persist the last mode.
Reuse the existing composer input rather than building a second text surface.
Verified on a real emulator run, not just type-check — note that gesture surfaces are hard to drive via adb (a swipe registers as hold-to-talk), so this likely needs a manual pass or a test seam.
Notes
Blocked-ish on nothing, but see #319 (asymmetric query embedding): until that merges, ask on main returns "I don't have a memory about..." for most paraphrased questions, which would make this feature look broken when it isn't.
Goal
Bring the ask verb to mobile: a horizontal swipe switches the capture screen between capture mode (default, unchanged) and ask mode, where the user types a question and gets a grounded answer with citations.
Why now
Mobile currently implements only one of the four verbs. It calls exactly four endpoints —
/auth/login,/memory/capture,/notifications,/notifications/register-token— and there is no reference to/memory/askanywhere inapps/mobile. A user can put memories in from their phone but cannot ask anything of them; the "inform" screen is a notification feed, not a recall surface. Recall works end-to-end on the API and in Admin, so this is purely a missing mobile surface.Scope — bigger than a gesture
This is not just mode-switching. It needs:
api.ask()inapps/mobile/src/lib/api.ts(theAskRequest/AskResponsecontracts already exist in@thebrain/types).How to do it
Axis matters.
apps/mobile/app/index.tsxalready drives BOTH hold-to-talk and slide-up-to-type from a single verticalPan(seebeginHold/slidingRef/dragY). The vertical axis is fully taken, so mode switching MUST be horizontal — a left/right swipe — or it will fight capture. Concretely this has already bitten us: adb vertical swipes during testing kept starting voice recordings instead of opening the composer.Pan(orGesture.Racewith the existing one) with a clear activation threshold andactiveOffsetX, so a mostly-vertical drag never switches modes and vice versa.capturethe default mode on every launch — asking is deliberate, capturing is reflexive. Do NOT persist the last mode.request()insrc/lib/api.ts, so it inherits the 401 refresh-and-retry from fix(mobile): refresh the expired session instead of losing the capture #318 for free.AskResponse.citations; an honest miss (citations: []) must read as "I don't have a memory about that", NOT as an error.Out of scope
sessionId— one-shot ask first.Acceptance criteria
POST /memory/askand renders the answer plus its citations.Notes
Blocked-ish on nothing, but see #319 (asymmetric query embedding): until that merges, ask on
mainreturns "I don't have a memory about..." for most paraphrased questions, which would make this feature look broken when it isn't.