Repository navigation
fix(driver): 訂單被取消時說明原因,不讓行程卡無聲消失 - #72
Merged
Merged
Conversation
搭配 dispatch 的修正(乘客取消已接訂單時補推 ride.cancelled 給司機)。 App 端本來就有這則事件的處理,但只是把卡片清掉——司機正開往上車點, 畫面突然少一張卡只會讓他以為 App 壞了。 只在「取消」時說明:完成是他自己按的,不必再講;他自己放棄走的是 ride.redispatched(且後端不推給司機),所以收到 ride.cancelled 一定是別人取消的。 測試:新增 3 案(取消要說明/完成不說/別張單不動)。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
thothawei
added a commit
that referenced
this pull request
Jul 31, 2026
1. 造大量測試行程改用 tool/seed_customer_rides.sh:叫車限流(5 次/分)、 「已有進行中訂單」、建單回應是 ride_id 不是 id——三個都不會讓迴圈停下來, 自己寫 for 迴圈會整批靜默失敗還印得像成功。腳本建單失敗直接 exit 1 並印回應。 已用 seed_customer_rides.sh 3 實跑驗過(ride #66-#68,全部已取消)。 2. 本機後端跑法更正為 REDIS_ADDR=127.0.0.1:6380:6379 會靜默連到 Mac 本機的 redis-server(已用 raw socket 對兩台寫 whoami 鍵驗死)。容器改發布 6380 見 dispatch PR #72。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
這一側改什麼
App 早就有
ride.cancelled的處理(在後端補推之前那段是死碼),但它只是把卡片清掉。司機正開往上車點,畫面突然少一張卡,只會讓他以為 App 壞了。現在取消時同時給一句:「這筆訂單已被取消,不用再前往上車點」。
只在取消時說:
ride.completed是他自己按的「完成行程」,不必再講一次;ride.redispatched,而那則後端不推給司機——所以司機收到ride.cancelled一定是別人(乘客或客服)取消的,說得出原因才這樣寫。驗收
flutter analyze無 issue、flutter test288 passed(285 +新 3)。test/driver_ride_cancelled_notice_test.dart:取消要說明/完成不說/別張單不動自己的卡。🤖 Generated with Claude Code