Skip to content

Bug thread viewer and per-channel notification tests - #553

Merged
whes1015 merged 6 commits into
mainfrom
feat/bug-tracker
Aug 25, 2026
Merged

Bug thread viewer and per-channel notification tests#553
whes1015 merged 6 commits into
mainfrom
feat/bug-tracker

Conversation

@whes1015

@whes1015 whes1015 commented Aug 25, 2026

Copy link
Copy Markdown
Member

這個 PR 做了什麼

更多頁新增唯讀的「已回報的錯誤」討論串瀏覽,通知設定頁新增可逐一試響每個 OS 通知頻道的測試頁,另含兩項修正。

相關 issue

  • closes #

怎麼驗

已回報的錯誤(更多 → 已回報的錯誤)

  • 列表可依「最後討論 / 最多討論」排序;標籤 chips 點選即濾、再點取消,全被濾掉時出現 EmptyView
  • 進入任一討論串:開發人員回覆帶徽章與 primary 色名稱;msg 為 null 的回覆顯示佔位,點擊前往 Discord
  • 已刪除帳號等沒有頭像資訊的作者顯示人形佔位,不再對空網址發出請求

通知測試(通知設定 → 右上角測試鍵)

這是通知路徑,安全關鍵的部分分開說明。

測試訊息必須無法被誤認為真的警報。 樣本是逐字複製真實 CWA 警報的,「花蓮縣壽豐鄉發生地震 強烈搖晃警戒」就是真的緊急地震速報會說的話。所以標題必帶 [測試] 、內文必帶 ***這是測試訊息***——少了標記,鎖定畫面上出現的就是一則沒有人發布過的地震警報,可以被截圖轉傳。test/core/notifications/test_notification_content_test.dart 對全部 21 則樣本鎖死這兩個標記;實測拿掉標題前綴後該測試會失敗並指名是哪個頻道。

靜音行為如實呈現,不做美化。 只有 8 個 critical 頻道會穿透靜音——awesome 在 NotificationBuilder.swift:613 對它們設 interruptionLevel = .critical,其餘依 importance 設 .active / .timeSensitive,而只有前者會蓋過靜音開關。兩者取音效走的是同一段程式碼,所以 21 列全部都正確掛上了音效,差別純粹在 OS 那一層。每一列的副標直接寫出這個條件(「有聲音並跳出橫幅,但手機靜音時不會響」),因為這頁存在的唯一理由就是回答「我到底聽不聽得到」。

驗法:在手機靜音狀態下逐列點過去——8 個 critical 頻道應該要響,其餘 8 個有聲頻道應該不響,5 個無聲頻道只出現在通知中心。解除靜音後重跑,除了無聲頻道以外全部應該有聲。iOS 另需確認未授權「重要警告」時,critical 那幾列的副標會自動降級成非穿透的描述。

Android body 走 android.text.Html 解析(已從 APK 的 dex 確認),所以標記分隔在 Android 用 <br>、iOS 用 \n;樣本自身的換行兩平台都原樣保留,因為真實推播走的是同一條路徑。

首頁雨滴卡片

拖曳首頁卡片使其升過位置門檻(gate 翻轉),不再拋 '!child.attached': is not true,拖曳手勢也不再被中斷。原因是帶 GlobalKey 的子樹隨 gate 在 RainOnGlass 與裸節點之間換父節點;現在 gate 只驅動效果強度,不驅動樹的形狀。

重現:首頁降水卡片按重試,等資料回來後拖動拖盤。

測過的裝置

  • iOS 實機:通知測試 21 列、critical 與非 critical 的靜音行為
  • Android:待驗

檢查清單

  • tool/check/commits.sh origin/main..HEAD 通過
    —— commit 訊息就是更新日誌,格式見 commit.md
  • 一個 commit 一件事(這條 gate 驗不了,靠自己和 review)
  • mise exec -- flutter analyzemise exec -- flutter test 通過
    —— 尚未全綠:lib/features/bug_tracker/ 缺 freezed / .g.dart codegen
    moreBugReports ARB key,連帶讓 notification_routes_test
    more_page_test 在載入階段失敗。合併前要補。
  • 新的使用者可見字串都走 AppLocalizations,沒有寫死
  • 有 UI 變更的話:用的是 AppSpacing / AppRadius / AppMotion
    深色模式看過,文字對比度可接受

New(zh-Hant): 更多頁新增「已回報的錯誤」——以討論串樣式瀏覽 Discord 錯誤回報與官方回覆,標籤以徽章呈現,僅供檢視
New(en-US): the More tab gains a read-only, GitHub-issues-style view of the bug threads mirrored from Discord — tags as badges, replies included
Fix(zh-Hant): 部分回報者的頭像資訊缺失(如已刪除帳號)時改顯示人形佔位圖示,不再對空網址發出請求
Fix(en-US): authors without avatar info now show a person placeholder instead of firing requests at an empty URL
Fix(zh-Hant): 修正拖曳首頁卡片時雨滴效果偶發的中斷與閃爍,滑動中也不再空跑濾鏡
Fix(en-US): fix the mid-drag crash from re-parenting the rain shader subtree, and stop running its filter while nothing distorts
New(zh-Hant): 通知設定頁新增測試入口——可實際試響每個頻道的音效與呈現,重要警報也會如實穿透靜音模式
New(en-US): the notification settings page gains a per-channel test button that rings each channel exactly as a real alert would, critical alerts included
@whes1015 whes1015 changed the title 已回報的錯誤瀏覽頁、通知測試入口與修正 Bug thread viewer and per-channel notification tests Aug 25, 2026
Fix(zh-Hant): 測試通知的標題與內文都會標明是測試,不會被誤認為真的警報
Fix(en-US): test notifications are marked as tests in both the title and the
  body, so they cannot be mistaken for a real alert
Fix(zh-Hant): 通知測試每一列會寫明手機靜音時該頻道到底會不會響
Fix(en-US): each row on the notification test page now says whether the
  silent switch will mute it
@whes1015
whes1015 merged commit 8964d33 into main Aug 25, 2026
6 checks passed
@whes1015
whes1015 deleted the feat/bug-tracker branch August 25, 2026 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants