feat(safety): report, block and hide chat lines in the app #64
Reference in New Issue
Block a user
No description provided.
Delete Branch "feat/user-safety"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What & why
Step 4 of
docs/website/USER_SAFETY.md(§4.3): the app half of report, block and hide. Core shipped its half in website#233 and the Rust module its half in Module-Rust#72. This makes the Play content-rating answer ("users or user-generated content can be reported") true in the app, where the Rust chat feed is the user-generated content.A Rust chat line's long-press menu (
ui/rust/ChatSafetySheet.kt,ChatSafetyViewModel.kt, rules inChatSafety.kt):canBlock. Block asks for confirmation and says the player isn't told.The feed is re-read, never edited. The server filters it per reader (S11), so after a hide, a block or a staff hide the app asks again (
RustServerViewModel.reloadFeed). A report changes nothing and does not re-read. Staff see a hidden line dimmed and marked Hidden by staff (S10).Account → Blocked (
ui/auth/BlockedScreen.kt, from My account), mirroring the web panel:Data: core's routes on a new
SafetyApi+SafetyRepository; the module's two staff routes onRustApi.RustEventDtogainscanBlockandhidden. The block DTO isUserBlockDto, becauseBlockDtois the CMS page block.Strings: the chat menu's strings are in
strings_rust.xml(only Rust screens use them), and Blocked's are in core'sstrings.xml.StringVocabularyTestallows no fourth strings file.Choices made without asking (please check)
How it was tested
./gradlew testDebugUnitTest lintDebug assembleDebug(JDK 21,-Pksp.incremental=falselocally): 827 tests, 0 failing. 29 are new:ChatSafetyTest,ChatSafetyViewModelTest,SafetyRepositoryTest,BlockedViewModelTest. No lint findings in the new code.Medium_Phone_API_36.1. It ran against a core at the website#233 merge, on its own port, with Module-Rust#72 installed and a throwaway database (chat lines and Steam links written straight into the tables):content_reportswith its reason, detail and snapshot. A second report was refused as already reported.rust.chat.hideto the activity log. Show to everyone again undid it.Docs: RunicGateway/docs
docs/user-safety-android.Checklist
AI-assisted contributions (required)
Claude Code (Claude Opus 5.5). I have reviewed and understandevery change, and take responsibility for it. AI-authored commits are
marked with a
Co-Authored-By/Assisted-Bytrailer.License
(GNU GPL v3.0 or later), and I have the right to contribute it.
🤖 Generated with Claude Code
https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY