docs: O5 車輛審核完成回填(三端) - #36
Merged
Merged
Conversation
thothawei
added a commit
that referenced
this pull request
Jul 30, 2026
第二十一輪換族到「定位健康度」,這一輪把同族的乘客端清完。三個病都在 placeOrder: 1. 靜默:_acquirePosition 只攔 TimeoutException,系統定位服務被關時 getCurrentPosition 丟的是 LocationServiceDisabledException,而 placeOrder 的 catch 只收 ApiException——例外整個穿出去變成未處理的非同步錯誤,_error 沒設、 busy 被 finally 清掉,乘客按下叫車只看到按鈕轉一下就回到原狀。 2. deniedForever 之後 requestPermission 不會再彈窗,文案卻只說「需要定位權限」, 乘客在 App 裡按到死都按不出結果——現在會說要去系統設定。 3. 多停靠點行程的 pickup/dropoff 由 stops 推導(後端 prepareStops 覆蓋座標欄位, 根本不看 App 送的那組),卻照樣先要權限再等 GPS fix。程式碼裡的註解本來就寫著 「不需要定位」,是實作與它矛盾。現在改用第一個上車點的座標,不再碰 GPS。 順手第四個:司機端 goOffline() 清了 _locationStreamFailed 卻沒清那句紅字, 離線後畫面仍寫「請開啟才能接單」。只清這一類,業務錯誤不動。 測試接縫 CustomerLocator 刻意開在最外層的 geolocator 呼叫,不是餵錯誤給 錯誤處理函式——後者測不到「哪一種例外從哪一支呼叫冒出來」,把 on 分支拔掉照樣綠。 驗收:flutter analyze 無 issue、flutter test 377 passed(367+乘客 8+司機 2)。 反向驗證三半各跑一次,各 2 案 FAIL。模擬器實跑(m6_pixel,location_mode=0): 單點叫車出現「裝置定位服務已關閉,請開啟後再叫車」;多停靠點在定位關著時建單成功 (ride #36,pickup_point = 第一個上車點,ride_stops 兩筆)。 同場補完第二十一輪留的實跑尾巴:hero 真的會降級、恢復也成立,但這台模擬器 造不出「串流永久靜止」,定期重評那一半只驗到局部——文件已寫明,不宣稱兩半都驗過。 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.
2026-07-19 拍板「O5 先做」,三端皆已合併:dispatch #40、fleet-app #35、admin #20。
純文件。
🤖 Generated with Claude Code