Skip to content

Reports panel: unverified reports say close, not delete (GRYT-1569) - #716

Merged
sivert-io merged 2 commits into
mainfrom
claude/GRYT-1569-unverified-report-copy
Sep 28, 2026
Merged

sivert-io merged 2 commits into
mainfrom
claude/GRYT-1569-unverified-report-copy

Conversation

@sivert-io

Copy link
Copy Markdown
Member

What

Server PR Gryt-chat/server#250 made reports:resolve with delete a 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:

  • Delete button tooltip: "Close this report" instead of "Delete this message"
  • Confirm dialog title/body/confirm label: explain that this closes the report and the message stays with the people in that DM because it's end-to-end encrypted
  • Success toast: "Report closed" instead of "Message deleted"

The verified path (normal reports, delete_all_and_ban) is untouched.

Least sure about

  • The toast fix reads the report's unverified flag through a new reportsRef (mirrors the existing loadingRef pattern), read at the moment reports:resolved comes 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.
  • I picked "Close Report" / "Close this report" wording per the task brief. The Vikunja ticket also floated hiding the Delete button entirely for unverified cards; I went with rewording rather than hiding, since Delete still does something useful (closes the report).

Tests

Added yarn test:unverified-report-copy (scripts/check-unverified-report-copy.mjs), following the existing source-check pattern (see test:report-user, test:empty-dm-copy) since this component has no component-level test harness. Wired into .github/workflows/ci.yml next to test:report-user.

Checked

  • yarn lint (tsc -b + eslint) — clean
  • yarn build — clean
  • yarn test:report-user and the new yarn test:unverified-report-copy — pass

🤖 Generated with Claude Code

sivert-io and others added 2 commits September 28, 2026 17:01
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]>
@sivert-io
sivert-io merged commit 02c6720 into main Sep 28, 2026
9 of 10 checks passed
@sivert-io
sivert-io deleted the claude/GRYT-1569-unverified-report-copy branch September 28, 2026 15:34
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.

1 participant