docs: add privacy policies and minimize analytics data - #2518
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
WalkthroughChanges分析与隐私政策
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested labels: Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1⚔️ Resolve merge conflicts 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/.vitepress/theme/analytics-consent.mjs`:
- Around line 214-223: 更新事件参数构建逻辑中的 cta_location,使其从已由 sanitizeAnalyticsPageUrl
生成的 pageUrl 读取 utm_content,而不是从原始 linkUrl 读取;保留 unspecified 默认值,并为超长 utm_content
补充回归测试,验证清理后的值不会超过 100 个字符或泄露原始数据。
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: c53dbe97-b233-4997-a13b-310b8044e261
📒 Files selected for processing (9)
docs/.vitepress/config.tsdocs/.vitepress/theme/analytics-consent.mjsdocs/cookies.mddocs/ja/cookies.mddocs/ja/privacy.mddocs/privacy.mddocs/scripts/analytics-consent.test.mjsdocs/zh-CN/cookies.mddocs/zh-CN/privacy.md
🔗 Linked repositories identified
CodeRabbit considers these linked repositories for cross-repo context during reviews:
Project-N-E-K-O/N.E.K.O.-PC(manual)
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8a1fcdcfb4
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review |
Greptile Summary本次 PR 新增三种语言的隐私与 Cookie 政策,并减少分析事件携带的数据喵。
Confidence Score: 5/5当前没有符合本次跟进审查范围且会阻止合并的故障,因此该 PR 看起来可以安全合并喵。 当前没有仍会阻止合并的故障喵。
|
| Filename | Overview |
|---|---|
| docs/.vitepress/theme/analytics-consent.mjs | 页面浏览和 Steam CTA 上报现在会净化 URL、规范化目标地址并省略链接文本喵。 |
| docs/.vitepress/config.ts | 三种语言的文档页脚均增加了对应的隐私政策与 Cookie 政策链接喵。 |
| docs/scripts/analytics-consent.test.mjs | 新增了敏感查询数据移除、双斜杠路径处理、目标地址规范化和 CTA 参数截断测试喵。 |
| docs/privacy.md | 英文隐私说明被扩展为完整政策,并与新的分析数据最小化行为保持一致喵。 |
| docs/cookies.md | 新增英文 Cookie 政策,说明偏好存储、可选分析 Cookie 与选择管理方式喵。 |
| docs/zh-CN/privacy.md | 简体中文隐私政策已更新,并说明分析数据处理和撤回选择的方式喵。 |
| docs/zh-CN/cookies.md | 新增简体中文 Cookie 政策喵。 |
| docs/ja/privacy.md | 日文隐私政策已更新,并说明分析数据处理和撤回选择的方式喵。 |
| docs/ja/cookies.md | 新增日文 Cookie 政策喵。 |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
Consent[Visitor grants analytics consent] --> PageView[Page view]
Consent --> SteamClick[Steam CTA click]
PageView --> SanitizePage[Retain path and approved UTM parameters]
SteamClick --> SanitizeCurrent[Sanitize current page URL]
SteamClick --> NormalizeTarget[Remove destination query and fragment]
SanitizePage --> GA4[GA4 event]
SanitizeCurrent --> GA4
NormalizeTarget --> GA4
Reviews (2): Last reviewed commit: "fix(docs): preserve analytics URL origin..." | Re-trigger Greptile
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 025697dfe7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Dependency
Depends on #2489. Merge #2489 first. This PR deliberately does not change the consent banner component introduced there.
What changed
Why
The documentation needs clear, localized privacy explanations without exposing implementation-specific identifiers. Analytics should also avoid forwarding arbitrary URL data or visible link labels.
User impact
Visitors get complete privacy and cookie explanations plus footer access to both pages. Consent behavior remains unchanged, while analytics events carry less potentially sensitive context.
Validation
npm run test:analytics— 11/11 passednpm run build:check— passedgit diff --check— passedSummary by CodeRabbit