Skip to content

Add CommunityActivity ontology + optional responseOptions on CalendarEvent - #1091

Merged
coodos merged 2 commits into
MetaState-Prototype-Project:mainfrom
EgorPPS:meshenger-community-activity
Jul 24, 2026
Merged

Add CommunityActivity ontology + optional responseOptions on CalendarEvent#1091
coodos merged 2 commits into
MetaState-Prototype-Project:mainfrom
EgorPPS:meshenger-community-activity

Conversation

@EgorPPS

@EgorPPS EgorPPS commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

What

Adds the CommunityActivity ontology and an optional responseOptions field on CalendarEvent, both used by the Meshenger post-platform.

communityActivity.json (new)

A generic, domain-level "a platform posted something to a community that members see and may respond to". Deliberately not a presentation/UI object — activityType follows W3C ActivityStreams (announce|question|offer|invite|acknowledge) and carries the meaning; the renderer decides the look. It doubles as the generic fallback a renderer uses for any envelope it doesn't specifically know but that carries summary + responseOptions. Responses are recorded as separate Relation envelopes (predicate respond) authored by the responder — never written back into the activity.

calendarEvent.json (+ optional responseOptions)

An optional RSVP-style choice array ({id,label,value?,kind:"choice"}). A tap is recorded as a respond Relation (object = the event's uri, value = chosen). Poll/Vote model options natively and intentionally do not use this mixin. CalendarEvent is additionalProperties: false, so the field must be declared here to validate.

Note for maintainers

reminder.json does not appear to exist in services/ontology/schemas/ (only task/taskNote/taskReference). If reminders are meant to flow through AaaS awareness, a reminder.json may need publishing here too — happy to follow up separately.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added RSVP-style response options to calendar events, including labels, values, and choice types.
    • Introduced a schema for community activity records, supporting activity types, summaries, descriptions, authorship, archival status, and related responses.

@EgorPPS
EgorPPS requested a review from coodos as a code owner July 18, 2026 08:55
@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The ontology schemas are updated to support calendar event response options, and a new draft-07 CommunityActivity schema is added with activity metadata, nested optional structures, and permitted activity types.

Changes

Ontology schema updates

Layer / File(s) Summary
Calendar event response options
services/ontology/schemas/calendarEvent.json
Existing event fields are reformatted without constraint changes, and responseOptions is added as an array of RSVP-style option objects requiring id and label.
Community activity schema
services/ontology/schemas/communityActivity.json
Adds the CommunityActivity schema with required activity fields, constrained activity types, optional nested structures, archive metadata, and permissive additional properties.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: coodos

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers the change itself, but it omits required template sections like issue number, type, testing, and checklist. Add the missing template sections: Issue Number, Type of change, How the change has been tested, and the change checklist.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly names the two main changes: CommunityActivity ontology and CalendarEvent responseOptions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (2)
services/ontology/schemas/calendarEvent.json (2)

128-136: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider enforcing additionalProperties: false and using const.

Since the root CalendarEvent schema strictly disallows additional properties, applying the same strictness to the responseOptions items will prevent arbitrary properties from being injected into the response objects. Additionally, in JSON Schema Draft-07, using const is more idiomatic than a single-item enum.

♻️ Proposed refactor
           "kind": {
             "type": "string",
-            "enum": [
-              "choice"
-            ],
+            "const": "choice",
             "default": "choice"
           }
-        }
+        },
+        "additionalProperties": false
       }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@services/ontology/schemas/calendarEvent.json` around lines 128 - 136, Update
the responseOptions item schema around the kind property to set
additionalProperties to false, matching the strictness of the root CalendarEvent
schema, and replace the single-value kind enum with const while preserving its
default value of choice.

109-111: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Add responseOptions to the client CalendarEvent type. platforms/calendar/client/components/calendar/calendar-types.ts still omits the new schema field, so typed consumers can’t access it.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@services/ontology/schemas/calendarEvent.json` around lines 109 - 111, Add the
responseOptions field to the client CalendarEvent type in calendar-types.ts,
matching the schema’s optional array shape and response option item structure so
typed consumers can access it.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@services/ontology/schemas/communityActivity.json`:
- Around line 10-13: Update the activityType enum in the community activity
schema to use canonical ActivityStreams names with standard capitalization:
Announce, Question, Offer, and Invite. Remove acknowledge, and preserve the
existing field and description unless the implementation instead explicitly
renames the field to indicate a project-local mapping.

---

Nitpick comments:
In `@services/ontology/schemas/calendarEvent.json`:
- Around line 128-136: Update the responseOptions item schema around the kind
property to set additionalProperties to false, matching the strictness of the
root CalendarEvent schema, and replace the single-value kind enum with const
while preserving its default value of choice.
- Around line 109-111: Add the responseOptions field to the client CalendarEvent
type in calendar-types.ts, matching the schema’s optional array shape and
response option item structure so typed consumers can access it.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4cccb895-ef9f-449e-9e50-d9cdf16d21e1

📥 Commits

Reviewing files that changed from the base of the PR and between ca47058 and cfa7711.

📒 Files selected for processing (2)
  • services/ontology/schemas/calendarEvent.json
  • services/ontology/schemas/communityActivity.json

Comment on lines +10 to +13
"activityType": {
"type": "string",
"enum": ["announce", "question", "offer", "invite", "acknowledge"],
"description": "W3C ActivityStreams verb — the semantics of the activity"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

sed -n '1,120p' services/ontology/schemas/communityActivity.json

Repository: MetaState-Prototype-Project/prototype

Length of output: 3342


🌐 Web query:

W3C ActivityStreams activity type vocabulary Announce Question Offer Invite Acknowledge

💡 Result:

In the W3C ActivityStreams 2.0 vocabulary, the types Announce, Question, Offer, Invite, and Acknowledge are handled as follows: Announce: This is a defined Activity type [1][2]. It indicates that the actor is calling attention to the object [1]. It inherits all properties from the base Activity type [1][3]. Question: This is a defined Activity type [1][2]. It represents a question being asked [3]. It inherits all properties from the base Activity type [1][4]. Offer: This is a defined Activity type [1][2]. It indicates that the actor is offering the object [1]. If specified, the target indicates the entity to which the object is being offered [1]. It inherits all properties from the base Activity type [1]. Invite: This is a defined Activity type [1][2]. It is a specialization of the Offer activity type [1][3]. It indicates that the actor is extending an invitation for the object to the target [1]. It inherits all properties from the Offer activity type [1]. Acknowledge: This activity type is not part of the W3C ActivityStreams 2.0 vocabulary [1][5][6]. All Activity types in the W3C ActivityStreams 2.0 vocabulary inherit from the base Activity type, which itself is derived from the Object type [1][7]. Specific specializations exist, such as Invite being a form of Offer [1][2].

Citations:


Use canonical ActivityStreams activity names.
activityType claims W3C ActivityStreams semantics, but the enum uses project-local lowercase slugs and includes acknowledge, which is not a W3C ActivityStreams activity type. If this field is meant to interoperate, use the standard terms (Announce, Question, Offer, Invite) and drop acknowledge, or rename the field to make the mapping explicit.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@services/ontology/schemas/communityActivity.json` around lines 10 - 13,
Update the activityType enum in the community activity schema to use canonical
ActivityStreams names with standard capitalization: Announce, Question, Offer,
and Invite. Remove acknowledge, and preserve the existing field and description
unless the implementation instead explicitly renames the field to indicate a
project-local mapping.

@coodos
coodos merged commit 8a4fc83 into MetaState-Prototype-Project:main Jul 24, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants