docs(app): 回填第二輪 debug——協尋鏈路、admin REST、模擬器 UI 實機閉環 - #56
Merged
Conversation
三段各自寫明「抓到什麼」與「驗過哪些是乾淨的」,後者一樣重要: 不記下來的話下一輪會把同一套對帳整個重做。 1. 遺失物協尋鏈路:抓到 production 首頁沒有協尋入口(PR #55)。 其餘(四段狀態機、雙方 WS、狀態常數、未結案集合、終態清空、守門回應)驗過乾淨。 處理費 2100 分一度看似算錯,查證是 roundNtd 進位成 NT$21,符合整數台幣政策,不是 bug。 2. admin REST 形狀:沒有 active bug;揪出一個型別謊言(PR #28)。 六個篩選參數是實跑證明真的有篩(含三組負向對照),不只比對名稱。 3. 模擬器 UI 實跑:沒有新 bug,但把當天三個「靠讀程式碼修」的修正在真 App 上閉環—— 協尋 banner 即時出現並走完付款、司機放棄通知清掉舊司機卡片、 背景輪詢 40 秒零 SnackBar 而使用者動作仍會報錯。 另記一個旁見:閒置中的 App 不會發現「在 App 外建立」的訂單(不輪詢+ride.accepted 早退)。真實使用不受影響,但下次要測 UI 得從 App 建單或重啟走 REST 還原。 README:測試數 227 → 230、補上第五個 bug 與實機驗證註記。 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.
這輪做了什麼
接續當天第一輪 debug,把先前寫明「沒覆蓋到」的三塊補完。每段都同時寫抓到什麼與驗過哪些是乾淨的——後者一樣重要,不記下來的話下一輪會把同一套對帳整個重做。
1. 遺失物協尋鏈路 → 抓到 1 個 bug(#55)
production 首頁(地圖版)完全沒有協尋入口,banner 只寫在非 production 的卡片版首頁。乘客付不了處理費就拿不回東西。
其餘驗過乾淨:四段狀態機、雙方 WS 事件、5 個狀態常數、「未結案」集合、終態後清單自動清空、司機角標由清單長度推導、守門回應(404/409/403)。
處理費 2100 分一度看似算錯(20600×10%=2060),查證是
roundNtd把 NT$20.6 進位成 NT$21,符合整數台幣政策——不是 bug,沒有硬報。2. admin 端 REST 形狀 → 沒有 active bug(frontEnd#28)
揪出一個型別謊言:
PATCH /admin/drivers/:id/status回混合大小寫且不含評價欄,前端卻宣告回Driver又不正規化。目前 runtime 沒事,但哪天有人拿去setQueryData就會讓那列的車種車牌憑空消失。驗過乾淨:訂單列表 8 鍵、六個篩選參數實跑證明真的有篩(負向對照:
status=9→0、不存在關鍵字→0、未來日期→0)、分頁total、訂單詳情五個頂層鍵(特地造一筆評過分的訂單才驗到rating)、日/月報表、遺失物 13 鍵、會費帳單 7 鍵。3. 模擬器 UI 實跑 → 沒有新 bug,但把三個「盲修」閉環了
m6_pixel+ customer flavor + docker 後端:旁見(不是 bug,但下次測 UI 要知道)
用 API 在 App 外建的訂單,閒置中的 App 不會發現——
_activeRide為 null 時不輪詢,且ride.accepted有if (active == null) return早退。真實使用是 App 自己建單所以不受影響;跨管道(LINE 建單+App 開著)才會遇到。要測 UI 就得從 App 建單,或重啟 App 走 REST 還原。只動文件(README 測試數 227 → 230 + 第五個 bug 摘要)。
🤖 Generated with Claude Code