Repository navigation
fix: enforce cloud analytics consent from TOS - #79
Merged
Merged
Conversation
Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: openhands <openhands@all-hands.dev>
Contributor
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
OSS-5714 Align Agent Canvas telemetry UI with Cloud-required and local opt-in policy
ProblemCanvas capture policy differs by deployment, but the settings UI can misrepresent it: Cloud telemetry is required while local/API-key deployments are explicit opt-in. Acceptance criteria
|
malhotra5
marked this pull request as ready for review
July 27, 2026 18:07
Contributor
|
👋 Thanks for opening this PR! Before review, please add a short note in the Please put that note between |
saurya
reviewed
Jul 27, 2026
saurya
reviewed
Jul 27, 2026
saurya
reviewed
Jul 27, 2026
saurya
approved these changes
Jul 27, 2026
Co-authored-by: openhands <openhands@all-hands.dev>
Contributor
|
🚀 Released in 1.49.0. |
4 tasks
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.
HUMAN:
I've confirmed that rest apis to override the consent field are denied, users are auto consented in after tos page, and toggle for consent is disabled. Attached below is how the UI appears, where we have a transparent auto opt in policy but the user is unable to override the selection.
AGENT:
Why
In cloud mode, accepting the Terms of Service is the consent signal for analytics. The analytics setting should therefore appear enabled after the TOS page, and users should not be able to disable it through cloud UI or API paths.
This ports the changes from OpenHands/OpenHands#15376 to the OpenHands/enterprise repository.
Summary
user.user_consents_to_analyticsfromaccepted_tosat central SaaS user lookup and the user app settings store direct path, then use the flag for analytics contexts and events.Issue Number
N/A
How to Test
poetry run pytest tests/unit/test_analytics_context.py tests/unit/app_server/test_settings_api.pyPYTHONPATH=enterprise poetry run --project=enterprise pytest --confcutdir=enterprise/tests/unit enterprise/tests/unit/test_saas_settings_store.py enterprise/tests/unit/server/routes/test_user_app_settings.py enterprise/tests/unit/server/services/test_user_app_settings_service.py enterprise/tests/unit/storage/test_user_app_settings_store.py enterprise/tests/unit/test_user_store.py::test_get_user_by_id_existing_usercd frontend && npm run test -- __tests__/routes/app-settings.test.tsxcd frontend && npm run lint:fix && npm run buildpoetry run pre-commit run --config ./dev_config/python/.pre-commit-config.yamlpoetry run --project=enterprise pre-commit run --all-files --show-diff-on-failure --config ./dev_config/python/.pre-commit-config.yamlVideo/Screenshots
Not applicable; behavior is covered by automated UI tests for the disabled cloud analytics switch.
Type
Notes
This PR was created by an AI agent (OpenHands) on behalf of the user.
Cloud users retain analytics consent through TOS acceptance. OSS users still use the explicit analytics preference.
Enterprise server image for this PR: