Skip to content
undertext developers
Skip to Content
undertext developers

Presence and check-ins

How Undertext measures when someone was active in the editor while a document was written, and how security-key check-ins verify it.

Provenance says where words came from. Presence says how much of the writing happened with someone active in the editor. A seal carries both: the outer ring is provenance, the inner ring is presence.

Presence signals

While a person has a document open and the page is visible, the editor reports every half minute whether they typed or pointed in it since the last report. These come from events the browser itself sent, not from anything your page can trigger: the editor runs on Undertext's own origin, and your page can't script it. Undertext keeps one record a minute for each person.

Nothing here records what people type outside the editor, their screen, or their camera. Presence is about attention to this document, nothing more.

Sittings and the session

A sitting is a stretch of work on a document with no gap longer than 30 minutes. A document's session is all the minutes in which anyone edited it, or someone writing in it was present. The seal line reports sittings and the session's time, the gaps within a sitting left out: 9 sessions, 11hr2min.

The Presence share

Presence is the share of the session with a person present: editing, and moving in the editor or keeping it open after moving, within five minutes of their own edits, before or after, which covers reading back and thinking. Minutes when only an agent was working, or when nobody was looking, aren't present.

Reading or moving in the editor longer away from their writing counts neither way, nor does a sitting someone only read in: reading alone isn't writing, and it doesn't count against anyone.

Check-ins

Presence signals show that someone was at the editor. Check-ins show it was someone with a particular security key, and they are the one signal neither a script nor a platform can produce.

Each person turns Verified Presence on in the documents that need it, from the editor: it's their own switch, a document at a time, and it's off until they turn it on. Your platform can instead require it of everyone writing in your documents; then it's on, with no switch to turn it off. Turning it on needs a security key. People add keys in presence settings, which run on Undertext's own domain (embed.undertext.sh) so that keys are registered to Undertext, not to any one platform. You frame them in your settings with mountPresenceSettings(), or open them in a window with openPresenceSettings(); see Set up check-ins.

How asks work:

  • Asks come only while they write in a document where Verified Presence is on: one they turned it on in, or any, if your platform requires it. Elsewhere nothing is asked.
  • Asks come about every 5 minutes, unless your platform chose 1, 10 or 30, the same for everyone on it. The first comes with their first edit after half an hour away from writing anywhere on your platform; each next one at a random time between half and one and a half intervals later (2½ to 7½ minutes, every 5), so it can't be told ahead of. A seal's breakdown says how often its check-ins came.
  • Only editing asks. Reading, pointing and clicking ask nothing; accepting or rejecting a suggestion is an edit, so it can.
  • A card beside the seal asks for a tap. It's answered within a minute or recorded as missed. Nothing stops them writing either way. A check-in still waiting shows in whichever document they write in next, even one where Verified Presence is off, since answering it keeps the miss from counting.
  • A check-in is about the person at that moment, wherever it was asked. One tap vouches for their writing in every document they work in then, and a miss counts against what they go on writing anywhere.

Your page can turn Verified Presence on from a control of your own with editor.setVerifiedPresence(), and your server with PUT /v1/documents/{document_id}/checkins/{user_id}; either needs the person to have a key, which GET /v1/users/{user_id}/checkins tells you. To require it, or choose how often check-ins come, set checkins_required and checkin_minutes on your platform, in the console or the API. Where it's required, someone without a key is asked all the same, and the editor offers to add one; until they do, their check-ins go unanswered. Adding keys always happens in Undertext's presence settings.

Key tiers

When someone adds a key, Undertext sorts it into a tier and keeps the tier with each check-in it answers:

TierKeys
AttestedHardware that proves its model is on the FIDO Metadata Service's list: security keys such as a YubiKey, Windows Hello on a TPM.
ClaimedBuilt-in authenticators that send no proof of their model, such as Touch ID through iCloud Keychain or Google Password Manager.
RefusedThird-party password managers and unknown software. These can't be added.

The tier is kept as data. Today it doesn't change the seal; a later method could read it.

A tap shows that someone with the key was there when asked. It doesn't show they wrote every word, and it doesn't identify them beyond the key: your platform still vouches for who the person is.

Verified Presence

Check-ins turn presence into Verified Presence, one sitting at a time. A person's sitting is verified when:

  • every minute they edited in it came soon enough after a check-in they passed (within one and a half intervals and the minute to answer: about nine minutes at every 5), and
  • no check-in they left unanswered was followed by more of their edits.

Then all their presence in that sitting is verified: their writing, and the reading around it that Presence counts. So:

  • a miss costs only the sittings they went on writing in soon after it;
  • someone who passes every check-in has all their presence verified;
  • turning Verified Presence off in a document stops the asks there, so writing there afterwards is verified only if taps they make elsewhere at the time vouch for it;
  • someone who never checks in simply goes unverified. Nothing counts against them.

When every sitting anyone wrote in was verified, the seal shows a shield, Presence reads Verified Presence, and the seal line ends (verified). When some was, it ends with the share, such as (98% verified).

Real browsers

Each editor connection is also asked, invisibly, to prove it's a real browser rather than a script, when it first writes and every five minutes after. Undertext keeps the answers as data with the record. They aren't shown on the seal.

On this page