chore: promote dev to staging [2026-07-04]#296
Merged
Conversation
* feat(admin-admins): generate temp password on invite instead of OTP reset flow Invited admins now receive a temporary password via email and their account is immediately active. The API response includes the temp_password so the inviting super-admin can also relay it if needed. Removes the dependency on PasswordResetQueueService from the invite path (resetPassword still uses it). * feat(ai): add AiUsageLog entity and migration for ai_usage_logs table Tracks per-call metrics (tag/feature, provider, model, tokens, cost, duration) for every AI call across scoring, report, resources, question gen, and LT-3 gen. * feat(ai): persist AI usage metrics to ai_usage_logs after every chatWithMeta call Injects AiUsageLog repo into OpenRouterService; saves tag, provider, model, tokens, cost, and duration as a fire-and-forget write so latency is unaffected. * feat(admin-overview): implement getAiGenerationConsumption with real DB queries Replaces the empty stub with time-bucketed aggregation (daily/weekly/monthly/yearly) plus a per-feature breakdown (scoring, report, resources, question_gen, lt3_gen) and running totals. Expands AiGenerationConsumptionResult to include tokens and cost.
* feat(admin): add engagement dashboard response and query DTOs Add StatCard/TrendIndicator, EngagementPageStats, retake-dropoff and minor-uptake result DTOs, plus the minor-uptake track query DTO validated against TALENT_ROLE_TRACKS. Mirrors the offers module response conventions. * feat(admin): implement engagement retake analytics service Split metrics into getStats, getRetakeDropoff and getMinorUptake sharing a computeRetakeAggregates helper over advanced assessment attempts. Retake conversion rate and avg time-to-retake use the 14-day gate; minor assessment cards and uptake are stubbed empty (no entity yet) per Phase A scope. * feat(admin): implement engagement retake analytics service Split metrics into getStats, getRetakeDropoff and getMinorUptake sharing a computeRetakeAggregates helper over advanced assessment attempts. Retake conversion rate and avg time-to-retake use the 14-day gate; minor assessment cards and uptake are stubbed empty (no entity yet) per Phase A scope. * feat(admin): expose engagement endpoints and register module Split the controller into GET /admin/engagement/stats, /retake-dropoff and /minor-uptake, gated by @roles(ADMIN) + @AdminTiers(SUPER_ADMIN, ADMIN) with explicit swagger responses. Drop the unused TalentProfile repo from the module and register AdminEngagementModule in AppModule. * fix(admin): enhance engagement analytics with nullable values and retake candidate tracking * refactor(admin): streamline imports in AdminMinorUptakeQueryDto
…eset flow (#293) Invited admins now receive a temporary password via email and their account is immediately active. The API response includes the temp_password so the inviting super-admin can also relay it if needed. Removes the dependency on PasswordResetQueueService from the invite path (resetPassword still uses it).
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes included
Test plan
POST /admin/admins/invitereturnstemp_passwordin response and account is immediately active