Repository navigation
App: agree to the OpenBot Cloud terms before using it - #2002
Merged
Merged
Conversation
davidmckayv
requested review from
MikeRyanDev,
dustywusty,
guidovizoso,
mxmzb,
samjulien and
tylerslaton
as code owners
November 22, 2026 00:35
OpenBot Cloud asks people to agree to its Terms of Service and Acceptable Use Policy before they use it, and again when the version changes. The signed-in gate now sends a person who has to agree to /terms from anywhere, before onboarding, remembering where they were headed. The screen is onboarding's frame with one step: an unticked box naming both documents as links, Continue that waits for it, and Sign out. Agreeing sends the version shown; terms that changed meanwhile show the new version unticked with the server's sentence. An OpenBot without the operation reads as having no terms. Any other failed read holds the person at the terms screen with Try again, so a failure never lets anybody past. Self-hosted and the personal edition have no terms and never see the screen.
On a phone the buttons are pinned to the bottom with a 32px fade above them, which says the step scrolls on. Scrolled to the end there is nothing more, yet the step's last line still sat under the fade: Welcome's carousel dots, and the terms step's, were half hidden behind the first button. The footer now keeps 32px above it on a phone, the fade's own height, so the last line stops above it.
davidmckayv
force-pushed
the
cloud-terms-screens
branch
from
November 22, 2026 01:42
6337851 to
b738729
Compare
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
OpenBot Cloud asks people to agree to its Terms of Service and Acceptable Use Policy before they use it, and again when the version changes. This adds the screen and the gate in the app, on the operations from #2000 (
getServiceTerms,acceptServiceTerms)._authedbeforeLoad): right after the signed-in check and before onboarding, a person who has to agree is sent to/termsfrom anywhere, with where they were headed in?next=. While they have to agree,/termsis let through past the gates after it (onboarding today, anything added later), so it is never bounced to onboarding./terms): onboarding's frame with a single step, so it reads as the first step of signing up. A heading, one sentence, and an unticked box: "I agree to the Terms of Service and Acceptable Use Policy", both names linking to the addresses the server gives, in a new tab (OpenBot Desktop opens those in the person's browser). Continue waits for the tick and shows it is sending; Sign out is the way out. Somebody who agreed to an earlier version sees "The terms have changed".nextis followed only when it is a path in this app: an address with a scheme,//hostor a backslash goes home.SERVICE_TERMS_CHANGED): the terms are read again, the new version shows unticked, and the server's sentence says why.PERSON_NOT_FOUND) reads as no terms. Any other failure holds the person at the terms screen, which says it couldn't load them and offers Try again. A failed read never lets anybody past.currentis null andacceptanceNeededfalse, so the gate never fires and no screen is added.Also in the shared onboarding frame: on a phone, scrolled to the end, a step's last line sat under the 32px fade above the pinned buttons, so Welcome's carousel dots (and the terms step's) were half hidden behind the first button. The footer now keeps 32px above it on a phone, the fade's own height. Desktop is unchanged.
Reads and writes go through the generated client, in
lib/service-terms/queries.tsandmutations.ts. Accepting re-reads the terms withrefetchType: "all", so the gate, which reads them throughensureQueryData, never sees a stale "has to agree".Screenshots
The new test saves every screen with
OPENBOT_APP_SHOTS=<dir>: the terms screen unticked and ticked, the changed version, and the Welcome step after agreeing, in Chromium and WebKit, light and dark, at 1440 and 390 wide, beside onboarding's Welcome from before to compare. Checked side by side with Welcome: same frame, heading, type, outlined row and buttons; at a phone's width both document names stay whole on their line.Tests
app/tests/service-terms.test.tsx, in a real browser through the app's own_authedgate, the terms route and onboarding, with the server answering the spec's own examples and every body checked against the generated schemas:{version: "2026-11-21"}with an Idempotency-Key, and onboarding's Welcome followsServiceTermsChangedExample) asks again and then returns them to the page they were headed toSERVICE_TERMS_CHANGEDshows the new version unticked with the server's sentence, and agreeing sends the new versionnext(https://evil.example/,//evil.example/) never leaves the appServiceTermsNoneExample) never shows the screen,/termsopened there goes home, and a new person goes to onboarding as beforeIt runs in CI's WebKit job (Chromium and WebKit). Locally: the new test in both engines, the whole
app/suite, lint, format check and typecheck.