Repository navigation
feat: improve smart route recommendations and Android reminders - #118
Conversation
Learn route habits from dated visits and share a reminder plan with Android. Look up arrivals at the actual stop, keep full-width stop IDs in notification launches, and cover the plan, database and launch contract with regression tests.
Av1anJay
left a comment
There was a problem hiding this comment.
整合審查:請求修改
這次涵蓋完整 base...head diff、受影響的呼叫路徑、既有 #117 討論與三份獨立靜態審查。下方集中列出所有目前驗證的問題:清除/登出與收藏變動後的計畫狀態、排程競態、站牌學習與清除、資料庫恢復、跨 provider 配額、即時 ETA 時基、被封鎖頻道的回饋,以及首頁模型與舊資料遷移。#117 先前問題在各自原始情境的分類沿用 前次審查,沒有將其重複列為新問題。
驗證限制:exact-head CI 的 flutter analyze、646 個 Flutter 測試及 2 個 Chrome 測試通過;本機 JVM 編譯逾時,未獨立執行 Android/Robolectric 測試或裝置通知。以下競態與數值例子為原始碼推導/建模,並非聲稱已在裝置重現;PR 說明提及的 387 個 Android 單元測試沒有可供這次獨立核對的執行日誌。
| await _resolveSmartRouteIds(now); | ||
| await storage.saveSmartRoutePlan( | ||
| SmartRoutePlanner.build( | ||
| profiles: _routeUsageProfiles, |
There was a problem hiding this comment.
[P1] 防止較舊的重建在清除學習紀錄後寫回舊計畫。這裡先捕獲舊的 _routeUsageProfiles,再等待 :2247 的平台呼叫;若清除全部紀錄期間另一個重建先寫入空計畫、取消排程並完成清除,原呼叫恢復後仍會用捕獲的清單覆寫計畫並重新排程,設定仍開啟時就可能再次提醒已清除的路線。請序列化重建或使用 generation 防止過期寫入/排程,並用可控制的延遲 log 回應測試 clear 完成後才釋放舊呼叫。這是依 async 順序推導,尚未在裝置重現。
| await AndroidHomeIntegration.loadSmartRouteReminderLog(), | ||
| ), | ||
| favoriteProfiles: _favoriteUsageProfiles, | ||
| favorites: _favoriteGroups.values |
There was a problem hiding this comment.
[P2] 這份持久化快照需要在其輸入被替換時失效,否則即使沒有並行呼叫也會過期。登出/強制登出會用裝置本地資料取代合併後的路線紀錄(:740-767,833-849),但沒有重建計畫;原本只來自其他裝置的路線因此仍可能被提醒。另收藏的新增、刪除及遠端套用也不重建;若唯一收藏 A 被刪除,無定位時舊計畫仍可沿用 A 的到站資料。請對這兩種輸入變動都重新建置或清除計畫,測試登出及收藏變更後沒有其他重建觸發的情境。推導自資料流,未執行 Android 整合測試。
| if (!SmartRouteReminderRules.hasLiveSlots(plan, now)) { | ||
| // Every habit in the plan has lapsed. Nothing can fire until | ||
| // the app is opened and writes a new one, which reschedules. | ||
| SmartRouteNotificationScheduler.cancel(applicationContext) |
There was a problem hiding this comment.
[P2] 不要讓基於舊快照的 worker 取消新計畫的週期工作。可能順序是 worker 讀到過期計畫後暫停,Flutter 儲存新計畫並完成 UPDATE,接著這裡依舊快照呼叫 cancelUniqueWork。本專案鎖定的 WorkManager 2.10.3 UPDATE 保留既有週期工作 ID、不中斷已在執行的 worker;稍後的按名稱取消會取消該已更新工作,因此新計畫雖有有效時段卻不再執行。請讓取消與計畫更新具備版本/排程同步,並測試此事件順序;這是根據鎖定版 WorkManager 原始碼建模,非 Android 實測。
| totalOpens: totalOpens, | ||
| lastOpenedAtMs: lastOpenedAtMs, | ||
| hourlyOpens: hourlyOpens, | ||
| visits: visits, |
There was a problem hiding this comment.
[P2] 清除路線選擇紀錄時也要去除訪問紀錄內的站牌 ID。設定說明承諾清除「站牌使用紀錄」並保留路線開啟次數,但 clearSelections 原樣保留含 stopId 的 visits;learnedStopId 仍可讀取這些站牌並繼續用於推薦及提醒,而且它們仍會保存/同步。可保留 visit 時間但移除其 stop ID;請測試清除後已學站牌不再留存或被選用。現有測試反而斷言該 ID 保留。
| /// nearest stop to somebody reading the timetable from across town says | ||
| /// nothing about their habits. | ||
| int? _usageStopHint() { | ||
| final opened = _findStopById(_currentPathStops, widget.initialStopId); |
There was a problem hiding this comment.
[P2] 明確選擇的上車站應優先於開頁站,也不能只靠 ID 判斷是否為定位猜測。從 A 站開啟頁面後,在 10 秒訪問紀錄計時前手動選 B,這裡仍回傳 A;如果手選 B 恰好也是候選最近站,:3158 又會把它當成猜測,距離太遠時直接捨棄。多次操作後會把錯站學成常用站,影響推薦與無定位提醒。請保留選擇來源、先處理使用者選擇,並測試這兩種情況;目前為靜態追蹤,沒有 widget 實測。
| return null | ||
| } | ||
| return SmartLiveStop( | ||
| sec = stop["eta"].asInt(), |
There was a problem hiding this comment.
[P2] 依 eta_reference_at 修正 ETA 後再判斷是否趕得上。此解析丟棄參考時間,:425-429 直接用原秒數與 180 秒/步行門檻比較;上游快取會保留舊參考時間而不重新減去快取年齡。依上游快取測試支持的 15 秒延遲建模,參考時 190 秒的班次實際剩 175 秒,這裡仍視為符合 180 秒下限。舊版倒數顯示也未處理參考時間;此處問題限於本 PR 新增的可趕車門檻判斷。請處理參考時間、抓取延遲及缺值相容,補快取/步行門檻測試;190 秒例子不是實際觀測到的通知。
| ), | ||
| timeoutMs = SmartRouteReminderRules.timeoutMs(decision), | ||
| ) | ||
| SmartRouteNotificationSupport.saveReminder( |
There was a problem hiding this comment.
[P2] 頻道被封鎖時不要把提醒記成已顯示。canPostNotifications 只檢查 App 層級與權限;使用者可以只把智慧提醒頻道設成 IMPORTANCE_NONE,此時 notify 不顯示通知,但這裡仍保存已顯示紀錄和全域/每日/路線限額。新的習慣模型會把該紀錄當作已送達,跳過缺席證據,影響後續學習。請在可檢查的頻道封鎖情境下避免寫入此回饋並補測;舊版已有 App 層級檢查與部分冷卻問題,本次回報範圍是新加入的已顯示回饋與限額。平台行為為文件與原始碼推導,非裝置實測。
| if (profile.pathId == null) { | ||
| return null; | ||
| } | ||
| final evidence = RouteHabitEvidence.of(profile, now); |
There was a problem hiding this comment.
[P2] 首頁排名也應取得與此路線對應的提醒回饋。這裡使用預設空 reminders,但計畫建置會傳入已顯示提醒,模型需要它把提醒後、習慣時間前的點擊歸回原時段,也需要它避免將已看提醒但未開 App 誤判為缺席。來源追蹤顯示首頁 loadSuggestions 路徑從未提供該 log;例如多週在 07:26 的提醒後 07:27 點擊、原本習慣 07:40,模型計算在 08:37 的支援天數可從有回饋的 35 降為無回饋的 0,使首頁推薦消失。這個數值例是模型運算而非 Flutter 實測;請補涵蓋首頁消費者的回饋測試。
| : 0.0; | ||
| final legacyScore = | ||
| legacyWeight * | ||
| legacyStrength(profile, now, datedDays: evidence.dayCount); |
There was a problem hiding this comment.
[P2] 遷移舊小時計數時,勿讓其他時段的使用天數提前取代本時段的舊證據。evidence.dayCount 是所有時段合計;原本有大量 07:00 紀錄的舊使用者,遷移後只有一筆可定日期的早晨紀錄,即使接下來六天只在 18:00 使用,同樣會使早晨 legacy handover 歸零,而早晨新模型又不足兩天,原本可推薦的早晨路線消失。原版仍會以早晨小時計數推薦。請以相關時窗的日期證據交接,或採其他不讓無關時段立即抹除舊信號的策略,補跨時窗遷移測試;目前為原始碼構造案例,非應用程式實測。
| await ensureRecommendationDataReady(); | ||
| final now = DateTime.now(); | ||
| await _resolveSmartRouteIds(now); | ||
| await storage.saveSmartRoutePlan( |
There was a problem hiding this comment.
[P2] 必要的清除工作不應被新增的提醒計畫寫入失敗中斷。clearRouteUsageProfiles 先透過 _persistSmartRouteProfiles 清除本機 profiles,再等待此新 saveSmartRoutePlan;若這個寫入拋錯,後續清除 destination/account device payload 與新加入的 forgetSmartRouteReminders 都不會執行。舊版 scheduler 失敗已有部分清除風險,這裡的回歸是新計畫寫入/建置故障也被放進必要清除流程之前,且會留下新提醒 log。請讓清除嘗試所有必要儲存/遺忘動作並明確回報錯誤,補注入計畫寫入失敗的測試;目前未注入重現。
- Serialize reminder plan rebuilds; an overtaken rebuild writes nothing, and a failed one leaves no plan rather than an outdated one. - Rebuild the plan after logout, favourite changes and database downloads. - Clearing learned history attempts every step, forgets the reminder log before the rebuild, and reports the first failure at the end. - Clearing selection history also drops the stop of each visit. - A boarding stop the rider picks takes precedence when recording a visit. - Cap plan slots per provider. - Home recommendations read the reminder log as the plan does. - Legacy hourly counters hand over by dated use around the asked time. - Count feed ETAs down from eta_reference_at and reject old references. - Re-read the plan before posting; skip blocked channels and a foreground app without logging a reminder. - Only cancel the periodic work under a lock, from the plan as it is now.
|
感謝這輪審查。12 項都已修正,每項都補了測試,並用變異確認測試守得住(把修正改回去,對應測試會轉紅)。 計畫狀態與排程
學習資料
提醒判斷
首頁模型
驗證(皆為本機): |
Av1anJay
left a comment
There was a problem hiding this comment.
整合複審:請求修改
已檢查完整 base...head 差異、受影響的呼叫路徑與前次 12 項意見。先前各項原始情境已有修正;其中「清除站牌使用紀錄」及「手選上車站來源」仍有下列相關狀態轉換未涵蓋,另有一項新加入的 worker 候選回退問題。原意見分別見 清除站牌紀錄 與 上車站來源。前次 #117 的歷史分類沿用其已核對的原始情境。
驗證:exact-head CI 實際執行 flutter analyze、661 個 Flutter 測試與 2 個 Chrome 測試,均通過;CI 未證實執行 Android 單元測試。作者回報本機 Android 單元測試 398 個通過,但這次沒有可獨立核對的執行日誌。本機 JVM 編譯曾逾時;Android/Robolectric 與實機通知未獨立執行。下列交錯順序皆為原始碼推導,並非裝置實測。
| hourlyOpens[hour] = (hourlyOpens[hour] ?? 0) + count; | ||
| }); | ||
| selections.addAll(profile.selectionTimestampsWithin()); | ||
| visits.addAll(profile.visits); |
There was a problem hiding this comment.
[P2] 避免同步後重新匯入剛清除的站牌使用資料。原本 清除紀錄意見 的單裝置情境已由 clearSelections 去除 visit 的 stopId 修正;但開啟路線紀錄同步且另一裝置留有舊 visit 時,clearRouteSelectionHistory 只清目前合併結果及本裝置 payload。下一次同步套用其他裝置 payload 時,這裡會把舊 visit 加回來,normalizeVisits 甚至可能把站牌 ID 合併回剛清除的同一筆 visit;learnedStopId 之後又能選用該站,與設定畫面承諾的清除站牌使用紀錄不符。請讓本機清除在後續同步後仍有效,並補多裝置舊站牌 → 本機清除 → 再同步的測試;不要求逕自刪除其他裝置雲端紀錄。此為靜態資料流追蹤,未執行跨裝置測試。
| _currentPathStops, | ||
| _riderPickedBoardingStopId, | ||
| )?.stopId, | ||
| openedStopId: _findStopById(_currentPathStops, _requestedStopId)?.stopId, |
There was a problem hiding this comment.
[P2] 上車站狀態變更後,不要把過期的選擇來源寫入 visit。前次意見 的開頁 A → 手選 B 已修正,但若 10 秒記錄前手選 B 後按「回到目前位置」C,實際上車站已回到定位候選,這裡卻仍優先使用原開頁站 A,反覆發生會學到錯站。相關另一種轉換:手選 B 後在同一路線頁接到帶站 A 與有效目的地的啟動動作,_applyRequestedDestinationIfPossible 已把上車站換成 A,舊的 _riderPickedBoardingStopId B 卻仍優先被記錄。請在明確回到定位或新動作實際替換上車站時更新來源,並測這兩種轉換,同時保留原有手選優先行為。此為原始碼狀態追蹤,非 widget 實測。
|
|
||
| // Whether or not it went out, this run is done. The next one | ||
| // starts again from the plan as it is then. | ||
| SmartRouteNotificationSupport.remind( |
There was a problem hiding this comment.
[P2] 第一個候選在送出前失效時,仍應重新檢查其他有效候選。此呼叫的 remind 若因新計畫已不含 A、A 剛被查看或站牌變更而回傳 false,迴圈仍無條件 break;即使原本同時到期的 B 仍可提醒,本輪也不再檢查。具體例子:較高信心的 A 取即時資料期間,使用者點首頁的 A 推薦,recordRouteSelection 立即重建計畫,隨即退到背景;A 的最後重查失敗,但 B 仍在有效視窗。現有 smart_route_plan_test.dart:16-46 的 B 時段到 08:10,若該順序發生在 08:10 的最後幾秒,下一次不精確的週期工作可能已錯過 B 當日視窗。請在此類候選特定失效後重新讀取目前計畫及全域限額,再決定是否嘗試其他路線;前景或頻道封鎖等全域原因仍應停止。這是依原始碼建模的交錯順序,並非 Android 實測。
|
感謝複審,這次的 3 項意見都已修正,包含測試,並在 commit
本機驗證
仍未在實機上等待背景通知實際跳出;前次 #117 的 flaky 測試本輪未再出現。 |
Av1anJay
left a comment
There was a problem hiding this comment.
Hermes Agent Review
Verdict: Changes Requested
已完成 exact head 046ea520c0c6aaef022ab22c27a4342f3b5618ef 的完整 base...head diff、35 個 changed files、受影響呼叫路徑、前次兩份 review、作者回覆、獨立 cross-check 與 CI step metadata。前次 review 的原始情境已按本次修改重新核對,未重複列為新問題;以下是 fix interaction/state-transition pass 仍可觸發的 4 個問題。
Findings
- P1 — app_controller.dart:4394:清除選擇紀錄後,目的地選擇仍可能被同步復原。 merge 只對 route-usage profiles 套用
selectionHistoryClearedAtMs,destination-choice profiles 沒有同樣的時間界線;另一裝置的舊目的地選擇可在清除後重新合併,並被自動目的地流程使用。 - P2 — app_controller.dart:3282:尚未建立裝置歷史 payload 時,清除 tombstone 不會保存。
_updateRouteHistoryDevicePayload在沒有既有 payload、且尚未開啟同步時直接 return;之後才開啟同步,清除時間戳不存在,舊同步資料仍可回來。 - P2 — app_controller.dart:4438:登出恢復 own-device payload 時繞過清除 tombstone。 merge 雖把 marker 放回本機 payload,但 logout restore 直接讀 raw profiles,可能重新帶回 marker 以前的 stop IDs 與 destination choices。
- P2 — route_detail_screen.dart:1487:只有 boarding stop 的新 launch 不會清掉舊手選來源。
_applyLaunchFocus更新 requested stop,但只有含 destination 的路徑才會進入這段清理;訪問計時到期時仍可能記錄上一個手選站,而不是新 launch 指定的 boarding stop。
Verification
Exact-head CI 的 Verify job 實際完成 flutter analyze、flutter test 與 Chrome route-geometry test;Android APK、Wear OS、Web、Windows、Linux、macOS、unsigned iOS build jobs 均成功。git diff --check 通過。Flutter/Dart 未安裝於本機;先前相同 source/toolchain fingerprint 的 JVM 嘗試曾逾時,因此未盲目重跑。Android JVM/Robolectric、實機背景通知與上述 Dart state transitions 未由此次 review 在本機執行;findings 是可由 source trace 驗證的 reachable transitions,不宣稱裝置重現。
No claim is made that this review proves zero remaining bugs.
| final remoteSelectionHistoryClearedAtMs = _selectionHistoryClearedAtMs( | ||
| remoteOwnPayload, | ||
| ); | ||
| int? selectionHistoryClearedAtMs = localSelectionHistoryClearedAtMs; |
There was a problem hiding this comment.
🔴 P1 — selection-history clear 不會套用到 destination choices。 這個 marker 已被計算出來,但下面的 destinationChoiceParts 迴圈仍直接收集每個 device 的舊 DestinationChoiceProfile,沒有像 route profile 那樣以 marker 過濾 timestamps。另一裝置保留清除前的選擇時,後續 merge 仍可讓 learnedDestinationChoice 自動選回已清除的目的地。請對 destination-choice timestamps/records 套用同一個 tombstone,並補非空 remote destination-choice 的測試。
| await _updateRouteHistoryDevicePayload( | ||
| profiles: deviceProfiles, | ||
| destinationChoices: const [], | ||
| selectionHistoryClearedAtMs: DateTime.now().millisecondsSinceEpoch, |
There was a problem hiding this comment.
clearRouteSelectionHistory 在這裡傳入清除時間,但 _updateRouteHistoryDevicePayload 的第一行會在 _tracksDeviceRouteHistory == false 時直接 return。對尚未啟用歷史同步、也沒有既有 device payload 的已登入使用者,清除後再啟用同步不會有 selectionHistoryClearedAtMs;之後的 remote merge 仍可復原清除前的 selections/stops。請讓本機 clear marker 在這個狀態也持久化,並補「未啟用同步 → 清除 → 啟用同步 → merge」測試。
| if (selectionHistoryClearedAtMs != null) { | ||
| // A response may echo an older copy of this device's bucket. Keep the | ||
| // local clear marker so a later merge cannot resurrect old stop ids. | ||
| effectiveOwnPayload['selectionHistoryClearedAtMs'] = |
There was a problem hiding this comment.
selectionHistoryClearedAtMs 留在本機 payload,但 _restoreDeviceLocalRouteHistory 直接從 payload 讀 raw profiles/destination choices,沒有套用 marker;若 own-device bucket 仍含清除前的 visits,logout 即可把已清除的 stop IDs 或 destination choices 放回本機。請在 restore 時套用 marker,並補 merge/echo 舊 bucket → logout 的測試。
| // A launch action with an explicit boarding stop replaces an earlier | ||
| // manual choice; do not let that stale choice win when the visit is | ||
| // recorded later. | ||
| if (requestedBoardingStop != null) { |
There was a problem hiding this comment.
requestedBoardingStop 和清除 _riderPickedBoardingStopId 的邏輯只位於 _applyRequestedDestinationIfPossible();但 _applyLaunchFocus() 對沒有 destination stop 的 boarding-only action 會在呼叫該方法時立即 return。因此先手選 B、再收到只指定 A 的 launch 時,visit timer 仍會由 _usageStopHint() 優先回傳 B,而不是新 launch 的 A。請在 boarding-only launch 也更新來源狀態,並補不帶 destination 的 widget/state test。
|
自動審查回報的 4 項問題已修正,並在 commit
本機驗證
新增測試涵蓋:首次同步的目的地選擇 tombstone、登出恢復、目的地選擇模型,以及 boarding-only launch 的 widget 狀態轉換。 |
Av1anJay
left a comment
There was a problem hiding this comment.
Hermes Agent 綜合審查
結論:Request Changes。這次重新檢查 exact head 的完整 PR diff、51d0101 相對前一版的 7 檔修正,以及受影響的同步、推薦、啟動與背景乘車狀態。前一輪四項問題在原始情境已修正,這裡不重複既有 exact-head inline threads:目的地 tombstone、首次同步 tombstone、登出恢復 tombstone、boarding-only 的舊手選來源。
目前仍有 5 項可由原始碼資料流驗證的 P2 問題,詳見行內意見:
- 清除界線以未帶 accountId 的全域 SharedPreferences key 儲存,會跨帳號套用。
- cold/local load 讀回 route/destination profiles 時未套用已持久化的清除界線。
- boarding-only launch 更換上車站時保留可能不相容的舊目的地。
- boarding-only launch 更換上車站時未重置 iOS Live Activity 的舊 ride state。
- path change 暫時清掉 active boarding 後,舊 manual source 仍可在路徑返回時重新被採用。
驗證範圍與限制:isolated checkout 的 exact head 為 51d0101,git diff --check 通過。GitHub Actions exact-head Verify 實際執行並通過 Analyze、Test、Chrome route geometry;Android APK/AAB、Wear OS、Web、Windows、Linux、macOS、unsigned iOS build jobs 也通過。Flutter/Dart 在本機不可用;Android JVM/Robolectric 未獨立執行,沿用先前相同 source/toolchain fingerprint timeout、未盲目重試;背景通知實機行為未執行。以上問題是 static source/dataflow evidence,不宣稱已在裝置重現。
Reviewed by Hermes Agent against commit 51d0101.
| static const _favoriteUsageProfilesKey = 'favorite_usage_profiles'; | ||
| static const _stopVisitProfilesKey = 'stop_visit_profiles'; | ||
| static const _destinationChoiceProfilesKey = 'destination_choice_profiles'; | ||
| static const _selectionHistoryClearedAtKey = |
There was a problem hiding this comment.
accountId 的單一 SharedPreferences key 儲存;AppController 在切換登入帳號時只重載 account-specific sync state,仍會把這個 marker 套到下一個帳號的 device payload。情境:A 清除路線紀錄→登出→B 在同機登入且雲端仍有較舊有效資料。預期清除界線只影響被清除的帳號/命名空間,實際上 B 的資料可能被過濾,且 B 新 payload 可能帶上 A 的 marker。請將 marker 綁定帳號或在帳號切換時明確重置/隔離。證據:storage_service.dart:20-21,397-409、app_controller.dart:424-432,849-881,4184-4197。
| final history = await storage.loadHistory(); | ||
| final routes = await storage.loadRouteUsageProfiles(); | ||
| final destinations = await storage.loadDestinationChoiceProfiles(); | ||
| _selectionHistoryClearedAtMs = await storage |
There was a problem hiding this comment.
learnedDestinationChoice 等 consumer 仍可讀到清除前資料。預期 local load 在暴露給推薦/目的地/提醒前套用 marker;請補一致的 load-time filtering 或交易式儲存。證據:app_controller.dart:424-432,3212-3236。
| _didScrollToInitialStop = requestedStopId == null; | ||
| _autoScrolledPathId = null; | ||
| if (replacesBoardingSource) { | ||
| _boardingStopId = requestedStopId; |
There was a problem hiding this comment.
_boardingStopId,沒有檢查或清除既有 _destinationStopId。情境:畫面先有目的地 D,接著收到只有上車站 A 的 launch,且 A 已在 D 之後;_applyRequestedDestinationIfPossible() 對沒有 requested destination 直接 return,舊 D 留下。後續 trip monitor 仍收到兩個 ID,可能監控與實際新上車站不一致的旅程。預期 boarding-only 更換起點時清除/重新驗證目的地。證據:route_detail_screen.dart:1382-1387,1449-1453 及 trip monitor 的雙 ID consumer。
| if (replacesBoardingSource) { | ||
| _boardingStopId = requestedStopId; | ||
| _boardingStopName = requestedBoardingStop?.stopName; | ||
| _riderPickedBoardingStopId = null; |
There was a problem hiding this comment.
_setBoardingStop() 會先呼叫 _resetLiveActivityRideState(),但這個 launch replacement 只清 manual source。情境:iOS 已確認上車/開啟 boarding window,接著 launch 改選另一個上車站;舊的 confirmed/window/vehicle/alert state 會沿用,Live Activity 可能把新旅程顯示成已上車或抑制提醒。預期起點改變時和手動變更走同一個 ride-state reset。證據:route_detail_screen.dart:2762-2771,3305-3315。
| if (replacesBoardingSource) { | ||
| _boardingStopId = requestedStopId; | ||
| _boardingStopName = requestedBoardingStop?.stopName; | ||
| _riderPickedBoardingStopId = null; |
There was a problem hiding this comment.
_riderPickedBoardingStopId 只在 launch/manual-clear 等路徑清除;tab listener 在目前路徑不再包含 destination 時清 _boardingStopId,卻沒有清 _riderPickedBoardingStopId。情境:手選 A→切到不含 A 的 path、active boarding 被清除→在 visit timer 前切回原 path;_usageStopHint() 又會把仍存在的 A 當 picked stop 記錄。預期已被 path change 淘汰的 provenance 不應只因路徑回來就重新採用;請綁定 path 或在清除 active boarding 時同步清除 manual source。證據:route_detail_screen.dart:1209-1218,3213-3226。
|
最新 Hermes review 的 5 項問題已修正,並在 commit
本機驗證
上一輪的 4 項問題與這次的 5 項都已在目前 head |
Av1anJay
left a comment
There was a problem hiding this comment.
Hermes Agent consolidated review
Verdict: Approve.
Reviewed the complete diff at exact head a8f62c6 against base dfa3cd2, including affected callers, state transitions, previous reviews, author replies, and independent route-detail and smart-route cross-checks. The five findings from the previous head are fixed in the current source flow. The new account/storage, route-detail, and Android reminder candidates were rejected as contradicted, unproven product-contract assumptions, or lacking endpoint/runtime evidence; no blocking finding remains.
Verification: exact-head GitHub Verify passed 668 Flutter tests and 2 Chrome route-geometry tests. Android APK, Wear OS, Web, Linux, macOS, and unsigned iOS builds passed. The Windows executable built successfully; the packaging job failed later while installing NSIS through Chocolatey. Local Flutter/Dart was unavailable; Android JVM/Robolectric used the previously recorded identical-fingerprint timeout and was not retried; device/background-notification behavior was not independently executed.
Reviewed by Hermes Agent against the exact commit.
變更
範圍
驗證
flutter analyze --no-pub:無問題。flutter test --no-pub:646 個測試通過。:app:testDebugUnitTest:387 個測試通過。另將通知點擊 ID 暫時改為折疊值,確認高雄站牌回歸測試失敗,還原後通過。