Repository navigation
fix: allow anonymous opt-out before sign-in - #33
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ee478aa3a1
ℹ️ 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".
| const enabled = useSyncExternalStore(subscribeAnonymousCounts, anonymousCountsEnabled, () => false) | ||
| const zh = language === 'zh' | ||
| return <section className="rounded-[var(--radius-lg)] border p-5" aria-labelledby="anonymous-counts-title"> | ||
| return <section className="rounded-[var(--radius-lg)] border p-5" aria-labelledby="anonymous-counts-title" data-auth-preview-allowed="true"> |
There was a problem hiding this comment.
Expose the opt-out through the guest navigation path
For a signed-out production visitor entering Settings normally, this exemption is never reachable: SettingsRoute initializes activeSection to appearance at line 606, while the Legal TabsTrigger at lines 1109–1125 is itself inside AuthInteractionGate and lacks data-auth-preview-allowed, so the gate intercepts its role="tab" interaction before openSection can navigate. Only manually entering /workspace/settings/legal exposes this switch, and the new test misses the problem by rendering AnonymousCountsSetting directly; allow guest navigation to the Legal section or put the opt-out in an already reachable view.
Useful? React with 👍 / 👎.
生产验收发现未登录访客点击匿名计数开关会被现有 AuthInteractionGate 拦截并要求登录。本次仅将匿名计数设置标记为可公开操作,沿用法律页面现有的 data-auth-preview-allowed 机制,访客可直接关闭匿名计数。其他私有操作继续受登录拦截。
增加强制 isGated=true 的中英文集成回归,验证关闭生效、选择存储、没有登录提示,且相邻私有按钮仍被阻止。定向 11 项与 lint 已通过;标准 verify 正在运行,合并前等待完整 CI。
仅包含该组件一行改动及回归测试,保留其他未提交改动。生产复验将记录实际未登录开关操作。