Skip to content

feat: 新增隱私優先的社交動態分享 - #94

Open
steventeng2022 wants to merge 2 commits into
YetAnotherBusDeveloper:mainfrom
steventeng2022:codex/social-sharing-hub
Open

steventeng2022 wants to merge 2 commits into
YetAnotherBusDeveloper:mainfrom
steventeng2022:codex/social-sharing-hub

Conversation

@steventeng2022

Copy link
Copy Markdown
Contributor

新增登入後的交通動態分享中心,可選擇近況、輸入備註、設定建議查看期限,並自行決定是否附上概略或精確位置。純文字動態不會請求定位權限;位置只在按下分享時取得,不會背景追蹤。介面與分享內容明確提醒外部 App 內的內容及位置連結無法遠端撤回。驗證:location_share_test.dart 共 6 項測試通過;修改檔案 dart analyze 無問題;git diff --check 通過。

@Av1anJay Av1anJay left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@steventeng2022

Copy link
Copy Markdown
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 Av1anJay left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@itousouta15

Copy link
Copy Markdown
Member

先不急著合,等到下一個版本再處理

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants