Repository navigation
Conversation
Contributor
|
Hi @Kulraj69! Great catch on cleaning up the thread view when a parent message gets deleted. A couple of observations when testing locally:
|
This branch has not been deployed
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.
Close the thread view when its parent message is deleted
Acceptance Criteria fulfillment
Fixes #1080
Changes
removeMessageresets the active parent thread atomically. A ChatBody-mounted hook subscribes to the store and shows the existing info toast only for that deletion transition. It unsubscribes on cleanup and stays quiet for manual closure, repeated events, replies and unrelated deletions. The same store path handles both local deletion and the room's message-deleted listener.The React package now has a
testscript. Root rendering tests mockparseGeneratedUiConfigurationswith an empty configuration/error result. The earlier test-only Babel override, jsdom configuration, store regressions and patch changeset remain in this PR.Video/Screenshots
Checked the actual ToastBar/provider, deletion hook and message store in an isolated browser fixture at 900px and 390px widths. The thread disappears and the toast explains why. This is a component fixture, not a live Rocket.Chat session or deployment test.
PR Test Details
Latest revision, November 24:
cd packages/react && npm test -- --runInBand --no-cache: 16 passed across 3 suites.Validation used React 19.0.0, Zustand 4.3.8 and cached Jest 27.3.1 with a bounded dependency installation and local workspace source links. It was not a full lockfile installation. The full workspace build, ESLint, Storybook, live Rocket.Chat end-to-end behavior and remote CI have not been verified for this revision. Earlier build/lint claims are not carried forward as current validation.
AI assistance was used to develop and test these changes. Independent review has not been completed.