package com.doctate.watch.domain

/**
 * Per-case record held client-side. Mirrors the essentials of
 * `doctate-desktop::CaseEntry` (Rust).
 *
 * `oneliner == null` means no state has been observed yet (fresh case);
 * the UI renders a placeholder ("…"). `OnelinerState.Manual` marks a
 * doctor-authored override; auto-updates from the server merge must not
 * overwrite it (the merge logic checks `oneliner.isManual()`).
 *
 * `syncedToServer` flips to true once the server has acknowledged at
 * least one upload for this case. Used by `reconcileWithServerSnapshot`
 * to safely drop markers that no longer appear in the server window —
 * pending markers are never reconciled away.
 */
data class CaseEntry(
    val caseId: String,
    val createdAt: Long,
    val lastActivityAt: Long,
    val oneliner: OnelinerState?,
    val syncedToServer: Boolean = false,
)
