learningequality / learningequality/studio

Moving resource(s) and immediately editing its title shows move change reverted

Open
#3,155 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

DEV: frontend P1 - important
Dominant language
Python
Stars
191
Forks
307
Avg merge
5d 6h
Merged PRs (30d)
10

Description

Observed behavior

  1. If you edit a content node's title immediately after reordering it and before the asynchronous move operation completes, the move gets reverted in the UI. Upon refresh, it shows correctly
  2. If you move more than one resource to a new topic and edit just the one of the resources, the move changes for both gets reverted. Refreshing does not resolve the issue, only clearing your local IndexedDB

Expected behavior

Editing the node's details should have no effect on its position in the tree.

User-facing consequences

Rapid curation of content can end up reverting changes to the channel tree in the UI if the node edits are made prior to the move operation completing. In this scenario, the user may be presented with the confirmation dialog regarding unsynced changes which won't go away until refreshing.

Errors and logs

None

Steps to reproduce (1)

  1. Spin up your dev environment but do not start the celery workers
  2. Open an editable channel
  3. Drag and move a node to reorder it in the topic view
  4. Edit the node's title you just moved
  5. Observe the node moves back to its original location after saving
  6. Start the celery workers
  7. Wait for the queued tasks to complete
  8. Observe no effect in the UI
  9. Refresh the page
  10. You may observe the confirmation interrupt dialog at this point. Seems to rely on a more specific scenario to reproduce
  11. Observe after refresh the node is back to where it was moved

Steps to reproduce (2)

  1. Spin up your dev environment but do not start the celery workers
  2. Open an editable channel
  3. Drag and move two nodes to a topic that is a sibling of the resources
  4. Edit one of the nodes' titles you just moved
  5. Observe the nodes move back to they're original location after saving
  6. Start the celery workers
  7. Wait for the queued tasks to complete
  8. Observe no effect in the UI
  9. Refresh the page
  10. You may observe the confirmation interrupt dialog at this point. Seems to rely on a more specific scenario to reproduce
  11. Observe after refresh the nodes are still in the incorrect location
  12. Clear your IndexedDB
  13. Observe nodes are now in the correct location
  14. (optional) Refresh again, and you may observe the confirmation interrupt dialog, but nothing has changed

Usage Details

  • OS: Ubuntu 20.04
  • Browser: Chrome

Contributor guide

Open the contributing guide

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 in the editable channel's topic view and reproduce the drag-and-drop move followed immediately by a title edit, with Celery workers stopped. Trace how the asynchronous move and node edit update the UI and local IndexedDB state. Done means editing a moved node no longer reverts its tree position, including when multiple resources are moved.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, frontend
Issue type
Bug
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.