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:
2026-04-26 15:44:13 +02:00
parent 1b689d1c8c
commit 73fa099b51
6 changed files with 86 additions and 19 deletions
+3 -1
View File
@@ -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(),