WIP: feat: uploadable user avatars with moderation (v2)#2308
Draft
wreality wants to merge 4 commits into
Draft
Conversation
7 tasks
Avatar upload (crop dialog, medialibrary UUID storage), moderation reporting + admin review queue, and per-user upload-block permission. Computed GraphQL fields exposed via User @method accessors; mutations in dedicated resolver classes. Admin dashboard refactored to be data-driven via the navigation composable, with users nested under a section folder so detail routes stay out of the nav tree. nginx /storage static-serve added for dev (.lando) and prod (client/.docker) so medialibrary uploads render. WIP: recreated on fresh master; merged latest master (fallow, record-of-review, login-oauth).
2a7d4d2 to
5ab3fe2
Compare
Contributor
Fallow audit reportFound 13 findings. Details
Generated by fallow. |
fallow audit builds a base snapshot of origin/master to attribute new-vs-inherited findings. That snapshot runs without quasar prepare, so .quasar/tsconfig.json is absent and src/* path aliases resolve resolver-less — `src/graphql/generated` reads as a bare `src` package. The new avatar files' imports then surface as introduced unlisted-dependency findings and fail the gate. The audit job's HEAD quasar-prepare step can't reach fallow's internal base snapshot. `src` is our path alias, never an npm package, so add it to ignoreDependencies. (ignoreUnresolvedImports does not suppress the dependency-level finding.)
36dbfcf to
b04de96
Compare
Add vitest specs for the user-avatars feature surface flagged by Codecov on #2308 (client patch coverage was dragging the delta negative): - avatar-reports route: dismiss/remove flows, dialog wiring, badge refetch - AvatarUploader: validation, cropper->upload, remove - ReportableAvatar: shouldShow gating, report flow - Avatar{Crop,Remove,Report} dialogs: useDialogPluginComponent emit paths - useAvatarReportsPendingCount: moderator gating and pending total 33 tests across 7 files.
UserAvatarField and UserAvatarBlockedField were superseded by the @method directives in user.graphql, which resolve User.avatar and User.avatar_upload_blocked through User::getAvatar() / getAvatarUploadBlocked(). The standalone classes were unreferenced dead code; the model's getAvatar() is also strictly better, falling back to the original URL while thumb/medium conversions are still queued.
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.
WIP — recreated on fresh master, supersedes #2265.
Scope
UPLOAD_AVATARpermission (granted to all roles by default);MODERATE_AVATARSapp-admin only.User@methodaccessors; mutations in dedicated resolver classes.useNavigationcomposable; users nested under ausers/section folder so detail routes stay out of the nav tree./storagestatic-serve for dev (.lando) and prod (client/.docker).Status
Merged latest master (fallow, record-of-review, login-oauth). Green: vue-tsc 0, lint 0 errors, client vitest 516, backend avatar+permission 56.