Repository navigation
Conversation
…ion review (Stage 5B)
There was a problem hiding this comment.
If your organization's extra usage balance is empty, an organization admin can add extra usage credits at claude.ai/admin-settings/usage. If its monthly spend limit was reached, an admin can raise it on the same page. If neither applies, contact Anthropic support.
Once extra usage is available, someone with write access to this repository can comment @claude review on this pull request to trigger a review.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 2 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
Request: Shared-core review (Platform PO) for head 4bf93a8 modifying crove_kernel.org_purge in supabase/migrations/20270315100000_crove_kernel_org_purge_hr_stage5b.sql. |
There was a problem hiding this comment.
⏱️ Code Review completed (50 eligible files · 405,111 chars · 3 model call(s) · 14 PR unit(s))
Whole diff with bounded context at base dea0c38 / head 4bf93a8.
✅ No verified defects
3 possible issue(s) could not be grounded in or verified against the snapshot source, so they are not published.
Context investigation was bounded to the explicitly requested snapshot paths.
Closes #4448
Follows Step 0 invariant prep PR #4461 (merged at
cad1793e1c845a1320b26f317d91d79e5d57e01d), removingcrove_hr.onboarding_submission,crove_hr.overtime_request, andcrove_hr.probation_reviewfromPENDING_TABLESinapps/kernel/test/invariant/rls-matrix.db.test.tsas their migrations land here.What changed for users
/hr/my,/hr/employees):/hr/my(crove_hr.onboarding_submission).owner/adminapproves (hr.onboarding.approve) or rejects items in the/hr/employeesonboarding queue before updatingcrove_hr.payroll_employee./hr/my,/hr/employees,/hr/payroll):work_date, decimalhours(numeric), andday_type(weekday,weekend,holiday).pending_l1 -> pending_final -> approved | rejected | cancelled, enforcing DB triggers and server anti-self-approval checks (crove_hr.is_sole_owner_orgsole-owner exception only), plus active department (archived_at IS NULL) and non-viewer manager membership validation on submit./hr/payroll(syncOvertime/overtimeFromRequests), using Art. 98 multiplier metadata (150%/200%/300%) explicitly labeledstatus: 'commentary'pending owner-action: the accountant confirms the payroll rule rows and gives worked examples (#2498) #2535.Ludy Cong tacevidence (/hr/employees):Ludy Cong tac(crove_projects) tasks and attendance summaries (crove_hr.probation_review), respecting caller project access andorg_app_on(org_id, 'projects')(returning empty/0when Projects is disabled or inaccessible, without looseningcrove_projectsRLS).Lycoworker action (hr.probation_summary, family'hr') drafts editable factualDe xuatnotes only and filters/blocks score or decision directives (AI Law 134/2025/QH15human oversight). Reviewers explicitly pickpass,extend, orterminateand write/edit the final note.shared-core), and migrations:supabase/migrations/20270315090000_crove_hr_onboarding_ot_probation.sql: schema, indexes, anti-self-approval triggers, column-scopedGRANT UPDATE(no table-wide UPDATE/DELETE),crove_kernel.apply_tenant_rls, andle_scopeon all 3 new tables pluscrove_hr.overtime_request_employee_name.supabase/migrations/20270315100000_crove_kernel_org_purge_hr_stage5b.sql: updatescrove_kernel.org_purgefromorigin/main(20270315080100, preservingcrove_projects.time_entry), deleting the 3 new child HR tables beforecrove_hr.payroll_employee.hr.payroll.employee.erase(modules/hr/src/employees.ts),packages/kernel/src/personal-data.ts, andpackages/kernel/src/offboarding.tsto cancel open OT requests and wipe PII/notes across the new tables.Acceptance
Verification evidence (head
4bf93a801ed32da633e3b00a5ef20db82a9a4979)pnpm lint && pnpm docs:check && node tools/ci/spdx-header.mjs && pnpm migration:rebasepassed (oxlint: 0 warnings, 0 errors across 4051 files;ui-colors: 662 files OK;docs:check: 250 files OK;spdx: 17 new files OK).pnpm --filter <pkg> typecheckpassed sequentially across@ludy/kernel-contract,@ludy/db,@ludy/agent,@ludy/kernel,@ludy/mod-projects,@ludy/mod-hr,@ludy/kernel-server, and@ludy/app.pnpm vitest run): 13/13 suites, 83/83 tests passed (hr-probation.test.ts,meter.test.ts,hr-probation-ai.test.ts,hr-stage5b-ui.test.tsx,hr-my.test.tsx,hr-stage4b-ui.test.tsx,hr-payroll-preview.test.tsx,manifest-permissions.test.ts,manifest-entities.test.ts,manifest-screens.test.ts,personal-data.test.ts,meetings-translation-isolation.test.ts,org-export-coverage.test.ts).CROVE_TEST_ADMIN_URLonludy-pg17-shared):pnpm test:db apps/kernel/test/invariant/rls-matrix.db.test.tspassed (1615/1615).CROVE_TEST_ADMIN_URLonludy-pg17-shared,--fileParallelism=false): 10/10 suites, 105/105 tests passed (manifest.db.test.ts,org-purge.db.test.ts,conformance.db.test.ts,check-unions.db.test.ts,personal-data.db.test.ts,hr-stage5b-onboarding-ot-probation.db.test.ts,hr-payroll-run.db.test.ts,hr-self-service-portal.db.test.ts,subject-key-reseal.db.test.ts,sealed-input.db.test.ts).482ceb5d) reviewed4bf93a801vsorigin/main(dea0c3823): PASS across all 6 checklist criteria.codex review --base origin/main: skipped due to Codex CLI usage quota limit (unavailable until Nov 25, 2026 6:47 PM); supplemented by fresh-context review (482ceb5d) and pending HRM PO security review + Platform PO shared-core review.Review checklist
pending_l1 -> pending_final -> approved | rejected | cancelled), inactive/viewer manager validation on OT submit, active employee and known-bank checks on onboarding approval, deterministic OT payroll rollup (overtimeFromRequestsoverride preserved on unrelated line edits), and empty/disabled Projects fallback (org_app_on(org_id, 'projects')).GRANT UPDATEwithout table-wideUPDATE/DELETE,hr.onboarding.approvegated tohr.payroll.run(owner/admin),crove_projectsRLS left untouched,Lyprobation helper capped to meteredhr.probation_summarywith untrusted task-title fencing and blocked decision/score outputs.org_id,PRIMARY KEY (org_id, id),crove_kernel.apply_tenant_rls,le_scopegrants, and cross-tenant/peer-member/viewer isolation verified inrls-matrix.db.test.ts(1615/1615) andhr-stage5b-onboarding-ot-probation.db.test.ts.hoursstored asnumericin SQL and computed viadecimal.js(@crove/l10n-vnmoney helpers); statutory Art. 98 multiplier figures (150%/200%/300%) remain taggedstatus: 'commentary'pending owner-action: the accountant confirms the payroll rule rows and gives worked examples (#2498) #2535.crove_hr.overtime_request_employee_name, while keeping UI sub-components modular (hr-onboarding-ot-card.tsx,hr-probation-panel.tsx,hr-stage5b-queues.tsx).>= 44px(min-h-11) touch targets, explicit labels, and<th scope="col">table headers (hr-stage5b-ui.test.tsx).Risk left
supabase/migrations/20270315100000_crove_kernel_org_purge_hr_stage5b.sqlmodifies Shared Corecrove_kernel.org_purgeand requires Platform PO shared-core review alongside HRM PO independent security review and acceptance.status: 'commentary'until owner-action: the accountant confirms the payroll rule rows and gives worked examples (#2498) #2535 legal/accountant sign-off.📌 TL;DR
This PR introduces the frontend components for the HR self-service onboarding checklist, 2-level overtime (OT) request workflow, and end-of-probation review panel. It also adds the corresponding admin/owner review queues and English localization strings to support these new HR features.
🎯 Type of Change
🔍 Changes Walkthrough
apps/app/src/components/hr-onboarding-ot-card.tsxHrSelfOnboardingCardfor employees to submit checklist confirmations and profile updates, andHrSelfOvertimeCardfor submitting OT requests and managing L1 approvals for team members.apps/app/src/components/hr-probation-panel.tsxHrProbationPanelallowing managers to review employee performance facts (tasks, attendance), generate AI draft notes, and submit probation decisions (pass/extend/terminate).apps/app/src/components/hr-stage5b-queues.tsxHrOnboardingReviewQueueandHrOvertimeReviewQueuefor admins/owners to review, approve, or reject employee submissions with optional decision notes.apps/app/src/i18n/messages/en.ts📊 Architectural Flow
flowchart TD subgraph Employee_Self_Service A[HrSelfOnboardingCard] -->|Submit| B[hr.self.onboarding.submit] C[HrSelfOvertimeCard] -->|Submit| D[hr.self.overtime.submit] C -->|Approve L1| E[hr.overtimeRequests.approveL1] end subgraph Manager_Review F[HrProbationPanel] -->|Preview Facts| G[hr.probation.preview] F -->|Draft AI Note| H[hr.probation.draftSummary] F -->|Decide| I[hr.probation.decide] end subgraph Admin_Queue J[HrOnboardingReviewQueue] -->|Approve/Reject| K[hr.onboarding.approve/reject] L[HrOvertimeReviewQueue] -->|Approve L1/Final| M[hr.overtimeRequests.approveL1/approveFinal] L -->|Reject| N[hr.overtimeRequests.reject] end B --> O[Backend API] D --> O E --> O G --> O H --> O I --> O K --> O M --> O N --> O