Phase 4 Stage 10 follow-up: restore BestieHistoryList picker for §4 curhat-lagi

The original Stage 10 plan retired chat_history_screen.dart on the
assumption that the new Chat tab Selesai sub-tab replaced it. That was
wrong: Figma has two distinct screens — `extras.jsx::SChatList` (the
Chat tab, browse-only) and `v4.jsx::BestieHistoryList` (the picker for
mermaid §4 returning-user curhat-lagi). They serve different purposes
on row tap: Selesai opens transcript, BestieHistoryList picks a past
bestie for targeted-pair.

Restoring BestieHistoryList at a new home:

- New screen `features/home/screens/bestie_history_list_screen.dart`
  matching Figma `v4.jsx::BestieHistoryList`:
    appBar title "bestie kamu sebelumnya"
    subtitle "{N} bestie yang pernah nemenin kamu"
    row: orb + "bestie {name}" + ONLINE pill + sessions count + last
         date + topic + → arrow
    row tap (online) → /payment with targetedMitraId (Stage-3 flow)
    row tap (closing-grace) → /chat/session/$id to finish goodbye
    row (offline) → dimmed, tap disabled

  Drops the per-row "curhat lagi" secondary button — the row tap IS the
  pick action now (cleaner, matches Figma).

- New route `/bestie/history` in router.dart; cleanly separated from the
  /chat/* family (which is now exclusively the Chat tab).

- BestieChoiceSheet "bestie yang udah kenal" re-pointed from /chat to
  /bestie/history.

- Stage 8 Maestro flow `08_returning_targeted.yaml` updated to assert
  the new screen title + tap the row by name (uses output.MITRA_NAME
  from the seed_history_session script).

- TECH_DEBT entry retired (curhat-lagi entry point restored). New
  TECH_DEBT entry tracks the still-pending wire-up of the Bestie
  Offline Popup variant for offline-row tap per mermaid §4.

flutter analyze clean (one pre-existing widget_test scaffolding error
unrelated to Stage 10).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-12 21:26:57 +08:00
parent 1908e98012
commit 22b10c4bbf
5 changed files with 352 additions and 18 deletions

View File

@@ -114,18 +114,19 @@ env:
- assertVisible: "bestie yang udah kenal"
- assertVisible: "bestie baru"
# Choose the known bestie path → history list with v4 layout.
# Choose the known bestie path → BestieHistoryList picker (mermaid §4).
# Stage 10 renamed the screen + dropped the per-row "curhat lagi" button —
# the row tap itself is now the pick action.
- tapOn: "bestie yang udah kenal"
- extendedWaitUntil:
visible:
text: "Riwayat Chat"
text: "bestie kamu sebelumnya"
timeout: 5000
- assertVisible: "ONLINE"
- assertVisible: "curhat lagi"
# Tap "curhat lagi" → /payment (legacy targeted-payment route). Verify the
# Tap the seeded bestie row → /payment targeted-payment route. Verify the
# screen title; the targeted-payment flow itself is covered by Stage 5.
- tapOn: "curhat lagi"
- tapOn: "bestie ${output.MITRA_NAME}"
- extendedWaitUntil:
visible:
text: "Chat lagi dengan"