wire types: use chrono DateTime<Utc> as the timestamp type throughout
This commit is contained in:
parent
1e205289c5
commit
2c5d9ed336
15 changed files with 108 additions and 190 deletions
|
|
@ -27,7 +27,7 @@ use tokio_stream::{Stream, StreamExt};
|
|||
use crate::container_view::{ContainerView, claude_has_session};
|
||||
use crate::coordinator::Coordinator;
|
||||
use crate::lifecycle::{self, MANAGER_NAME};
|
||||
use hive_sh4re::wire_time::WireTime;
|
||||
use chrono::{DateTime, Utc};
|
||||
|
||||
mod approvals;
|
||||
mod build_logs;
|
||||
|
|
@ -434,7 +434,7 @@ struct ApprovalHistoryView {
|
|||
/// `approved` / `denied` / `failed`.
|
||||
status: &'static str,
|
||||
/// RFC 3339 UTC. Renders as a relative time on the dashboard.
|
||||
resolved_at: WireTime,
|
||||
resolved_at: DateTime<Utc>,
|
||||
/// Operator-supplied deny reason (for `denied`) or build error
|
||||
/// (for `failed`). None on `approved`.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
|
|
@ -475,7 +475,7 @@ struct ApprovalView {
|
|||
/// RFC 3339 UTC time the approval was queued. Rendered as a
|
||||
/// relative time on the card so the operator can spot a stale
|
||||
/// request.
|
||||
requested_at: WireTime,
|
||||
requested_at: DateTime<Utc>,
|
||||
}
|
||||
|
||||
/// Replace silent `.unwrap_or_default()` on the data sources behind
|
||||
|
|
@ -1100,7 +1100,7 @@ async fn dashboard_history(State(state): State<AppState>) -> Response {
|
|||
from,
|
||||
to,
|
||||
body,
|
||||
at: hive_sh4re::wire_time::WireTime(at),
|
||||
at: hive_sh4re::wire_time::from_secs(at),
|
||||
in_reply_to,
|
||||
file_refs,
|
||||
})
|
||||
|
|
@ -1120,7 +1120,7 @@ async fn dashboard_history(State(state): State<AppState>) -> Response {
|
|||
from,
|
||||
to,
|
||||
body,
|
||||
at: hive_sh4re::wire_time::WireTime(at),
|
||||
at: hive_sh4re::wire_time::from_secs(at),
|
||||
in_reply_to,
|
||||
file_refs,
|
||||
})
|
||||
|
|
@ -1375,7 +1375,7 @@ async fn api_operator_inbox(State(state): State<AppState>) -> Response {
|
|||
"id": id,
|
||||
"from": from,
|
||||
"body": body,
|
||||
"at": hive_sh4re::wire_time::WireTime(at),
|
||||
"at": hive_sh4re::wire_time::from_secs(at),
|
||||
"in_reply_to": in_reply_to,
|
||||
"file_refs": file_refs,
|
||||
}))
|
||||
|
|
|
|||
Loading…
Reference in a new issue