mirror of
https://github.com/modrinth/code.git
synced 2026-08-26 17:44:50 +00:00
feat: global trace database frontend + improvements to tech review status sync (#6671)
* wip * ui edits * better logic for syncing tech review state in a single centralized place * never automatically finish a tech review report * fix css * fix clippy * prepr
This commit is contained in:
@@ -114,6 +114,14 @@ impl From<crate::models::v3::threads::MessageBody> for LegacyMessageBody {
|
||||
associated_images: Vec::new(),
|
||||
}
|
||||
}
|
||||
crate::models::v3::threads::MessageBody::TechReviewExited => {
|
||||
LegacyMessageBody::Text {
|
||||
body: "(legacy) Exited technical review".into(),
|
||||
private: true,
|
||||
replying_to: None,
|
||||
associated_images: Vec::new(),
|
||||
}
|
||||
}
|
||||
crate::models::v3::threads::MessageBody::TechReviewExitFileDeleted => {
|
||||
LegacyMessageBody::Text {
|
||||
body: "(legacy) Exited technical review because file was deleted".into(),
|
||||
|
||||
@@ -28,8 +28,11 @@ pub struct ThreadMessage {
|
||||
pub hide_identity: bool,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, utoipa::ToSchema)]
|
||||
#[derive(
|
||||
Debug, Clone, Serialize, Deserialize, utoipa::ToSchema, strum::AsRefStr,
|
||||
)]
|
||||
#[serde(tag = "type", rename_all = "snake_case")]
|
||||
#[strum(serialize_all = "snake_case")]
|
||||
pub enum MessageBody {
|
||||
Text {
|
||||
body: String,
|
||||
@@ -47,6 +50,7 @@ pub enum MessageBody {
|
||||
verdict: DelphiVerdict,
|
||||
},
|
||||
TechReviewEntered,
|
||||
TechReviewExited,
|
||||
TechReviewExitFileDeleted,
|
||||
ThreadClosure,
|
||||
ThreadReopen,
|
||||
@@ -62,6 +66,7 @@ impl MessageBody {
|
||||
Self::Text { private, .. } | Self::Deleted { private } => *private,
|
||||
Self::TechReview { .. }
|
||||
| Self::TechReviewEntered
|
||||
| Self::TechReviewExited
|
||||
| Self::TechReviewExitFileDeleted => true,
|
||||
Self::StatusChange { .. }
|
||||
| Self::ThreadClosure
|
||||
|
||||
Reference in New Issue
Block a user