Skip to content

Emit update:interaction only on a content change - #6360

Draft
rtibblesbot wants to merge 2 commits into
learningequality:unstablefrom
rtibblesbot:issue-6136-3e3951
Draft

rtibblesbot wants to merge 2 commits into
learningequality:unstablefrom
rtibblesbot:issue-6136-3e3951

Conversation

@rtibblesbot

@rtibblesbot rtibblesbot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Choice, ordering, text entry and inline choice editors pushed a rebuilt interaction at the item editor on mount, on opening, and on edits that rebuilt identical XML; associate and match dropped an edit made as the card closed. All six editors now share one watcher that emits only in edit mode, only on a change by value, and synchronously, so an edit made as the card closes still lands.

References

Fixes #6136. Follows #6113.

Reviewer guidance

JS tests pass on CI.

  • Opening a text entry card whose stored numeric answer is not canonical xsd:double (1.50) still emits once, carrying 1.5; should opening emit nothing at all?
  • Inline choice, not named in the issue, had the same mount-time emit and gets the same change; keep it in scope?

AI usage

Used Claude Code to implement the shared watcher and update the editor specs. Verified with the QTIEditor Jest suite and pre-commit.


Written by rtibblesbot, an LLM-based coding agent.

@rtibblesbot

⚪ Reviewing PR

Last updated: 2026-10-30 07:25 UTC

rtibblesbot and others added 2 commits October 29, 2026 18:33
Move the update:interaction watcher into useInteractionUpdates with a
sync flush, so QTIItemEditor still reads edit mode when it lands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Choice, ordering, text entry and inline choice editors no longer emit on
mount, on entering edit mode, or on a rebuild equal by value. Text entry
still reports a stored numeric answer it canonicalizes on opening.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

[QTI] Emit update:interaction only when the built interaction content changes

1 participant