feat: 新增隱私優先的社交動態分享 - #94
Open
steventeng2022 wants to merge 2 commits into
Open
steventeng2022 wants to merge 2 commits into
steventeng2022 wants to merge 2 commits into
Conversation
Av1anJay
requested changes
Sep 23, 2026
Av1anJay
left a comment
Collaborator
There was a problem hiding this comment.
Code Review Summary
Verdict: Changes requested(1 個阻擋問題)
⚠️ Blocking
lib/core/location_share.dart:94-99—normalizeNote用String.length/substring依 UTF-16 code unit 截斷,但畫面的TextField.maxLength是依使用者可見字元計數。因此像「119 個 ASCII 字元 + 1 個 emoji」這種畫面允許的 120 字備註,會在substring(0, 120)切開 surrogate pair;ZWJ 或組合字元也可能被切斷,導致分享文字末尾損壞。請用characters以 grapheme cluster 套用同一個 120 字限制(例如normalized.characters.take(noteMaxLength).toString()),並補一個 emoji 邊界測試。
✅ Looks Good
- 未勾選位置時不會呼叫定位流程;位置分享維持明確 opt-in。
- 分享期限被清楚標示為建議期限,且有說明外部 App 內容無法遠端撤回。
- 概略/精確位置的隱私提示與分享內容一致。
Checks
- GitHub Actions Verify:通過(workflow 執行
flutter analyze、flutter test、Chrome route geometry test)。 - 平台建置:Web、Windows、Linux、macOS、iOS、Wear OS 通過;Android 在審查時仍進行中。
git diff --check:通過。- 新增 diff 的 debug/TODO、secret-like pattern、衝突標記掃描:未發現。
- 本機未安裝 Flutter,因此未重跑本機 Flutter 指令。
Reviewed by Hermes Agent
Contributor
Author
|
已修正 blocking review:normalizeNote 現在使用 characters grapheme cluster 套用 120 字限制,不再以 UTF-16 code unit 截斷;並新增 119 個 ASCII 字元加 1 個家庭 ZWJ emoji 的邊界回歸測試。characters 已列為直接依賴。驗證結果:location_share_test.dart 7/7 通過、修改檔案 dart analyze 無問題、git diff --check 通過。修正 commit:337c732。 |
Av1anJay
approved these changes
Sep 23, 2026
Av1anJay
left a comment
Collaborator
There was a problem hiding this comment.
Code Review Summary
Verdict: Approved
先前阻擋合併的 Unicode 截斷問題已修正:normalizeNote 現在以 grapheme cluster 計數與截斷,並新增 ZWJ family emoji 的 120 字邊界測試。重新檢視完整 diff 與相關定位、登入、路由程式碼後,未發現其他具體阻擋問題。
Checks
- GitHub Actions
Verify:通過(flutter analyze、完整flutter test、Chrome route geometry test) - 平台建置:Android APK/AAB、Wear OS APK/AAB、Web、Windows、Linux、macOS、iOS unsigned IPA 全部通過
git diff --check、git log --check:通過- 本機未安裝 Flutter;Flutter 檢查採用此 head SHA 的 GitHub Actions 實際結果
Reviewed by Hermes Agent
Member
|
先不急著合,等到下一個版本再處理 |
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.
新增登入後的交通動態分享中心,可選擇近況、輸入備註、設定建議查看期限,並自行決定是否附上概略或精確位置。純文字動態不會請求定位權限;位置只在按下分享時取得,不會背景追蹤。介面與分享內容明確提醒外部 App 內的內容及位置連結無法遠端撤回。驗證:location_share_test.dart 共 6 項測試通過;修改檔案 dart analyze 無問題;git diff --check 通過。