Discussion and object history

Work on a shipment, a batch or an aircraft often needs a word with someone. Every object and every proposal has a thread for that, next to the data it is about, with mentions of people and of other objects. Watching a thread keeps people told of new comments and of actions on the object, through their inbox or email as each person prefers. The object's history lists every change made to it, by an action, an undo or a sync, with who and when

ThreadsOn any object and any proposal
MentionsPeople as @id, objects as @[type:key]
Who sees itOnly people who may read the object
HistoryActions, undos and syncs, newest first

In the platform today

Built
  • Discussion, watching, notification preferences and object history run in the platform service with tests
  • Threads are at /api/v2/types/{type}/objects/{key}/discussion and /api/v2/proposals/{id}/discussion, comments are plain text up to discussion.maxLength characters, and edits and deletes keep the earlier text in ops.comment_edits
  • Watchers get inbox notices of kind comment, mention and watched, and email by their own choice per category at /api/v2/notification-preferences
  • GET /api/v2/types/{type}/objects/{key}/history lists every change to an object, and GET /api/v2/action-log?objectType=&objectKey= finds every action that edited it
  • The Operations side panel and the Simple view's object sheet show the thread and the history when the app is connected to the platform service

Configure

Both blocks are optional; these are the defaults

discussion:
  maxLength: 4000
  # or skip: the comment is saved and that person is not told
  mentionsWithoutAccess: refuse
notificationPreferences:
  defaults: { comments: app, mentions: email, watched: app, proposals: email, alerts: email }

Threads

POST /api/v2/types/batch/objects/B-24-1187/discussion
{
  "body": "@qa.martin can you check the swab result on @[lot:L-24-0912] before we release?"
}

A comment is plain text with no markup. It comes back with parts, the text split into text, person and object pieces, so a screen draws mentions without parsing them. A thread is read oldest first, with whether the caller watches it

  • Who sees a thread. Only people who may read its object: the object type's access label and its row policies on the object as it is now. For a proposal, the same check as reading the proposal, including its action type's label. Anyone else gets 404, worded as for an object that doesn't exist
  • Object mentions. @[type:key] must name an object the author may read, or the comment is refused (MENTION_NOT_FOUND). A reader who may not read a mentioned object sees it as hidden, never by its key or title
  • People mentions. @<user id> names one of the ontology's users. A person who may not read the thread can't be mentioned: by default the comment is refused (MENTION_LACKS_ACCESS, the people in params.users); with mentionsWithoutAccess: skip it is saved, that person is neither told nor subscribed, and the answer lists them in skipped. …/discussion/people?q= lists the people who may be mentioned
  • Edits and deletes. Only the author edits a comment (POST /api/v2/comments/{id}:edit), and only the author or an administrator deletes one (:delete). Nothing is erased: an edit keeps the earlier text in ops.comment_edits and marks the comment edited, and a deleted comment shows without its text, with who deleted it and when. New mentions added by an edit are told; watchers are not told again
  • Audit. Every change is in the audit log as comment.created, comment.edited, comment.deleted, discussion.watched or discussion.unwatched

Watching

Writing a comment subscribes you to its thread. Being mentioned subscribes you too, unless you unwatched it yourself. POST …/discussion:watch with {"watching": false} stops it, and GET /api/v2/watches lists what you watch. Watchers are told

  • of new comments, as kind comment, or mention for the person mentioned
  • of actions applied to a watched object, any object the action edited and not only its main one, and of undos, as kind watched with the action log id, unless the action's own notify: entries already reached them

Each notice is a row of ops.notifications for one person, written only when they may read the object, and the action type's label, at that moment. The inbox and the email dispatcher check access again when it is read and sent. The author or actor is never told about their own doing

Notification preferences

Each person chooses, per category, app (in the app only), email (in the app and by email) or none

CategoryCoversDefault
commentsNew comments on things you watchapp
mentionsSomeone mentions you in a commentemail
watchedActions applied to things you watchapp
proposalsProposals waiting for you, and expired onesemail
alertsAlertsemail
POST /api/v2/notification-preferences
{ "category": "comments", "channel": "email" }
  • Comment, mention and watched notices chosen as email go to the person's own attributes.email through notifications.smtp, as a delivery to the destination person:<user id>, with the same retries, dead letters, access check and mutes as other email
  • Proposals and alerts reach email only through the routes an administrator set up. app and none mute those routes for the person, except a required route, and none also leaves them out of the inbox
  • A change applies to what has not gone yet: the dispatcher checks the preference again when it sends, and the inbox when it is read
  • Choices are kept in ops.notification_preferences and audited as notification.preferences. An administrator can read or set anyone's with user

Object history

GET /api/v2/types/aircraft/objects/407/history?pageSize=100&before=2026-10-24T00:00:00Z

History lists every change to one object, newest first

KindFromCarries
actionAction log entries that edited the object, as their main object or any otherWho (person, agent or automation), when, the action, its reason, its proposal and approver, the main object when it is another one, and before and after per property
undoEntries that revert anotherThe same, with reverts; the reverted entry has revertedBy
syncCommits to the object table from a sync, read from its change feedCreated, modified or deleted, the sync run, who ran the build behind it when known, else service:sync, and before and after per property
changeAny other commit, such as a table rewrite when sealed properties changeShown only when a property the caller may see changed, with actor service:objects
  • The caller must hold the type's access label, and the object, as it is now or as it was last seen when it has been deleted, must be inside their row policies, else 404
  • Hidden properties, and sealed ones whose label the caller doesn't hold, are left out of every entry; sealed values are opened for holders. An entry for an action type whose label they don't hold is left out
  • History goes back as far as the object table's kept versions. pageSize is at most 500, and before pages back
  • Comments are not entries; they are in the thread

To go the other way, from an object to the actions behind it, GET /api/v2/action-log?objectType=aircraft&objectKey=407 finds every entry whose main object it is or that edited it, as described on the action log

API

EndpointDoes
GET, POST /api/v2/types/{type}/objects/{key}/discussionRead the thread, or add a comment with {"body"}
POST …/discussion:watchWatch or stop watching, with {"watching"}
GET …/discussion/people?q=People who may be mentioned
/api/v2/proposals/{id}/discussionThe same four for a proposal
POST /api/v2/comments/{id}:edit, :deleteEdit your comment, or delete it
GET /api/v2/watchesWhat the caller watches
GET, POST /api/v2/notification-preferencesRead or set preferences
GET /api/v2/types/{type}/objects/{key}/historyEvery change to an object
GET /api/v2/action-log?objectType=&objectKey=Actions by any object they edited

Limitations

  • Replies within a thread, reactions, rich text, read receipts and attachments in comments are delivered on request
  • Mentioning a group is delivered on request; mention the people instead
  • Comments on a link or on a whole object type are delivered on request
  • Personal email for proposals and alerts is delivered on request; today they reach email through routes
  • History reaches back only as far as the object table's kept versions, so a retention cut shortens it

Related