Repository navigation
Reports panel: unverified reports say close, not delete (GRYT-1569) - #716
Merged
Merged
Conversation
Server PR #250 made reports:resolve delete a no-op for an unverified report card: the message is the reporter's own copy of an end-to-end-encrypted DM, so the server never had a copy to delete and the resolve action just closes the report. The client still said "permanently delete" and toasted "Message deleted" either way. The delete button, its confirmation dialog and the resulting toast now say "close" for an unverified card and leave the verified path untouched. Co-Authored-By: Claude Sonnet 5 <[email protected]>
CI's check-comment-length caught two comments over the limit. Co-Authored-By: Claude Sonnet 5 <[email protected]>
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.
What
Server PR Gryt-chat/server#250 made
reports:resolvewithdeletea no-op for an unverified report card — the reported message is the reporter's own copy of an end-to-end-encrypted DM, so the server never had a copy of it to delete, and delete just closes the report. The client still said "permanently delete" and toasted "Message deleted" for both cases.This changes the copy on an unverified card only:
The verified path (normal reports,
delete_all_and_ban) is untouched.Least sure about
unverifiedflag through a newreportsRef(mirrors the existingloadingRefpattern), read at the momentreports:resolvedcomes back, since the effect that handles it only subscribes once and the report is gone from state by the time the toast fires. Worth a look in case there's a cleaner way to carry that flag through the round trip.Tests
Added
yarn test:unverified-report-copy(scripts/check-unverified-report-copy.mjs), following the existing source-check pattern (seetest:report-user,test:empty-dm-copy) since this component has no component-level test harness. Wired into.github/workflows/ci.ymlnext totest:report-user.Checked
yarn lint(tsc -b + eslint) — cleanyarn build— cleanyarn test:report-userand the newyarn test:unverified-report-copy— pass🤖 Generated with Claude Code