Skip to content

Implement mod statuses - #89

Open
qimiko wants to merge 4 commits into
mainfrom
mod-statuses
Open

Implement mod statuses#89
qimiko wants to merge 4 commits into
mainfrom
mod-statuses

Conversation

@qimiko

@qimiko qimiko commented Jul 31, 2026

Copy link
Copy Markdown
Member

the mod status can have more effects than a tag, which is why this isn't just rolled into the tags system. a mod's status can be updated by index admins and the mod's developers, but only index admins can add a note to the status and lock it from changes by the mod developers. notes are public, but clients will likely only display them for archived mods

@qimiko
qimiko marked this pull request as ready for review August 7, 2026 20:10

alter table mods
add column status mod_status not null default 'default',
add column status_info text,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit redundant to have status stuff here too, since we already store the info in mod_status_logs. The way I'd handle it is have one single FK to mod_status_logs which denotes the "active" status, and the others are for historic purposes.

Comment thread src/endpoints/mods.rs
&mut tx,
).await?;

Mod::create_mod_status_log(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ideally this should be moved in database::repository::mods instead of keeping it as a Mod impl

let direct_search = search_str.as_ref().is_some_and(|x| !x.is_empty()) || developer.is_some();
if !direct_search {
// hide archived mods from direct search
builder.push(" AND m.status <> 'archived'");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be a bit weird for UX: a user sees the mod normally when looking through the pages, but when searching that mod suddenly dissapears. We'd have to display this well in the UI, otherwise it could come across as a bug.

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.

2 participants