Repository navigation
feat: report listings/users and block users (1.6.3) - #97
Merged
Merged
Conversation
Adds user_blocks and content_reports with RLS, a messages trigger that refuses messages between blocked users, admin endpoints to dismiss a report or remove the reported listing, and account-deletion cleanup. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
- Report sheet (reason + details) from book details and chat menus - Block/unblock users; blocked sellers hidden from home, search and offline cache; blocked conversations hidden; blocked sends explained - Profile -> Blocked users screen - Admin Reports tab (dismiss / remove listing) - Tests for data source, filters, viewmodels and report sheet Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Merged
This branch was successfully 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.
Summary
Google Play's user-generated content policy requires that users can report content and block other users. This adds both, plus an admin queue for reviewing reports. Bumps to 1.6.3+9.
Closes #
Changes
20261019000000_reports_and_blocks.sql):content_reports: insert-only for users;reporter_idcomes from the JWT; at most 20 reports per day; a repeat open report for the same target is ignored.user_blocks: RLS limits each user to their own rows.GET /admin/reports,POST /admin/reports/:id/dismiss,POST /admin/reports/:id/remove-listing.Deploy order: (1) run the migration in prod, (2) deploy Rust on Render, (3) release the app.
Design notes:
Test plan
flutter analyze: 3 issues, all pre-existing (unchanged baseline)flutter test --no-pub: 306 passed. New tests cover the moderation data source (request shapes, 23505 and limit handling), the blocked-seller filters in listings and search, the chat conversation filter and blocked send, the moderation and admin viewmodels, the admin data source and the report-sheet widget.rustfmt --edition 2021 --checkon the changed Rust files: clean. Repo-widecargo fmt --checkalready fails on untouched files.cargo clippy --all-targets -- -D warnings: cleancargo test: passed in CI against the CI database, including the new reports, blocks and account-deletion tests. Correction: locally these DB tests skipped (no local Postgres); an earlier version of this text wrongly said they ran locally.Checklist
dev, notmainScreenshots
Not captured. The UI is covered by widget tests.