Skip to content

feat(app): 乘客歷史行程畫面+事後聯絡司機(留言板入口補遺) - #34

Merged
thothawei merged 2 commits into
mainfrom
claude/fleet-app-ride-history
Jul 19, 2026
Merged

thothawei merged 2 commits into
mainfrom
claude/fleet-app-ride-history

Conversation

@thothawei

Copy link
Copy Markdown
Owner

過去行程原本沒有對話入口——聊天只綁在進行中行程/協尋單。加「我的行程」畫面讓乘客事後仍能聯絡當時司機(例如想起有東西忘在車上、對車資有疑問)。搭配後端 fleet-dispatch #39 的 GET /customer/rides。

改動

  • CustomerRideSummary 模型(對應後端 CustomerRideRow);hasDriver 決定是否給「聯絡司機」——派單前取消的行程沒有對象可聯絡
  • rideStatusLabel 抽成共用函式(CustomerRide.statusLabel 改用它,去重)
  • CustomerApiClient.fetchRideHistory;CustomerController.loadRideHistory + 狀態
  • CustomerRideHistoryScreen:清單(狀態/路線/時間/車資),有司機者開 RideChatScreen(重用 ctrl.chatStream,RideChatScreen 已按 rideId 過濾);loading/error+重試/空清單/下拉刷新
  • 乘客首頁右上加「我的行程」FAB(與登出並列)

驗收

  • flutter analyze 無 issue、flutter test 166 passed(新增 6:模型解析、loadRideHistory 成功/失敗、畫面有無司機/空清單)
  • 模擬器實跑(m6_pixel + docker):完成 ride docs: 聊天/遺失物模擬器實跑(雙 flavor E2E)+3 個實跑發現 #9 → 「我的行程」顯示(NT$212/司機名/台北101→台北車站)→ 點「聯絡司機」開歷史行程對話 → 發訊右靠綠泡+輸入清空 → 後端持久化、司機端 GET /rides/9/messages 讀到 customer: Hi_left_umbrella

🤖 Generated with Claude Code

thothawei and others added 2 commits July 19, 2026 08:24
過去行程原本沒有對話入口——聊天只綁在進行中行程/協尋單。加「我的行程」
畫面讓乘客事後仍能聯絡當時司機(例如想起有東西忘在車上、對車資有疑問)。

- CustomerRideSummary 模型(後端 CustomerRideRow);hasDriver 決定是否給
  「聯絡司機」——派單前取消的行程沒有對象可聯絡
- rideStatusLabel 抽成共用函式(CustomerRide.statusLabel 改用它,去重)
- CustomerApiClient.fetchRideHistory;CustomerController.loadRideHistory
  +rideHistory/historyLoading/historyError
- CustomerRideHistoryScreen:清單(狀態/路線/時間/車資),有司機者開
  RideChatScreen(重用 ctrl.chatStream,RideChatScreen 已按 rideId 過濾);
  loading/error+重試/空清單/下拉刷新
- 乘客首頁右上加「我的行程」FAB(與登出並列)

flutter analyze 無 issue、flutter test 166 passed(新增 6:模型解析、
loadRideHistory 成功/失敗、畫面有無司機/空清單)。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@thothawei
thothawei merged commit 71355b4 into main Jul 19, 2026
1 check passed
@thothawei
thothawei deleted the claude/fleet-app-ride-history branch July 19, 2026 01:23
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