[QTI] Saving a deleted formula can overwrite another formula

Open
#6,472 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
javascript, python
Domain
frontend

Research direction

The issue identifies TipTap transactions and the formula dialog but names no source file or test. Start by searching the repository for the formula dialog and its save behavior, then inspect the existing tests around formula deletion. Done when saving after the target is deleted leaves the surviving formula unchanged, including when both formulas have identical LaTeX.

Written by the indexing model from the issue text.

Description

bug

❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.

Target branch: unstable

Observed behavior

Saving the formula dialog after its target is removed changes the formula left at the old position.

Expected behavior

Saving changes only the formula that opened the dialog.

User-facing consequences

An edit can overwrite a surviving formula without the author selecting it.

Steps to reproduce

  1. Load a prompt with two adjacent editor-made x formulas and open the dialog on the first.
  2. While the dialog is open, apply a TipTap transaction deleting only the first formula.
  3. Save y in the dialog and inspect the remaining formula.

Acceptance Criteria

  • Saving after a transaction deletes the dialog's target leaves the surviving formula unchanged, even if it has identical LaTeX.

Context

Reproduced in Jest/jsdom on unstable at 2713cbf33.

AI usage

Codex drafted the issue from the #6309 review. It ran the deletion and save in a real TipTap editor under Jest and inspected the serialized result.

Dominant language
JavaScript
Stars
214
Forks
327
Avg merge
17h 5m
Merged PRs (30d)
25

Getting set up

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.

More from learningequality/studio

All issues in learningequality/studio

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.