feat: server-authoritative case window via users.toml
The /api/oneliners time window is now read per-user from users.toml (window_hours, default 72h). Clients no longer carry a window: client.toml oneliner_window_hours, SyncConfig.window_hours, the ?hours=N query param, and the render_case_list cutoff filter are gone. ETag suffix keeps the effective hours so an admin edit to users.toml invalidates client caches on the next request. OnelinersResponse.window_hours stays in the wire format, but now exists solely to anchor client reconciliation.
This commit is contained in:
@@ -48,7 +48,13 @@ pub enum OnelinerState {
|
||||
pub struct OnelinersResponse {
|
||||
/// RFC3339 UTC timestamp at which the server built this response.
|
||||
pub as_of: String,
|
||||
/// Effective window (after server-side clamp).
|
||||
/// Server-authoritative window the response covers, in hours.
|
||||
/// Derived from the user's `window_hours` entry in `users.toml`.
|
||||
/// **Clients must not use this value to apply a display filter** —
|
||||
/// the oneliners list is already exactly what the server wants shown.
|
||||
/// The field exists solely so reconciliation logic can anchor its
|
||||
/// "outside the window" rule (see
|
||||
/// `doctate-client-core::CaseStore::reconcile_with_server_snapshot`).
|
||||
pub window_hours: u32,
|
||||
/// Oneliners of cases whose earliest recording sits inside the window,
|
||||
/// sorted newest-first by `created_at`.
|
||||
|
||||
Reference in New Issue
Block a user