Show the Orbit access rule on every Orbit page and index instances without a trial
What does this MR do and why?
Every Orbit page now follows the turn-on decision of the server, so the Off page, Group status, Settings > Orbit, and Admin area > Orbit agree. On GitLab Self-Managed and GitLab Dedicated, admins and Owners turn on Orbit indexing with or without a trial or a purchase, until the instance trial ends. Orbit queries still need a trial or a purchase: until then, the Overview keeps the item counts and blurs the globe behind a card that says how to get queries, with Start free trial for an administrator of an instance that can start its trial, and Try again when CustomersDot does not answer. GitLab.com does not change: a group turns on when it starts its trial or has a purchase.
The self-managed rule comes from !262603 (merged) (merged), which changed the backend. Design: https://claude.ai/artifact/6q6sGJBv7LWbBMNhGM4MRC
Closes https://gitlab.com/gitlab-org/orbit/knowledge-graph/-/work_items/1386 Closes https://gitlab.com/gitlab-org/orbit/knowledge-graph/-/work_items/1387
References
- Backend rule: !262603 (merged)
- Instance billing account: !261678 (merged)
- Epic: https://gitlab.com/groups/gitlab-org/-/epics/21198
Screenshots or screen recordings
| Before (master) | After |
|---|---|
| Self-managed Overview, Owner | Self-managed Overview, administrator, trial available | Self-managed Overview, administrator, no trial |
|---|---|---|
![]() |
![]() |
![]() |
| Self-managed: turn on without a trial | Self-managed: trial starts, queries run | Self-managed: trial ended | Self-managed: no trial flow |
|---|---|---|---|
| Self-managed: beta | GitLab.com: Off page trial | GitLab.com: Contact sales | GitLab.com: Settings confirm |
|---|---|---|---|
| GitLab.com: CustomersDot down | GitLab.com: trial ended | GitLab.com: regression pass | Self-managed: pages the refactor touched |
|---|---|---|---|
What changes on GitLab Self-Managed and GitLab Dedicated
| Instance access | Turn on (Owner and admin) | Automatic indexing | Overview |
|---|---|---|---|
| Beta (promo gate off) | Yes | Yes | Counts and globe, queries run |
| Free trial to start (promo gate on) | Yes, no trial confirm | Yes | Counts, blurred globe, card; an administrator gets Start free trial |
| Not eligible, or no trial flow (promo gate on) | Yes, no trial confirm | Yes | Counts, blurred globe, card with Contact sales |
| Free trial active | Yes | Yes | Counts and globe, queries run |
| Free trial ended | No | Locked | Trial-ended copy |
| No Orbit license | No | No | Not available |
- Overview: when the instance runs no queries (
queries_availableis false), the counts card stays and the globe sits behind a blurred card with the Orbit logo. Under the card the globe isinert, runs no instance map query, and does not expand group neighbors, because that is a billed query; the pending-projects pill hides. The card replaces the Overview alert. Start free trial shows only to an administrator, only when the instance access isTRIAL_ELIGIBLE, and opens Admin area > Orbit. During a CustomersDot outage the card says so and offers Try again. - Query editor: with no queries, it says "Queries start with a trial or a purchase. Ask your administrator, or contact sales."
- Admin area > Orbit: the access card says that groups index now and that the trial is for queries. Before the promo gate, an instance whose trial has not started shows the beta card and no trial offer, because the license runs its queries. A not-eligible instance gets a "Buy Orbit to run queries" card. The groups table and the automatic indexing toggle lock only after the instance trial ends.
- The Off page, Group status, and Settings > Orbit offer Turn on Orbit whenever the server gives no turn-on denial, whatever the trial state. A group that is on does not get the "not available" alert just because the instance is not eligible for a trial.
- During the instance trial, the pages and the turn-on confirm show its end date. Owners and auditors can read the instance trial state and end date for this; only administrators read its credits. Only an administrator starts it.
What changes on GitLab.com
- The Off page and Group status read
orbit.access(state,reason,turnOnDenialReason) anduserPermissions.startOrbitTrial. The rules that copied the backend are gone. - A group that needs a purchase shows Not available for this group and Contact sales, with no checkbox.
- Group status shows the trial offer on each eligible row, as the Off page does.
- When CustomersDot does not answer, the Off page and Group status show one alert with Try again and Contact sales.
- Settings > Orbit uses the shared turn-on confirm with the offer. The old
StartTrialModalis deleted. - Contact sales opens the hand-raise form everywhere on the Orbit dashboard, and the lead goes to the group of the button.
- The turn-on rule does not change, and the Overview never shows the blurred card:
queries_availableis always true on GitLab.com. - The Overview trial-ended alert says "Contact sales to keep using Orbit" with a Contact sales button (before: "Talk to your GitLab seller").
Backend changes
Account#trial_offered_to?now checks the trial that covers the group (its own trial on GitLab.com, the instance trial elsewhere), so an Owner of a top-level group reads the instance trial with no change to the group policy. Starting the trial stays admin-only on an instance (trial_startable_by?).OrbitTrial.creditsstays as is on GitLab.com; on an instance only administrators read it.- Before the promo gate, an instance whose trial has not started reports
LICENSED/PLAN, like the groups on master. Group access and GitLab.com do not change. - During a CustomersDot outage, the access denies the turn-on only when the turn-on rule reads the trial status. A beta group still turns on, and on an instance the access agrees with the mutation, which reads the live trial status.
- Every Orbit page gets one
orbit_platformdata attribute fromAnalytics::Orbit::PlatformHelper:{ saas }, plusinstance: { state }on the dashboard only when the instance runs no queries. The frontend parses it once (access/platform.js) and providesorbitPlatform; no component readssaasprops orgon.dot_comanymore. The dashboard also getsqueries_availableand the hand-raise data. The shared hand-raise button and form take an optionalnamespaceId. queries_availableand the instance state read the instance trial status during the dashboard render, only off GitLab.com and only under the trial flow. The answer is cached per request and across requests (120 s), so the two reads cost one CustomersDot call; Settings > Orbit and the admin page make none. During a CustomersDot outage, errors are not cached: the dashboard render and each Orbit request (GraphQLorbit.access,/orbit/status,query/templates) waits up to 2 seconds and sends one Sentry event.- Admin area > Orbit gets an
AdminInstanceAccesscomponent that owns the instance access query, the start-trial mutation, the error alert, the card, and the modal, and tells the page when turn-on locks. It runs its own mutation, as the root of its own slice. The admin page returns 404 on GitLab.com, so it needs no GitLab.com branch.
What each recording covers
- Every recording runs the final commit against GDK, the local CustomersDot, and Orbit (GKG). GitLab.com runs use the Orbit UI fleet lanes. Self-managed runs use a Puma without
GITLAB_SIMULATE_SAAS, the promo gate on, and a real instance trial in CustomersDot. - Before: master on the same data, recorded before this MR.
- Self-managed Overview: an indexed group with no trial or purchase. The Owner sees the counts (8 items in 1 group and 1 project) and the blurred globe with the card and Contact sales; the globe sends no neighbors request. The administrator of an instance that can start its trial gets Start free trial, which opens Admin area > Orbit. With no trial flow, the administrator gets Contact sales only. On a beta instance there is no card and the globe loads the neighbors.
- Turn on without a trial: the admin page offers Turn on Orbit and unlocks automatic indexing; the Owner turns on a group with no trial in the confirm; the Query tab says how to get queries.
- Trial starts, queries run: the administrator starts the instance trial;
expand_neighborsreturns 200 and a query runs. - Trial ended: the admin card says the trial ended, the table offers no Turn on Orbit, and automatic indexing says "Available after you buy Orbit."
- GitLab.com: an eligible group starts its trial on turn-on, a group that is not eligible gets Contact sales, the CustomersDot outage alert shows, a query runs on the Query tab, and the beta and trial lanes are unchanged with no blurred card.
- Pages the refactor touched: during the instance trial, Settings > Orbit and Group status show the end date, the admin card links Contact sales to the sales page, and the admin page reads the instance access once. On GitLab.com, Admin area > Orbit returns 404 and sends no request.
- A script checks 68 expected values against the recorded results of these flows. All pass.
More screenshots
Known limits
- Under the promo gate, the instance access is
UNLICENSED/NO_ACCESSboth without an Orbit license and with a license but no trial flow. The admin page lets the server decide turn-on in both cases, and a group that is on keeps the "not available" alert on Settings > Orbit. - During a CustomersDot outage, the Admin area still offers Turn on Orbit, and the server refuses it with "not available right now".
- The hand-raise controller finds the lead group in the direct memberships of the user. An Owner through a group share, an auditor, or an administrator in admin mode gets a 404 for that group. The controller belongs to another team.
- Backend messages for an ended trial still say "Add GitLab credits", while the pages and docs say "contact sales".
- A blocked Orbit query returns the generic
403 Forbiddenbody (ee/lib/api/orbit/data.rb), so the pages use their own text for it. - After the instance trial ends, Group status can say that Orbit is off for your groups while a group is still on, until the hourly trial-end worker turns it off.
How to set up and validate locally
-
GitLab.com: use a GDK with
GITLAB_SIMULATE_SAAS=1and a local CustomersDot. Sign in as an Owner of an eligible group and go tohttp://127.0.0.1:3000/dashboard/orbit. -
GitLab Self-Managed: use a GDK without
GITLAB_SIMULATE_SAAS, with an online cloud license that CustomersDot allows for the Orbit trial. End the beta:Feature.enable(:orbit_promo_access_gate, :instance) -
As a group Owner, go to
http://127.0.0.1:3000/dashboard/orbitand turn on Orbit for a group: it turns on with no trial. When the group is indexed, the Overview shows the counts and the blurred globe with the card. -
As an administrator, open the Overview: the card offers Start free trial. Select it, then start the trial in Admin area > Orbit. The card goes away and the globe loads the neighbors.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.








