# OpportunityCard

## 2026-07-07 — Rename unsynced CRM row label to "First Sync" (BUILD-2228)

**Prompted by:** Hellen Tran (PO)

### What changed
- `crmTargetActionLabel()` now returns `"First Sync"` instead of `"Activate Plan"` for a `CrmSyncTarget` row that hasn't been synced yet (`status === "idle"`).

### Why
- "Activate Plan" read like it turned something on rather than pushing data to the CRM; "First Sync" pairs more clearly with the "Sync Again" label shown once that target has synced.

### Affected tokens / files
- `packages/shadcn/src/components/ui/opportunity-card.tsx`

## 2026-07-01 — Add Quick Select CRM sync button (BUILD-2228)

**Prompted by:** Hellen Tran (PO)

### What changed
- Added a `CrmSyncButton` icon trigger (RefreshCw icon) next to the existing AI-assist button and the 3-dot actions menu, on both card layouts (compact task-view and expanded deal-view).
- Clicking it opens a dropdown listing every connected Broker CRM (`crmSyncTargets` prop) with a per-row status icon and a label that switches from "Activate Plan" to "Sync Again" once that target is synced, or "Retry" on error.
- The trigger shows an aggregate status dot: none (nothing synced), gray (some targets synced, some not), green (all synced), red (any target errored).
- Added a "Sync to CRM" tooltip on the trigger.
- New optional props: `crmSyncTargets?: CrmSyncTarget[]`, `onSyncCrmTarget?: (targetId: string) => void`. The button is hidden entirely when `crmSyncTargets` is omitted or empty.

### Why
- BUILD-2228: brokers need a quick, discoverable way to push a loan opportunity's plan into a connected Broker CRM (Quicklii, Connective, Broker Engine today) directly from the Kanban card, and re-sync after the first push — without redesigning the trigger as more CRMs connect.

### Affected tokens / files
- `packages/shadcn/src/components/ui/opportunity-card.tsx`
- `packages/shadcn/src/components/index.tsx` (barrel — added `CrmSyncTarget`, `CrmSyncStatus` type exports)
