share / share/sharedb

Pass user information with the op to remote clients.

Open
#512 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
6.5k
Forks
456
Avg merge
1d 5h
Merged PRs (30d)
5

Description

Use case: Visually track change attribution across remote clients.

[#224] allows to store metadata, which contains userId, but falls short of pushing metadata out to remote clients.

Proposed solution:

On a server side:

Retain backend constructor options in order to pass around options.opsOptions to configure metadata behavior.

Include message.m in agent's _sendOp based on backend.options.opsOptions.metadata configuration.

Include op.m in SubmitRequest based on backend.options.opsOptions.metadata configuration.

On a client side:

Emit op.m with every op related event.

this.emit('op', componentOp.op, source, op.src, op.m);

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the backend constructor options through options.opsOptions, then inspect the agent's _sendOp and SubmitRequest paths described in the issue. On the client side, follow the existing op-related event emission. Done means configured metadata reaches remote clients and op events expose op.m consistently across these paths.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend, distributed-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.