Skip to content

Extract collaborators#9217

Merged
BykhovDenis merged 5 commits into
developfrom
extract_collaborators
Jun 20, 2025
Merged

Extract collaborators#9217
BykhovDenis merged 5 commits into
developfrom
extract_collaborators

Conversation

@BykhovDenis

Copy link
Copy Markdown
Member

No description provided.

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
@BykhovDenis
BykhovDenis requested review from Copilot and haiodo June 12, 2025 12:38
@huly-github-staging

Copy link
Copy Markdown

Connected to Huly®: UBERF-11469

Copilot AI 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.

Pull Request Overview

This PR standardizes how collaborators are extracted by replacing the old notification.mixin.ClassCollaborators mixins with a dedicated ClassCollaborators document type across all models, updates imports accordingly, and adds migration logic to materialize collaborator records into their own collection.

  • Replace builder.mixin(..., notification.mixin.ClassCollaborators, …) with builder.createDoc<ClassCollaborators<…>>(core.class.ClassCollaborators, core.space.Model, { attachedTo, fields, … }) in all model modules.
  • Update imports in each module to include type ClassCollaborators and related core types.
  • Extend the notification plugin—register new collaborator viewlets and update migration scripts to extract existing collaborator mixins into standalone Collaborator docs; bump version.

Reviewed Changes

Copilot reviewed 53 out of 53 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
models/training/src/index.ts Use createDoc for ClassCollaborators on TrainingRequest
models/tracker/src/index.ts Use createDoc for ClassCollaborators on Issue
models/time/src/index.ts Use createDoc for ClassCollaborators on ToDo
models/setting/src/index.ts Use createDoc for ClassCollaborators on Integration
models/request/src/index.ts Use createDoc for ClassCollaborators on Request
models/recruit/src/index.ts Use createDoc for ClassCollaborators on Vacancy and Applicant
models/notification/src/plugin.ts Update registered viewlets & remove old TClassCollaborators mixin
models/notification/src/migration.ts Add migrateCollaborators and enhance migrateAccounts
models/notification/src/index.ts Refactor TCollaborators props, imports, and plugin exports
models/love/src/index.ts Use createDoc for ClassCollaborators on MeetingMinutes and add account field
models/lead/src/index.ts Use createDoc for ClassCollaborators on Lead
models/document/src/index.ts Use createDoc for ClassCollaborators on Document
models/core/src/index.ts Register TClassCollaborators & TCollaborator in core model
models/core/src/core.ts Define TClassCollaborators and TCollaborator classes
models/controlled-documents/src/index.ts Use createDoc for ClassCollaborators on ControlledDocument
models/contact/src/index.ts Use createDoc for ClassCollaborators on Contact and Channel
models/chunter/src/notifications.ts Use createDoc for ClassCollaborators on DirectMessage and Channel
models/calendar/src/index.ts Use createDoc for ClassCollaborators on Event
models/activity/src/notification.ts Use createDoc for ClassCollaborators on ActivityMessage and DocUpdateMessage
common/scripts/version.txt Bump version from 0.7.136 to 0.7.139
Comments suppressed due to low confidence (1)

models/notification/src/plugin.ts:342

  • The registration for TClassCollaborators was removed from builder.createModel. Without it, the ClassCollaborators document type won’t be recognized at runtime. Please re-add TClassCollaborators alongside TCollaborators.
    TCollaborators,

Comment thread models/notification/src/migration.ts Outdated
Comment thread models/notification/src/migration.ts Outdated
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
Comment thread models/notification/src/index.ts
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
@BykhovDenis
BykhovDenis merged commit 17d804e into develop Jun 20, 2025
11 of 14 checks passed
@BykhovDenis
BykhovDenis deleted the extract_collaborators branch June 20, 2025 08:50
RoadRoller pushed a commit to RoadRoller/platform that referenced this pull request Jun 23, 2025
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
Signed-off-by: roadroller <tarasenko@nprog.ru>
rostislavnagimov pushed a commit to rostislavnagimov/platform that referenced this pull request Jun 30, 2025
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
Signed-off-by: Rostislav Nagimov <rostislav.nagimov@gmail.com>
MichaelUray pushed a commit to MichaelUray/huly-platform that referenced this pull request Jul 9, 2026
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
MichaelUray added a commit to MichaelUray/huly-platform that referenced this pull request Jul 11, 2026
…tor txes

The grant branch deduped only against committed Collaborator records. It now also
scans Collaborator create transactions already queued in this trigger run whose
attachedTo === grantTarget._id, and updates the dedup set in-loop. This fixes a
real duplicate today: in the create path collaboratorsFromMessage appends the
author, so a self-mention yielded two identical Collaborator txes. The in-flight
scan additionally future-proofs the branch against a fixed seed path (see the
regression guard in the added test); the seed-target mismatch itself is
pre-existing (hcengineering#9217) and out of scope here. applyMentionGrants gets the same set
discipline (its residual case is one person mentioned twice within an edit).

Signed-off-by: Michael Uray <michaeluray@users.noreply.github.com>
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.

3 participants