Skip to content

feat: surface Tribe 'needs care' via server cadence check, alert + dashboard widget (#2032)#2061

Merged
atomantic merged 1 commit into
mainfrom
claim/issue-2032
Jul 2, 2026
Merged

feat: surface Tribe 'needs care' via server cadence check, alert + dashboard widget (#2032)#2061
atomantic merged 1 commit into
mainfrom
claim/issue-2032

Conversation

@atomantic

Copy link
Copy Markdown
Owner

Closes #2032

Summary

Tribe already computed who is overdue for contact, but only client-side inside the Tribe page. This surfaces "needs care" where the user looks daily.

  1. Server cadence source of truthpersonCadenceStatus() + getCareSummary() in server/services/tribe.js port the overdue logic from client/src/lib/tribe.js (contactStatus), exposed at GET /api/tribe/care (limit-clamped). External people excluded; missing (never-contacted) sorts above dated-overdue, then most-overdue first.
  2. Proactive alertcheckTribeCadence() added to proactiveAlerts.js and wired into the Promise.all; emits "N people are overdue for contact" linking to /tribe, quiet when none.
  3. Dashboard widgetTribeCareWidget registered in widgetRegistry.jsx (gate: (s) => !!s.tribeCare?.hasPeople), reads the server summary from dashboardState (fetched once in Dashboard.jsx, no duplicate fetch), lists top-N most-overdue with links to /tribe, shows an "all caught up" state when none overdue, hidden when Tribe has no people. Added to the default "Everything" layout (gated, so silent on installs without a Tribe).

No LLM calls — pure data surfacing.

Deferred

Per issue point 1, the Tribe page still derives its own overdueCount/soonCount from the shared client helper rather than the new endpoint (it already loads every person locally, so fetching /tribe/care for counts it can derive would add a redundant round-trip). Full consolidation of the two mirrored cadence implementations is tracked in #2060.

Test plan

  • server/services/tribe.test.jspersonCadenceStatus states (external/missing/overdue/soon/steady) + getCareSummary (external exclusion, missing-first sort, limit vs. full count, empty tribe). 24 pass.
  • server/routes/tribe.test.jsGET /tribe/care limit clamp. 16 pass.
  • client/src/components/TribeCareWidget.test.jsx — hidden states, all-caught-up, overdue list + overflow + deep links. 4 pass.
  • server/services/dashboardLayouts.test.js (10) + client dashboard suite (6) green.

https://claude.ai/code/session_01DKGYJ2LdM91DRvNKj8Y31B

…shboard widget (#2032)

Add a server-side overdue-contact source of truth (getCareSummary /
personCadenceStatus in server/services/tribe.js, GET /api/tribe/care),
a checkTribeCadence() proactive alert, and a gated TribeCare dashboard
widget. Mirrors the Tribe page's client cadence logic.

Claude-Session: https://claude.ai/code/session_01DKGYJ2LdM91DRvNKj8Y31B
@atomantic atomantic merged commit de8c6a4 into main Jul 2, 2026
4 of 6 checks passed
@atomantic atomantic deleted the claim/issue-2032 branch July 2, 2026 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Surface Tribe 'needs care' outside the Tribe page: server-side cadence check, proactive alert, dashboard widget

1 participant