Skip to content

Display ToS / privacy warning on console with logging in#6547

Merged
Alek99 merged 4 commits into
mainfrom
masenf/telemetry-login-message
May 20, 2026
Merged

Display ToS / privacy warning on console with logging in#6547
Alek99 merged 4 commits into
mainfrom
masenf/telemetry-login-message

Conversation

@masenf
Copy link
Copy Markdown
Collaborator

@masenf masenf commented May 20, 2026

No description provided.

@masenf masenf requested a review from a team as a code owner May 20, 2026 22:56
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 20, 2026

Merging this PR will not alter performance

✅ 24 untouched benchmarks


Comparing masenf/telemetry-login-message (be98ff7) with main (bf2deed)

Open in CodSpeed

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 20, 2026

Greptile Summary

This PR adds a Terms of Service / Privacy Policy consent notice to the console output when a user initiates browser-based login, and tightens the telemetry call so it only fires on a fresh login with a resolved user_id. It also makes distinct_app_id optional in the telemetry _Properties TypedDict so reflex login works outside an app directory.

  • hosting.py: Adds ToS/Privacy notice to the auth URL print message — but the [Terms of Service] and [Privacy Policy] bracket syntax will be silently stripped by Rich's markup parser, rendering the notice incomplete.
  • v2/cli.py + reflex.py: login() now returns {} when already logged in, and the caller only sends telemetry (and calls _skip_compile) for a fresh login with a user_id present.
  • telemetry.py: distinct_app_id is now NotRequired, conditionally set only when a project hash is available.

Confidence Score: 3/5

The core ToS notice will not render correctly due to Rich markup interference; the rest of the changes are safe.

The ToS/Privacy notice is the main deliverable of this PR, but the square-bracket syntax used for the label text is eaten by Rich's markup parser, leaving the consent message truncated. The rest of the changes are straightforward and correct.

packages/reflex-hosting-cli/src/reflex_cli/utils/hosting.py — the print call with Rich markup interference.

Important Files Changed

Filename Overview
packages/reflex-hosting-cli/src/reflex_cli/utils/hosting.py Adds ToS/Privacy Policy notice to the browser-auth print message, but the bracket syntax is interpreted as Rich markup tags, which will silently strip the label text and render an incomplete message.
packages/reflex-hosting-cli/src/reflex_cli/v2/cli.py Returns empty dict instead of validated_info when already logged in — intentional to prevent telemetry on repeat logins.
reflex/reflex.py Updated login command to only call _skip_compile and send telemetry when a fresh login with a user_id is returned.
reflex/utils/telemetry.py Makes distinct_app_id optional (NotRequired) and conditionally populates it only when project_hash is available.

Reviews (1): Last reviewed commit: "Display ToS / privacy warning on console..." | Re-trigger Greptile

Comment thread packages/reflex-hosting-cli/src/reflex_cli/utils/hosting.py Outdated
Comment thread packages/reflex-hosting-cli/src/reflex_cli/utils/hosting.py Outdated
masenf and others added 3 commits May 20, 2026 16:02
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
`typing.NotRequired` was added in Python 3.11; the project still supports 3.10.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Alek99 Alek99 merged commit f6ef005 into main May 20, 2026
70 checks passed
@Alek99 Alek99 deleted the masenf/telemetry-login-message branch May 20, 2026 23:42
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.

2 participants