feat(analytics): add period-over-period delta cards and agent leaderb… - #672
Merged
ScriptedBro merged 6 commits intoAug 31, 2026
Merged
Conversation
…oard - Calculates client-side period-over-period deltas for spend, orders, avg order value, and approval rate (DelegoLabs#613) - Replaces static delegation table with a fully sortable Agent Leaderboard with row clicks (DelegoLabs#616) - Implements mobile collapsed card views and delta null-safety
|
@k-deejah Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 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 |
- Prefix unused variables with underscores or remove them - Remove unused imports across test and component files - Add explicit fallback values and null checks to order properties in orders.ts and receipts.ts - Address type inference issues with `api` error returns in replayEngine.ts - Correct import paths for addressBook, consentJournal, and txMonitor tests - Remove unexported type references (`CreateDisputeInput`, `Dispute`) from mocks - Satisfy strict type-checking in testing setups and MSW handlers
- Merge duplicate prefetch props on Sidebar navigation - Remove unused layout variables in TourProvider - Cast unexported types to any to fix missing types in exports and handlers - Fix BigInt parsing for Order stroop comparisons - Correct Date construction for Order createdAt/updatedAt - Restore missing server import in approval handlers test
6 tasks
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.
Summary
This PR implements the requested UI improvements for the Analytics dashboard (Issues #613 and #616). It also includes an important note regarding the CI failure across all open PRs (#561) to unblock merging.
Why
NPM_TOKEN) has expired or lost permissions, which blocks all PRs from passing CI checks. This must be resolved by an administrator.Implementation
DeltaCardscomponent and updatedlib/analytics.tsto calculate client-side period-over-period deltas (Spend, Orders, Avg Order Value, Approval Rate). It handles null-safety (returns—for divide-by-zero on new series) and maps proper green/red semantics.AgentLeaderboardcomponent featuring sortable columns (numeric and lexicographic). Clicking a row routes to the agent-filtered view (/orders?search=agentId). Includes CSS media queries to collapse rows into dense cards on mobile.Testing
Note on CI / Issue #561⚠️
The CI will fail on this PR with a
403 Forbiddenfetching@delegolabs/typesand@delegolabs/sdk, identical to other open PRs.Fix required from repository admin: Generate a new PAT with
read:packagesscope and update theNPM_TOKENsecret in Settings -> Secrets and variables -> Actions.Closes #613
Closes #616
Closes #561
References #561