/Docs

Multi-User Collaboration

When two people open the same flag in two browsers, A vs B keeps both tabs in sync without losing anyone's work. The page subscribes to a live channel for the flag, and every published change shows up in every open tab within a few seconds.

How it works

While a flag detail page is open, your browser holds a server-sent events connection to the server. As soon as anyone — yourself in another tab, or a teammate — publishes a change to that flag, the server fans the event out to every open subscriber. Your tab fetches the new published snapshot and reconciles it against your draft.

If your network blocks SSE (older proxies, restrictive corporate networks), the page falls back to a 30-second poll automatically. The user-visible behavior is the same — banners just appear up to 30 seconds later instead of within a few seconds.

Clean updates

When the remote change does not touch any rule you have edited, your tab silently rebases. Your in-flight changes stay exactly as you left them, and any rules you had not touched pick up the remote edit automatically. A short cyan banner confirms what happened:

“This flag was updated by Alice 1 minute ago. Your changes are preserved.”

The banner auto-dismisses after eight seconds. You can also click Dismiss to clear it immediately.

Conflicts

When the remote change touches the samerule you are editing — or removes a rule you have edited, or changes the env config in a way that conflicts with your env-config edit — the page surfaces an amber conflict banner instead and disables Save draft and Save & publish until you resolve it:

“This flag was updated by Bob 30 seconds ago and 2 of your changes conflict.”

Click Resolve conflicts on the banner to open a three-column picker. Each affected rule is shown side by side:

  • Mine — the version you have in your local draft. Pick this to keep your edit; the rule will be marked dirty and included in the next publish.
  • Theirs — the rule as it now exists in the published snapshot. Pick this to drop your local edit and adopt what is currently live.
  • Result — a preview of what the rule will look like after you apply your selection. Updates live as you toggle.

Whole-flag fields (the environment's enabled state, default variation, scheduling) appear in a single “Environment settings” row above the per-rule rows so the same picker handles them. If your draft has rules that the remote has deleted — or the remote added rules you have never seen — the picker still shows them, with one column empty so you can decide whether to drop them or pull them in.

Two shortcut buttons in the header let you take everything from one side at once: Keep all mine and Take all theirs. Clicking Apply resolution commits the selection to your local draft, clears the conflict banner, and re-enables the bottom bar so you can publish.

Revert is still available
The Revert button in the bottom bar stays enabled during a conflict. If you want to throw away your changes without taking the new remote state, Revert resets your draft to the old base. Either way you have a clean slate.

What counts as a conflict

  • You and the remote both edited the same rule: any change to name, key, traffic allocation, variation distribution, audiences, metrics, exclusion groups, stats engine, conclude state, or per-rule overrides.
  • The remote deleted a rule you were editing.
  • You and the remote both changed the environment config in observable ways (enabled flag, default variation, scheduling).

Adding a brand-new rule locally is never a conflict — your new rule keeps its temporary id and rides through Save & publish like any other diff. Edits to differentrules are never a conflict — each side's changes apply independently.

Who is editing right now

The conflict banner names the publisher whenever they are a member of your organization. If the publisher is no longer a member or the lookup fails, the banner falls back to “someone”.

Live presence

While anyone in your organization has a flag's detail page open and a rule open in the right-side panel, their avatar appears next to that rule's name in the rule list. Hover the avatar to see their name and how recently they were active:

“Alice Anderson is editing this rule (active 8s ago)”

The page sends a heartbeat every ten seconds while it is open and the avatar disappears within roughly thirty seconds of someone closing their tab. You will not see your own avatar — only teammates'.

When several teammates are looking at the same rule, their avatars stack with a small overlap. If more than three are on the same rule, an extra +N chip appears after the first three.

Per-rule lock

When you open a rule in the right-side panel, A vs B acquires an editing lock for that rule. The lock's holder is the only person who can edit the form; everyone else opening the same rule sees a read-only view with a banner naming the holder and offering a Request editbutton. The lock holder's avatar in the rule list gains a green ring with a small lock badge so the ownership is visible at a glance.

How the lock moves around

  • Acquire — opening the rule panel acquires the lock if no one else holds it. Closing the panel releases it.
  • Refresh— your tab pings the server every thirty seconds while the panel is open. Every refresh extends the lock's expiry to five minutes from now.
  • Expire — if your tab stops refreshing (closed unexpectedly, lost network, browser crash), the lock expires five minutes after the last refresh. Other tabs see the rule become available shortly after that.
  • Take over — one minute past expiry the lock can be force-claimed by anyone with edit permission. Their banner shows a Take over button; clicking it transfers ownership.

Requesting edit access

While someone else holds the lock, the read-only banner offers Request edit. Clicking it does two things: a toast appears on the holder's tab telling them you want the rule, and their banner gains a persistent “{Name}is waiting to edit this rule” line that stays visible until they release. Your tab flips into a waiting state with a Cancel affordance — click it any time to remove yourself from the queue. When the holder closes the panel or saves their changes, your tab automatically picks up the lock and becomes editable.

If your lock disappears mid-edit

On the rare occasion that you held a lock but lost it (your network was down long enough for the lock to expire and someone took over), a red banner appears: “Lock lost. Another teammate is now editing this rule. Reload to see their changes.” The form is disabled until you reload to avoid silently overwriting their edit.

Lock vs. conflict resolution
The per-rule lock prevents most conflicts before they happen. The existing conflict resolution picker remains the safety net for the rare case where two people manage to publish overlapping changes — for example, when one tab's lock had expired and a take-over landed in flight.