fix: delete steps and elements on message edit#2915
Open
Allaoua9 wants to merge 6 commits intoChainlit:mainfrom
Open
fix: delete steps and elements on message edit#2915Allaoua9 wants to merge 6 commits intoChainlit:mainfrom
Allaoua9 wants to merge 6 commits intoChainlit:mainfrom
Conversation
Contributor
Author
|
PR 2856 should be closed in favor of this. |
Contributor
There was a problem hiding this comment.
2 issues found across 3 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="backend/tests/test_message.py">
<violation number="1" location="backend/tests/test_message.py:897">
P2: This assertion is too loose and can miss extra delete_* calls, so the test may not catch over-deletion regressions.</violation>
<violation number="2" location="backend/tests/test_message.py:897">
P2: Deletion tests check async data-layer calls with call assertions instead of await assertions, so they would miss a missing-`await` regression.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When a user edits a message, child steps and elements from previous executions were never deleted from the data layer. This caused all historical steps to accumulate and reappear in the UI after each edit.
This is based on this PR .
cc @hayescode this PR addresses your concern on orphaned Elements and Feedbacks.