Coolbot/moderation updates for versions changes (#4942)

* update reports message to the correct support bubble color

* update checklist to direct to new settings pages and use v3 env info

* fix: project v2 + v3 in moderation checklist funcs

* Split environment stage if project uses mixed environments.

---------

Co-authored-by: Calum H. (IMB11) <contact@cal.engineer>
This commit is contained in:
coolbot
2025-12-22 15:37:44 -08:00
committed by GitHub
parent 6a0bf5858e
commit 543bd5acf7
23 changed files with 216 additions and 140 deletions

View File

@@ -2,13 +2,14 @@ import type { Stage } from '../types/stage'
import modpackPermissionsStage from './modpack-permissions-stage'
import categories from './stages/categories'
import description from './stages/description'
import environment from './stages/environment/environment'
import environmentMultiple from './stages/environment/environment-multiple'
import gallery from './stages/gallery'
import license from './stages/license'
import links from './stages/links'
import postApproval from './stages/post-approval'
import reupload from './stages/reupload'
import ruleFollowing from './stages/rule-following'
import sideTypes from './stages/side-types'
import statusAlerts from './stages/status-alerts'
import summary from './stages/summary'
import titleSlug from './stages/title-slug'
@@ -22,7 +23,8 @@ export default [
links,
license,
categories,
sideTypes,
environment,
environmentMultiple,
gallery,
versions,
reupload,

View File

@@ -0,0 +1,2 @@
**Unique environments:** %PROJECT_V3_ENVIRONMENT_COUNT% \
**Environments:** `%PROJECT_V3_ALL_ENVIRONMENTS%`

View File

@@ -1,2 +1,4 @@
**Environment:** `%PROJECT_V3_ENVIRONMENT_0%`
**Client:** `%PROJECT_CLIENT_SIDE%` \
**Server:** `%PROJECT_SERVER_SIDE%`

View File

@@ -0,0 +1,6 @@
## Environment Metadata
Per section 5.1 of %RULES%, it is important that the metadata of your projects is accurate, including Environment Information.
We've recently overhauled how environment metadata works on Modrinth, you can now edit this in your project's [Version Settings](https://modrinth.com/project/%PROJECT_ID%/settings/versions).
Please [read this blogpost](%NEW_ENVIRONMENTS_LINK%) for full details and information on how to ensure your project is labeled correctly.

View File

@@ -1,6 +1,6 @@
## Insufficient Gallery Images
We ask that projects like yours show off their content using images in the Gallery, or optionally in the Description, in order to effectively and clearly inform users of its content per section 2.1 of %RULES%.
We ask that projects like yours show off their content using images in the %PROJECT_GALLERY_FLINK%, or optionally in the Description, in order to effectively and clearly inform users of its content per section 2.1 of %RULES%.
Keep in mind that you should:
- Set a featured image that best represents your project.

View File

@@ -1,3 +1,3 @@
## Unrelated Gallery Images
Per section 5.5 of %RULES%, any images in your project's Gallery must be relevant to the project and also include a Title.
Per section 5.5 of %RULES%, any images in your project's %PROJECT_GALLERY_FLINK% must be relevant to the project and also include a Title.

View File

@@ -2,4 +2,4 @@ Unfortunately, the Moderation team is unable to assist with your issue.
The reporting system is exclusively for reporting issues to Moderation staff; only violations of [Modrinth's Content Rules](https://modrinth.com/legal/rules) should be reported.
Please visit the [Modrinth Help Center](https://support.modrinth.com/) and click the green bubble to contact support so our support agents can better assist you.
Please visit the [Modrinth Help Center](https://support.modrinth.com/) and click the blue bubble to contact support so our support agents can better assist you.

View File

@@ -1,5 +0,0 @@
## Environment Metadata
Per section 5.1 of %RULES%, it is important that the metadata of your projects is accurate, including %PROJECT_ENVIRONMENT_FLINK%.
We've recently overhauled how environment metadata works on Modrinth, please [Read this blogpost](%NEW_ENVIRONMENTS_LINK%) for full details and information on how to ensure your project is labeled correctly.

View File

@@ -1,5 +0,0 @@
## Environment Metadata
Per section 5.1 of %RULES%, it is important that the metadata of your projects is accurate, including %PROJECT_ENVIRONMENT_FLINK%.
We've recently overhauled how environment metadata works on Modrinth, please [Read this blogpost](%NEW_ENVIRONMENTS_LINK%) for full details and information on how to ensure your project is labeled correctly.

View File

@@ -1,5 +1,6 @@
import type { Labrinth } from '@modrinth/api-client'
import { PackageOpenIcon } from '@modrinth/assets'
import type { ModerationModpackPermissionApprovalType, Project } from '@modrinth/utils'
import type { ModerationModpackPermissionApprovalType } from '@modrinth/utils'
import type { Stage } from '../types/stage'
@@ -10,7 +11,7 @@ export default {
// Replace me please.
guidance_url:
'https://www.notion.so/Content-Moderation-Cheat-Sheets-22d5ee711bf081a4920ef08879fe6bf5?source=copy_link#22d5ee711bf08116bd8bc1186f357062',
shouldShow: (project: Project) => project.project_type === 'modpack',
shouldShow: (project: Labrinth.Projects.v2.Project) => project.project_type === 'modpack',
actions: [
{
id: 'button',

View File

@@ -1,4 +1,4 @@
import type { Project } from '@modrinth/utils'
import type { Labrinth } from '@modrinth/api-client'
import { defineMessage, useVIntl } from '@vintl/vintl'
import type { Nag, NagContext } from '../../types/nags'
@@ -8,7 +8,7 @@ const allResolutionTags = ['8x-', '16x', '32x', '48x', '64x', '128x', '256x', '5
const MAX_TAG_COUNT = 8
function getCategories(
project: Project & { actualProjectType: string },
project: Labrinth.Projects.v2.Project & { actualProjectType: string },
tags: {
categories?: {
project_type: string
@@ -120,7 +120,7 @@ export const tagsNags: Nag[] = [
description: (context: NagContext) => {
const { formatMessage } = useVIntl()
const categoriesForProjectType = getCategories(
context.project as Project & { actualProjectType: string },
context.project as Labrinth.Projects.v2.Project & { actualProjectType: string },
context.tags,
)
const totalAvailableTags = categoriesForProjectType.length
@@ -139,7 +139,7 @@ export const tagsNags: Nag[] = [
status: 'required',
shouldShow: (context: NagContext) => {
const categoriesForProjectType = getCategories(
context.project as Project & { actualProjectType: string },
context.project as Labrinth.Projects.v2.Project & { actualProjectType: string },
context.tags,
)
const totalSelectedTags =

View File

@@ -0,0 +1,29 @@
import { GlobeIcon } from '@modrinth/assets'
import type { ButtonAction } from '../../../types/actions'
import type { Stage } from '../../../types/stage'
const environmentMultiple: Stage = {
title: "Is the project's environment information accurate?",
id: 'environment',
navigate: '/settings/versions',
icon: GlobeIcon,
guidance_url: 'https://modrinth.com/legal/rules#miscellaneous',
text: async () =>
(await import('../../messages/checklist-text/environment/environment-multiple.md?raw')).default,
shouldShow: (project, projectV3) => (projectV3?.environment?.length ?? 0) !== 1,
actions: [
{
id: 'side_types_inaccurate',
type: 'button',
label: 'Inaccurate',
weight: 800,
suggestedStatus: 'flagged',
severity: 'low',
shouldShow: (project) => project.project_type === 'mod' || project.project_type === 'modpack',
message: async () => (await import('../../messages/environment/inaccurate.md?raw')).default,
} as ButtonAction,
],
}
export default environmentMultiple

View File

@@ -0,0 +1,29 @@
import { GlobeIcon } from '@modrinth/assets'
import type { ButtonAction } from '../../../types/actions'
import type { Stage } from '../../../types/stage'
const environment: Stage = {
title: "Is the project's environment information accurate?",
id: 'environment',
navigate: '/settings/environment',
icon: GlobeIcon,
guidance_url: 'https://modrinth.com/legal/rules#miscellaneous',
text: async () =>
(await import('../../messages/checklist-text/environment/environment.md?raw')).default,
shouldShow: (project, projectV3) => (projectV3?.environment?.length ?? 0) === 1,
actions: [
{
id: 'side_types_inaccurate',
type: 'button',
label: 'Inaccurate',
weight: 800,
suggestedStatus: 'flagged',
severity: 'low',
shouldShow: (project) => project.project_type === 'mod' || project.project_type === 'modpack',
message: async () => (await import('../../messages/environment/inaccurate.md?raw')).default,
} as ButtonAction,
],
}
export default environment

View File

@@ -1,38 +0,0 @@
import { GlobeIcon } from '@modrinth/assets'
import type { ButtonAction } from '../../types/actions'
import type { Stage } from '../../types/stage'
const sideTypes: Stage = {
title: "Is the project's environment information accurate?",
id: 'environment',
icon: GlobeIcon,
guidance_url: 'https://modrinth.com/legal/rules#miscellaneous',
navigate: '/settings/environment',
text: async () => (await import('../messages/checklist-text/side_types.md?raw')).default,
actions: [
{
id: 'side_types_inaccurate_modpack',
type: 'button',
label: 'Inaccurate',
weight: 800,
suggestedStatus: 'flagged',
severity: 'low',
shouldShow: (project) => project.project_type === 'modpack',
message: async () =>
(await import('../messages/side-types/inaccurate-modpack.md?raw')).default,
} as ButtonAction,
{
id: 'side_types_inaccurate_mod',
type: 'button',
label: 'Inaccurate',
weight: 800,
suggestedStatus: 'flagged',
severity: 'low',
shouldShow: (project) => project.project_type === 'mod',
message: async () => (await import('../messages/side-types/inaccurate-mod.md?raw')).default,
} as ButtonAction,
],
}
export default sideTypes

View File

@@ -1,9 +1,9 @@
import type { Labrinth } from '@modrinth/api-client'
import { BookOpenIcon } from '@modrinth/assets'
import type { Project } from '@modrinth/utils'
import type { Stage } from '../../types/stage'
function hasCustomSlug(project: Project): boolean {
function hasCustomSlug(project: Labrinth.Projects.v2.Project): boolean {
return (
project.slug !==
project.title