Add OnelinerState::Manual variant
This commit introduces a new `Manual` variant to the `OnelinerState` enum, allowing for manual overrides of the oneliner text. This change affects the client and server components to handle and display this new state. A `OnelinerOverrideRequest` struct is also added for API requests to set manual oneliners. New tests are included to ensure the `Manual` variant serializes and deserializes correctly. The `compute_oneliner_display` function in `server/src/routes/user_web.rs` is updated to treat `Manual` states the same as `Ready` states for display purposes. The `cases_needing_oneliner_in` function in `server/src/transcribe/recovery.rs` is updated to not retry cases that are in a `Manual` state.
This commit is contained in:
@@ -521,7 +521,9 @@ impl DoctateApp {
|
||||
|
||||
let time_str = extract_hhmm(&marker.last_activity_at);
|
||||
let oneliner = match &marker.oneliner {
|
||||
Some(OnelinerState::Ready { text, .. }) => text.clone(),
|
||||
Some(OnelinerState::Ready { text, .. } | OnelinerState::Manual { text, .. }) => {
|
||||
text.clone()
|
||||
}
|
||||
Some(OnelinerState::Empty { .. }) => "∅".to_owned(),
|
||||
Some(OnelinerState::Error { .. }) => "⚠".to_owned(),
|
||||
None => "⏳".to_owned(),
|
||||
|
||||
Reference in New Issue
Block a user