Skip to content

feat: add real-time collaboration features (#634)#672

Merged
RUKAYAT-CODER merged 2 commits into
rinafcode:mainfrom
Nuel-ship-it:feat/real-time-collaboration-634
Jun 2, 2026
Merged

feat: add real-time collaboration features (#634)#672
RUKAYAT-CODER merged 2 commits into
rinafcode:mainfrom
Nuel-ship-it:feat/real-time-collaboration-634

Conversation

@Nuel-ship-it
Copy link
Copy Markdown
Contributor

Summary

Implements real-time collaborative editing as specified in issue #634.

Changes

New files in src/collaboration/

File Description
ot-crdt.service.ts Operational Transformation engine — transforms concurrent insert/delete ops to converge; conflict resolution via revision + userId tie-break
presence.service.ts Presence indicators — join/leave tracking, cursor position updates, per-session user list
change-history.service.ts Change history — records every applied operation, queryable by revision range or latest N
collaboration.gateway.ts WebSocket gateway (/collaboration namespace) — handles join-session, collaborative-operation, request-sync, resolve-conflict
collaboration.module.ts NestJS module wiring all providers

Modified

  • src/app.module.ts — imports CollaborationModule

Acceptance Criteria

  • Operational transformation / CRDTOtCrdtService.transform() implements OT for insert/delete/retain ops
  • Conflict resolutionOtCrdtService.resolveConflict() deterministically resolves concurrent ops
  • Presence indicatorsPresenceService tracks active users and cursor positions per session
  • Change historyChangeHistoryService records all operations with revision numbers

Testing

  • 26 unit tests across 3 spec files, all passing
  • Lint: clean (eslint --max-warnings 0)

Closes #634

- Add OtCrdtService: operational transformation (insert/delete/retain),
  conflict resolution with revision-based + userId tie-break
- Add PresenceService: join/leave/cursor tracking per session
- Add ChangeHistoryService: record, query by revision, getLatest, clear
- Add CollaborationGateway: WebSocket /collaboration namespace handling
  join-session, collaborative-operation, request-sync, resolve-conflict
- Add CollaborationModule and wire into AppModule
- Add 26 unit tests across 3 spec files

Closes rinafcode#634
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 27, 2026

@Nuel-ship-it Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@RUKAYAT-CODER
Copy link
Copy Markdown
Contributor

kindly fix conflict and workflow

@Nuel-ship-it
Copy link
Copy Markdown
Contributor Author

kindly fix conflict and workflow

i have fixed the conflict and workflow thanks for the opportunity

@RUKAYAT-CODER
Copy link
Copy Markdown
Contributor

Thank you for contributing to the project.

@RUKAYAT-CODER RUKAYAT-CODER merged commit ae0e77b into rinafcode:main Jun 2, 2026
1 check failed
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.

Add real-time collaboration features

2 participants