Bestie Choice Sheet on home Mulai Curhat CTA. When the user has at least one prior session (bestieHistoryHasItemsProvider hits the chat- sessions history endpoint), the CTA opens a HaloBottomSheet with two cards: 'bestie yang udah kenal' -> /chat/history, 'bestie baru' -> /payment/entry. Empty history -> direct to /payment/entry. Bestie history list visual upgrade: HaloOrb (mitraId seed) + name + last-session date + topic pills + sessions count + ONLINE pill. Backend getCustomerHistory now returns topics, mitra_is_online, sessions_count in a single payload (no per-row presence round-trip). BestieOfflinePopup with two variants (returning | new_) replacing the legacy BestieUnavailableDialog. tanya admin ghost CTA on both variants opens the new TanyaAdminSheet. Stage 5's targeted-wait declined stub + Stage 7's chat-screen 409 stub + searching-screen call site all migrated to the real component. TanyaAdminSheet: HaloBottomSheet with WA + Telegram buttons, deeplinks fetched via supportHandlesProvider (CC-config-driven). url_launcher added to client_app; ios LSApplicationQueriesSchemes covers https/http/whatsapp/tg. Stage 2's OTP-blocked popup hubungi admin SnackBar stub also migrated to TanyaAdminSheet. Dev-only POST /internal/_test/seed-history-session lets Maestro 08 flow seed a history row before exercising the choice sheet. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
19 lines
758 B
JavaScript
19 lines
758 B
JavaScript
// Seed a completed chat_sessions row for TEST_PHONE so the bestie history
|
|
// list isn't empty when the Stage 8 flow opens it. Pairs the customer with
|
|
// the most-recently-online mitra in the dev DB.
|
|
//
|
|
// Hits the dev-only /internal/_test/seed-history-session endpoint.
|
|
const phone = TEST_PHONE
|
|
const url = BACKEND_INTERNAL_URL || 'http://localhost:3001'
|
|
const resp = http.post(`${url}/internal/_test/seed-history-session`, {
|
|
body: JSON.stringify({ phone }),
|
|
headers: { 'Content-Type': 'application/json' },
|
|
})
|
|
if (resp.status !== 200) {
|
|
throw new Error(`seed-history-session failed (${resp.status}): ${resp.body}`)
|
|
}
|
|
const data = json(resp.body)
|
|
output.SESSION_ID = data.session_id
|
|
output.MITRA_ID = data.mitra_id
|
|
output.MITRA_NAME = data.mitra_name
|