cd /news/developer-tools/model-couldnt-check-as-a-different-s… · home › topics › developer-tools › article
[ARTICLE · art-174019] src=dev.to ↗ pub= topic=developer-tools verified=true sentiment=· neutral

Model “Couldn’t Check” as a Different State From Zero Results

A developer at Primetime Home Health Services published a synthetic TypeScript example showing how to model a dashboard's "couldn't check" state as distinct from a genuine zero-result state, using a discriminated union of checked, stale, and unavailable queue states. The example warns that a failed request should not default to a zero count, that a new network attempt should not overwrite the last successful check timestamp, and that partial responses should be treated as unavailable. It also advises keeping status readable without color and testing in-place updates for assistive-technology announcements.

recommendation

Represent queue status as checked, stale, or unavailable instead of defaulting to zero, and preserve the last successful check timestamp so users can tell a failed refresh from a genuine empty result.

more in playbook: Running AI in production
by read1 min views3 publishedNov 22, 2026

From Primetime Home Health Services. Prepared with AI drafting assistance. This is a synthetic TypeScript example for a generic staff queue, not a live PTHHS screen or a decision about care, pay, or eligibility.

A dashboard that says “0 items” is making a claim: the last check succeeded and found none. If the request failed, a zero is the wrong default. The difference matters when an office is deciding whether anyone still needs to review the queue.

type Queue =
  | { kind: "checked"; count: number; at: string }
  | { kind: "stale"; at: string }
  | { kind: "unavailable" };

function message(s: Queue) {
  switch (s.kind) {
    case "checked":
      return `${s.count} items need review. Checked at ${s.at}.`;
    case "stale":
      return `Refresh failed. Last checked at ${s.at}; the earlier count may have changed.`;
    case "unavailable":
      return "Couldn’t check the list. Try refreshing.";
  }
}

Here, at stands for the last completed check for this same view, formatted clearly for the reader. A new network attempt should not overwrite it with a fresh clock time. Treat a partial response as unavailable for this total rather than reporting it as a complete check. Do not carry a result across a change in the source, active view or session.

Keep the status readable without color. For an in-place update, test that assistive technology can announce it without pulling focus from the person’s current task. See W3C’s status-message guidance. Test with invented values, not office records.

Read the exact PTHHS original, Why Healthcare AI Should Learn From Mistakes, for the administrative context. Published from Jeremy Nwokorie’s account on behalf of Primetime Home Health Services.

── more in #developer-tools 4 stories · sorted by recency
── more on @primetime home health services 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/model-couldnt-check-…] indexed:0 read:1min 2026-11-22 · —