Files
temetro/.agents/skills/coss/references/primitives/progress.md
T
Khalid Abdi 929bec8f31 feat: AI-added records save with placeholders + "Added by AI" provenance
Stop blocking AI imports/proposals on missing non-critical fields. Records
the chat agent drafts now save with safe placeholders, auto-generated file
numbers, and a source="ai" marker that surfaces an "Added by AI" badge so a
clinician can review/edit them later.

Backend:
- add `source` (manual|ai) column to patients/appointments/prescriptions
  (migration 0014) + canonical types, services, validation schemas
- relax patient/appointment validation: empty file number allowed, demographic
  + type/provider/initials fall back to placeholders (initials derived from name)
- patients.generateFileNumber() auto-assigns an MRN when one is missing
- proposeAppointment accepts a name when no file number resolves; AI commits +
  /api/ai/import stamp source="ai"

Frontend:
- `source` on Appointment/Patient/Prescription types; AI commits send source="ai"
- reusable <AiBadge> shown on the Patients table/detail and prescriptions list

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 19:27:17 +03:00

1.5 KiB

coss Progress

When to use

  • Task completion and async operation progress bars.
  • Indeterminate or determinate status during loading pipelines.

When NOT to use

  • If displaying a bounded measurement (not task completion) -> use Meter instead.
  • If the loading state is indeterminate with no percentage -> consider Spinner.

Install

npx shadcn@latest add @coss/progress

Manual deps from docs:

npm install @base-ui/react

Canonical imports

import {
  Progress,
  ProgressLabel,
  ProgressValue,
} from "@/components/ui/progress"

Minimal pattern

<Progress value={40} />

Patterns from coss particles

Key patterns

Progress with label and value display:

<Progress value={60}>
  <div className="flex justify-between text-sm">
    <ProgressLabel>Uploading...</ProgressLabel>
    <ProgressValue />
  </div>
</Progress>

Determinate progress: bind a numeric value (0-100) for known completion states. Indeterminate loading: omit value or pass null when progress cannot be measured.

More examples

  • with label and value: p-progress-2
  • with formatted value: p-progress-3

Common pitfalls

  • Using progress without text/context for what operation is progressing.
  • Using determinate values when state is actually unknown/indeterminate.
  • Using progress for static score displays that should use Meter.

Useful particle references

See p-progress-1 through p-progress-3 for animated, labeled, and formatted value patterns.