Repository navigation
Conversation
Codecov Report❌ Patch coverage is ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Platform: all Optimization(zh-Hant): 地震速報開著時,地圖波前每一幀少算一些,更新更順 Optimization(en-US): while an earthquake alert is up, the map wavefront does less work each frame and updates more smoothly Optimization(zh-Hant): 首頁天空每一幀少算一些,動畫更順 Optimization(en-US): the home sky does less work each frame, so the animation is smoother
This branch has not been deployed
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.
這個 PR 做了什麼
接著 #584,把測試套件還沒碰到的程式庫補上測試。行覆蓋率從 66.23% 提高到 94.48%,零覆蓋的檔案從 26 個減到 2 個(
lib/bootstrap.dart、lib/main.dart)。fcd37d29)兩邊都用
tool/dev/coverage.sh在同一台機器上量測;main 的數字是在獨立的 worktree 量的。改動內容
一個 commit(
4b5900b9),共 156 個檔案:lib/core/meshtastic/data/meshtastic_client_impl.dart,只是加上測試用的注入點,正式環境的行為不變:MeshtasticClient、藍牙支援檢查、adapter 狀態串流、已連線/系統裝置清單,以及 adapter 等待逾時。不注入時一律使用原本的FlutterBluePlus。channelConfirmTimeout(@visibleForTesting,預設 8 秒)讓測試不必真的等完 managed-mode radio 的 8 秒逾時。_rxHooked確保只掛一次,注入的 client 也會被計數。正式環境一樣只在第一次建立 client 時掛上。覆蓋率增加最多的區域
lib/features/maplib/features/earthquakelib/corelib/sharedlib/features/homelib/features/meshtasticlib/features/weatherlib/app單一檔案增加最多的:
features/earthquake/presentation/pages/report_detail_page.dartshared/map/map_scaffold.dartfeatures/earthquake/presentation/pages/report_replay_page.dartfeatures/map/presentation/widgets/typhoon_panel.dartfeatures/meshtastic/presentation/pages/meshtastic_page.dartfeatures/map/presentation/widgets/station_sheet.dartfeatures/weather/presentation/pages/weather_ranking_page.dartcore/meshtastic/data/meshtastic_client_impl.dartfeatures/map/presentation/widgets/dpm_sheet.dartfeatures/map/presentation/layers/disaster_map_layer.dart還沒覆蓋的
lib/bootstrap.dart(160 行):開資料庫、Firebase、通知 plugin 的啟動流程,要測得先替整條啟動鏈做測試替身,另開 PR 處理。lib/main.dart(1 行)。相關 issue
沒有對應的 issue。前一階段是 #584(已合併)。
怎麼驗
tool/dev/coverage.sh在這個分支跑完整套件:2,949 個測試全數通過,上表數字就是這次的結果。tool/dev/analyze.sh無問題;tool/check/commits.sh origin/main..HEAD通過;layering、l10n、storage、tooling 四道 gate 都通過。meshtastic_client_impl.dart是這個 PR 唯一動到的正式程式碼,請 review 時特別看:FlutterBluePlus呼叫。test/底下的改動。檢查清單
tool/check/commits.sh origin/main..HEAD通過tool/dev/analyze.sh與tool/dev/test.sh通過