Repository navigation
Gate account e-mail addresses behind privacy.showAccountEmail - #25
Merged
Merged
Conversation
An account provider's snapshot reaches every widget subscribed to its channel, a third-party marketplace widget with network access included, and the Edge sits on a desk. The account e-mail therefore needs its own opt-in, decided server-side, before any provider may publish it. No release ever published an address, so an older config is read as off by the schema default and needs no inference, unlike claudeAccountUsage. The tests pin that, and that the store neither rewrites a v3 file that lacks the field nor one whose value it cannot read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
withAccountEmail() is spread into a snapshot and adds the address only when privacy.showAccountEmail is on; off, the key is absent rather than empty or masked. No provider on main publishes an address today, so nothing is wired to it yet: the helper, its test and the documented contract are what the first account provider (Claude, Codex) is held to. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The box sits next to the Claude usage opt-in, and its hint says plainly what turning it on means: the address is sent to every widget reading an account channel, marketplace ones included, and shows on the screen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two gaps found reviewing #19. A provider that answers a failure with its last good snapshot ({ ...last, error }) would keep publishing an address fetched while the box was ticked; gateAccountEmail() drops it from any existing snapshot, and the contract now says every returned snapshot goes through it. And unticking only took effect at the provider's next poll, five minutes for an account endpoint, while the hub kept replaying the old value to new subscribers. A provider now declares publishesAccountEmail, and a change of the setting has the registry poll those providers at once (or straight after a poll in flight, which may have read the old value) and drop the cached value of a channel nobody watches. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of #25. A poll in flight when the last widget left was not marked when the setting changed, so its answer, read under the old setting, was published and cached for the next subscriber; a watched channel kept its cached value until the repoll returned. The cache is now dropped first in every case, and an answer from a poll that was in flight is thrown away rather than published, watched or not. A provider without poll() can publish nothing on its channel and could never take an address back, so the registry refuses the flag there. The documented example now returns from poll() as the provider model does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fdussert
force-pushed
the
feature/account-email-setting
branch
from
October 15, 2026 16:27
99ca586 to
60bce8c
Compare
The Codex provider in #14 publishes the account under account.data, and gateAccountEmail only looks at the top level of what it is given, so gating the whole snapshot would leave a nested address in place. The helper stays a single-level one, which keeps it obvious; the contract now says to apply it to the object that carries email, on the fresh, error and stale paths alike, with a nested example and a test that also shows gating the outer object changes nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 15, 2026
This was referenced Oct 15, 2026
Merged
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.
What
A new privacy setting,
privacy.showAccountEmail, off by default, with a checkbox in /admin → Screen → Privacy next to the Claude usage opt-in. Until it is ticked, no account provider may put the account's e-mail address in what it publishes.showAccountEmailinPrivacySchema(server/src/config/schema.ts), defaulting tofalse. No release ever published an address, so an older config is read as off by the schema default — no inference likeclaudeAccountUsageneeds. Tests cover v1/v2/v3 files without the field, a file that carries it, a v3 file left untouched on disk, and a file with an unreadable value left untouched while the store runs degraded.server/src/privacy.ts):withAccountEmail(email, show)builds the field: absent when off, not empty or masked.gateAccountEmail(snapshot, show)drops it from an existing snapshot — the error path's{ ...last, error }and any cached answer — so an address fetched while the box was ticked is not republished after it is unticked. It looks at the top level only, so it is applied to the object that carriesemail—account.datain a snapshot shaped like Add opt-in Codex account and session provider #14's.publishesAccountEmail: trueon a provider makes a change of the setting drop the hub's cached value of its channel at once (watched or not) and poll it again immediately. An answer from a poll that was already in flight — which may have read the old setting — is thrown away rather than published, whether a widget is still watching or not. Unticking therefore takes the address off the screen immediately rather than at the next poll, five minutes for an account endpoint, and no stale value is replayed to a widget subscribing in between.publishesAccountEmailon a provider withoutpoll(): a poll is the only way anything reaches a channel, so such a provider could never take an address back.docs/connections.mdandAGENTS.md, a pointer indocs/claude-code.md, the user side in the README, and a CHANGELOG line.No provider on
mainpublishes an e-mail today, so nothing is wired to the helpers yet: they, their tests and the documented contract are what the first account provider is held to.Why
Decided while reviewing #14 (Codex) and #19 (Claude account): whatever a provider publishes on a channel reaches every widget subscribed to it, including a third-party marketplace widget with network access, whose consent dialog says "reads channel X", not "reads your e-mail" — and the Edge sits on a desk. So the check is server-side: off, the field is never in the snapshot. The plan (Pro, Max, …) and the sign-in method are not covered by the setting and are published either way. #14 and #19 can gate their address on this once it lands.
How to see it
Run a bench server from this branch (
FREMKIT_PORT=4301 FREMKIT_DATA_DIR=<tmp dir>fromserver/, seeded withdata/fremkit.example.json), open/admin→ Screen → Privacy, tick Show the account e-mail address, and checkGET /api/configreportsprivacy.showAccountEmail: true.Checks
pnpm typecheck— greenpnpm test— server 1416 tests / 72 files, ui 385 / 30, all greenpnpm --filter ui build— green🤖 Generated with Claude Code