dreamteamprod / dreamteamprod/DigiScript

Collaborative script editing

Open
#889 0 comments 0 reactions 0 assignees View on GitHub

@Tim020 is already working on this.

Since Feb 11, 2026.

  • #905 by @Tim020 — open
client server
Dominant language
Vue
Stars
19
Forks
4
Avg merge
2d 12h
Merged PRs (30d)
37

Description

Right now, only one user at a time can edit the script and all edit state is stored locally in the users browser. This is not ideal for a couple of reasons:

  1. Not a collaborative environment
  2. A crash/reload/refresh of the editing user's browser would cause all edits to be lost

Therefore, it would be a good enhancement to make the script editing colaborative with a more robust state management system. We can utilise the existing websocket infrastructure for communicating between clients via the server to show up to date edit information to each editing user. Further, we can look at storing the draft version of the script (before save) on the backend somewhere - either in the DB or perhaps as a simple JSON file on disk, which can then be used as a protection against the state loss problem.

Problems we need to solve are:

  1. How should the view look for multiple people - if one person has a line open for editing should this be reflected across all clients, or should the other clients only get the line updated when the user clicks done on that line?
  2. How do we perform conflict resolution if two users try and edit the same line at the same time?
  3. Who is responsible for performing the eventual save of the script from draft state, and when should this happen?
  4. What happens if a user becomes disconnected before they are able to sync their changes to the server, and how do we handle conflict resolution when they reconnect? At the moment, since state is stored locally, if they disconnect it would get cleared out anyway so perhaps not a problem, but something to consider.
  5. How does this interact with the revision system? What would happen if we created a new revision, or loaded a different revision, whilst the script was being edited? (Easy solution - block this action)
  6. What do we do if we don't save a draft script, say all users exit edit mode without saving, what happens next?

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

Review the existing websocket infrastructure, backend draft-storage options, and revision/edit-mode flow, then compare them with linked pull request #905. The work is ready when the collaboration model, conflict handling, disconnect behavior, draft-save ownership, and revision interactions are defined and implemented consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, sql, sqlalchemy
Domain
backend, databases, distributed-systems, frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.