Skip to content

feat(frontend): name the product and link its terms on the accept-ToS page (OHE-3865) - #1173

Merged
hieptl merged 3 commits into
mainfrom
hieptl/ohe-3865-tos-modal-deployment-mode
Nov 5, 2026
Merged

hieptl merged 3 commits into
mainfrom
hieptl/ohe-3865-tos-modal-deployment-mode

Conversation

@hieptl

@hieptl hieptl commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

HUMAN:

  • A human has tested these changes.

AGENT:


Why

The Terms of Service acceptance page (/accept-tos) shows the same "Accept Terms of Service" modal on OpenHands Cloud and on self-hosted OpenHands Enterprise, and always links https://www.openhands.dev/tos. The two products have different terms, so the modal should say which product the user is accepting and link the matching page.

Summary

  • Self-hosted enterprise: "Accept OpenHands Enterprise Terms of Service", linking https://www.openhands.dev/enterprise-tos (new ENTERPRISE_TERMS_OF_SERVICE_URL).
  • Managed cloud: "Accept OpenHands Cloud Terms of Service", linking https://www.openhands.dev/tos.
  • Mode unknown (config not cached yet, or a backend that reports no deployment_mode): the generic wording and link as before, so a self-hosted user never sees "Cloud" flash while the config loads. The checkbox label "I accept the terms of service" is unchanged; only its link target is now a prop.

Issue Number

OHE-3865

How to Test

cd frontend
npm run lint
npm run check-translation-completeness
npx vitest run __tests__/routes/accept-tos.test.tsx __tests__/routes/root-layout.test.tsx

Manual: run npm run dev:mock:saas and open /accept-tos. The mock config has no deployment_mode, so it shows the generic modal. For the two product variants I rewrote the /api/v1/web-client/config response in the page (the mock API is a service worker, so Playwright cannot intercept it) with feature_flags.deployment_mode set to cloud and self_hosted; the screenshots below are from that run. On a real install the mode comes from OH_DEPLOYMENT_MODE (the Helm chart pins self_hosted, saas-deploy sets cloud).

Video/Screenshots

Self-hosted enterprise:

Accept OpenHands Enterprise Terms of Service modal with the enterprise terms link

Managed cloud:

Accept OpenHands Cloud Terms of Service modal with the cloud terms link

Type

  • Bug fix
  • Feature
  • Refactor
  • Breaking change
  • Docs / chore

Notes

  • https://www.openhands.dev/enterprise-tos returns 404 today (the non-www host too). The link is dead until that page is published.
  • The URL uses the www. host like the existing TERMS_OF_SERVICE_URL; openhands.dev/tos redirects there.
  • The login-page notice (TermsAndPrivacyNotice) and the install-wizard footer (InstallFooter) still link the Cloud terms on self-hosted installs. Not changed here.
  • The Cloud e2e helper selects the checkbox by "accept the terms of service"; that label is unchanged.
  • .pr/ holds the screenshots and is removed automatically on approval.

Enterprise server image for this PR:

ghcr.io/openhands/enterprise-server:sha-2d84e46

… page (OHE-3865)

The /accept-tos page showed one "Accept Terms of Service" modal and always
linked https://www.openhands.dev/tos, on OpenHands Cloud and on self-hosted
OpenHands Enterprise alike.

The page now reads the deployment mode from the web-client config through
useAppMode():

- Self-hosted enterprise: "Accept OpenHands Enterprise Terms of Service",
  linking https://www.openhands.dev/enterprise-tos.
- Managed cloud: "Accept OpenHands Cloud Terms of Service", linking
  https://www.openhands.dev/tos.
- Mode unknown (config not cached yet, or a backend without
  deployment_mode): the generic wording and link as before, so a
  self-hosted user never sees "Cloud" flash while the config loads.

The checkbox keeps its label and takes the link target as a prop. Two
interpolated translation keys carry the product name. Tests cover the
three cases.
@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Artifacts Cleaned Up

The .pr/ directory has been automatically removed.

@github-actions github-actions Bot added the type: feat A new feature label Nov 4, 2026
@hieptl
hieptl marked this pull request as ready for review November 4, 2026 09:17
@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Coverage report

This PR does not seem to contain any modification to coverable code.

@tofarr tofarr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍰

@hieptl
hieptl enabled auto-merge (squash) November 5, 2026 14:07
@hieptl
hieptl merged commit 059e846 into main Nov 5, 2026
22 checks passed
@hieptl
hieptl deleted the hieptl/ohe-3865-tos-modal-deployment-mode branch November 5, 2026 14:18
@openhands-release-bot openhands-release-bot Bot added the released: 1.87.0 Shipped in 1.87.0 label Nov 5, 2026
@openhands-release-bot

Copy link
Copy Markdown
Contributor

🚀 Released in 1.87.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released: 1.87.0 Shipped in 1.87.0 type: feat A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants