Skip to content

Code review β€” dashboard full build + referral/node backend ​

  • Branch: feature/dashboard-full-build β†’ master
  • Date: 2026-06-24
  • Scope: 12 commits, 59 files (+1209 / βˆ’4865 β€” the deletions are the deprecated v1 design-system removal, out of review scope)
  • Reviewer: code-reviewer agent over git diff origin/master...HEAD, synthesized.

Deterministic gate ​

CheckResult
nx lint webβœ“ 0 errors
nx test webβœ“ 179 passed
coverage gateβœ“ stmts 78.4% Β· branches 67.6% Β· fns 69.6% Β· lines 83.2% (all β‰₯ threshold)
nx build webβœ“
nx lint/test/build apiβœ“

What's in the batch ​

Dashboard: Members view (default β€” KPIs, collapsible Nodes, member directory, 6-column Referral relationships), Mandates view with a read-only drill-down breakdown, People & activity (current / finishedΒ·30d / expand to all). Topbar search + node scope switch via a new AdminUiService. Referral backend (Option A): real sponsor_mp_id / admitted_at / gacx_share columns. Nodes: delete β†’ deactivate (new nodes.active, soft-delete + reactivate). Plus removal of the deprecated v1 design system.

Findings ​

πŸ”΄ Blocking β€” none. ​

🟑 Should-fix (all resolved in-branch) ​

  1. category()/categoryLabel() mislabeled "Member Partner" as "Associate Partner" β€” the app's canonical role is "Member Partner"; no surface uses "Associate Partner". FIXED β€” categoryLabel('AP') β†’ 'Member Partner', KPI "Associate partners" β†’ "Member partners", removed the dead 'Board' branch.
  2. Dashboard forkJoin had no teardown β€” a late response after navigation re-ran ui.enable(), leaking the topbar search/scope controls (root singleton) onto another admin page. FIXED β€” takeUntilDestroyed(this.destroyRef) on the subscribe.
  3. Node AllowDelete: true left a live hard-delete endpoint that orphans members (node_id on delete set null), contradicting the soft-delete decision. FIXED β€” AllowDelete: false in NodeSchema (no UI/test path used it).
  4. "Active referrals" KPI used unscoped d.referrals.length while every other Members computed honors the node scope. FIXED β€” counts referrals involving scoped members under a node filter.

🟒 Nits ​

  • nodeCards map-body indentation drift (cosmetic; lint clean).
  • nodeOps.remove now unused from the UI (kept for the CrudOps contract).
  • Scope <select> uses [value]+(change) rather than ngModel (acceptable for native select).

Verified clean ​

Go↔migration parity (tags, Columns/Values arity, writable split: sponsor_mp_id+active writable, admitted_at/gacx_share read-only with SQL defaults); node create always sends active:true and SQL default covers seed/direct inserts; deactivate/reactivate store.update round-trips; generated TS client in sync; all template reads call computeds; a11y on clickable cards / collapse / confirm / scope select; new specs assert drill-down, KPIs, search+scope, people-toggle-to-spec, 6-column referrals with real fields, and deactivate-not-delete + reactivate.

Verdict ​

Safe to push β€” 0 blocking; all 4 should-fixes resolved in-branch.