refactor(hiring): delete three redundant sections (pending-panel + summary cards + department headcount)

HiringPipeline carried three panels that restated information already
shown — one with more emphasis — on the Team page or in the stage
filter directly above them:

1. "Pending approval" mini-Panel (lines 121-187): listed the same
   candidates that the user reaches by clicking the `pending_approval`
   chip in the stage filter at the top of the page. The mini-Panel
   also carried its own Approve / Reject buttons, but those approvals
   are resolvable from Approvals section too. Doubling the approval
   path increases the chance of racing clicks between the two
   surfaces. Deleted.

2. 4-card summary row at the bottom (lines 246-267): Total agents /
   Pending hires / Departments / Monthly payroll. The first two are
   rendered on the Team page by TeamHeaderSummary (commit 36bed1b).
   Payroll can return via a Team-page dedicated surface when there
   is a business reason; until then it is clutter. Deleted.

3. "Department headcount" Panel (lines 269-293): grid of active+
   pending count per department. OrgChart already shows this through
   the department colour on each agent card, and TeamHeaderSummary
   covers the aggregate. Two places describing the same fact is one
   too many. Deleted.

Also:

- `onRefresh` prop removed from HiringPipeline + OrganizationSections
  caller — only the (now-deleted) approve/reject buttons used it.
- `Card`, `UserPlus`, `Check`, `unwrap` imports dropped because the
  deletions made them unused.
- Unused `i` index in Dashboard.tsx activeWork map callback cleaned
  up (left over from the previous commit that removed the
  arbitrary animation gate).

File size: HiringPipeline.tsx 296 LOC → 175 LOC (net −121).

Typecheck + lint pass.
This commit is contained in:
ZacharyZhang-NY committed 2026-04-17 21:21:05 -04:00
1 parent 8b6826f6d8
commit 7c4d7a4a5e
3 files changed
+3 -125

No files matched your search

@@ -117,7 +117,6 @@ export function OrganizationSections({ section }: OrganizationSectionsProps) {
<HiringPipeline
agents={companyAgents}
approvals={(snapshot?.approvals ?? []).filter(a => a.companyId === currentCompany.id)}
onRefresh={refresh}
onNavigateToAgent={(id) => { setSelectedAgentId(id); setSection("agents"); }}
/>
) : null}