Skip to content

Conversation

@shubhmjain30
Copy link
Collaborator

@shubhmjain30 shubhmjain30 commented Jan 6, 2026

Implements a complete verification portal for managing agent KYC services, bulk operations, and verification workflows with enhanced dashboard analytics.

Core Features

KYC Verification Module (features/kyc-verification/)

  • 4 pages: Main verification interface, service form, results view with filtering/PDF export, agent service configuration
  • 11 components: Bulk upload modal, user addition workflow, verification progress tracker, result cards/lists, service search/selection UI
  • 4 hooks: useKycVerification (operations), useKycServices (management), useAgentServices (CRUD with batch ops), useServiceSelection (state)
  • Slug-based routing with breadcrumbs, retry logic for failures, dynamic status filtering
  • Batch enable/disable operations with throttling and toast notifications

Dashboard Enhancements

  • Draggable grid system for widget layout (drag-drop, resize)
  • MostUsedServices and UsageAnalytics components with chart visualizations
  • Active agents data transformation and display

Reusable Components

  • Calendar: TypeScript date picker (replaces legacy Calenders component)
  • JsonViewer: Collapsible JSON viewer with syntax highlighting, configurable maxHeight
  • Badge: Status badge with verification-specific variants
  • Enhanced Input: Numeric handling, mobile validation, OTP support
  • Enhanced Form: File upload, OTP fields, dynamic field rendering, onEnter callback
  • Enhanced InfoTile/InfoTileGrid: Selection state, throttled toggles, improved interactivity

Infrastructure

  • useNetworkState hook for network state management
  • 121 test cases across components and hooks
  • Mock services for KYC testing
  • Environment label in NavBar for non-production environments

Bug Fixes

  • Bulk upload endpoint and response type handling
  • Agent code parameter in fetch services API
  • Mobile number validation in AddAgentForm
  • Error handling improvements in hooks

Example Usage

import { KycVerificationPage, useKycVerification } from 'features/kyc-verification';

// Perform verification with retry
const { verify, retry, results } = useKycVerification();
await verify({ serviceSlug: 'aadhaar', data: formData });

// Batch enable services with throttling
const { enableServices } = useAgentServices(agentCode);
await enableServices(['service1', 'service2', 'service3']);

- Added selectable prop to enable selection mode with a toggle between
  plus and checkmark icons.
- Introduced tags prop to display category tags below the description,
  improving the component's usability and visual appeal.
- Updated styles to reflect selection state and ensure proper interaction
  feedback.
- Added support for selection state and selection callback to the
  InfoTileGrid component, allowing for multi-select scenarios.
- Introduced tags display functionality for each InfoTile, enhancing
  the information presented to users.
- Introduced new menu items for KYC verification in both admin and
  general sidebar menus. This allows users to configure and verify
  KYC documents, enhancing the user management capabilities of the
  application.
- Introduced a catch-all route for KYC verification service forms,
  allowing for both single and multi-service handling.
- Added a main listing page route for displaying all verification
  services with filtering and search capabilities.
- Introduce a comprehensive KYC verification page that includes a grid
  view of services, category filtering, search functionality, and both
  single and multi-service selection modes. The forms are generated
  dynamically based on the selected services' parameters.

- Add mock data for KYC services to facilitate development and testing
  without backend dependencies.

- Create page components for the KYC verification and service forms,
  ensuring a user-friendly interface for service selection and form
  submission.

- Define types for KYC services and request parameters to standardize
  data handling across components and hooks.
- Added beta flag to KYC verification configuration and document
  verification menu items. This indicates that these features are
  in a testing phase and may undergo changes.
- Change the background color of the selected services pill from
  "primary.light" to "primary.DEFAULT" for better visual consistency
  with the overall UI design.
- Added a new Calendar component that includes customizable props for
  label, value, placeholder, and date constraints. The component
  features a styled date input with an optional label and left addon.
- Created corresponding tests to ensure the Calendar renders correctly
  and handles various states.
- Removed the old Calenders component and its associated tests and
  stories for better clarity and maintainability.
- Updated exports to maintain backwards compatibility with the old
  Calenders component name.
- Updated the Form component to use the Calendar component instead of
  Calenders for date selection. This change improves consistency and
  aligns with the updated component naming conventions.
- Added leftAddon prop to differentiate between FROM_DATE and TO_DATE
  types for better user experience.
- Update the mapping for date type from ParamType.FROM_DATE to
  ParamType.DATETIME to ensure accurate handling of date parameters
  in the service form.
- Introduce a new Form component that dynamically renders fields based on
  a provided parameter list configuration. This component supports various
  field types and integrates with react-hook-form for state management
  and validation.
- Enhance the FormProps interface to include detailed field configurations
  such as validations, default values, and visibility controls.
- Replace inline validations object with FieldValidations type for better
  consistency and maintainability across form fields.
- This change simplifies the interface definition and leverages existing
  validation structures.
- Refactor the validations for the 'Customer's Mobile' field to include
  detailed error messages for minLength and maxLength. This enhances
  user feedback by providing specific guidance on input requirements.
- Change the type definition in useForm from default to a generic
  Record<string, unknown>. This enhances type safety and clarity
  in form state management.
- Introduced a new function to filter form data, ensuring only relevant
  parameters are sent for each service during KYC verification.
- This enhances the accuracy of API calls and reduces unnecessary data
  transmission, improving overall performance and maintainability.
- Added support for retrying failed verification services, allowing users
  to reattempt only those services that did not succeed initially.
- Updated the VerificationProgress, VerificationResultCard, and
  VerificationResultList components to display success and failure counts,
  along with completion timestamps.
- Improved the useKycVerification hook to manage retry states and
  track the original services for better user experience.
- Introduce a new Select component that allows users to select options
  from a dropdown. The component supports both single and multi-select
  modes, along with customizable rendering options for labels and values.
- This enhances the user interface by providing a flexible and
  user-friendly selection mechanism.
- Introduced a new property `supports_bulk_verification` to the
  `VerificationService` interface, allowing services to indicate
  support for bulk verification uploads.
- Updated mock KYC services to reflect this new capability, enhancing
  the testing and development experience for bulk verification scenarios.
- Introduce BulkUploadButton and BulkVerificationModal components to
  facilitate bulk verification uploads. The button triggers a modal
  that allows users to select a service, download a sample file,
  and upload their data for processing.
- Update KycVerificationPage to integrate the new components,
  enhancing the user experience for bulk verification tasks.
…tency

- Refactor BulkUploadButton to use icon and iconStyle props for better
  integration with the UI framework.
- Adjust DownloadPricing button to standardize size and iconStyle,
  enhancing visual consistency across components.
- Adjust the button size to "sm" for consistency across the UI.
- Introduce an icon to enhance the visual representation of the button,
  improving user experience when raising issues.
- Changed the icon from "user" to "person" for better clarity and
  consistency in the user interface.
- Change the icon size from "sm" to "xs" for the continue button to
  improve visual consistency and alignment with design specifications.
- Remove unnecessary local state for submission tracking to simplify
  component logic.
- Update button states to reflect form validity and dirtiness, ensuring
  better user feedback during form interactions.
- Introduce a back button with appropriate styles and disabled state
  based on submission status.
- Eliminated the horizontal padding from the DEFAULT_BUTTON_STYLES
  object in ActionButtonGroup component to streamline button appearance.
- Removed the icon and its styling from the action button in the
  VerificationResultsPage component. This change simplifies the
  button's appearance and aligns with the updated design specifications.
- Adjust the layout of the InfoTile component to ensure better
  alignment and sizing of elements. This includes wrapping the
  status badge in a Flex container for consistent positioning and
  setting a minimum height for the tile when toggle mode is enabled.
- Removed fixed height and width styles for buttons in various components
  to allow for more flexible layouts. This change enhances responsiveness
  and ensures buttons adapt better to different screen sizes and content.
- Adjusted button configurations in components such as ActionButtonGroup,
  ServiceFormPage, and others to improve UI consistency and usability.

This update aims to streamline the button appearance and behavior
across the application, providing a more cohesive user experience.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
- Introduce an optional onEnter callback function to the FormProps interface.
- This allows handling Enter key presses, which is particularly useful for
  OTP input completion scenarios.
- Added userSelect: "none" to the base style of the badge component.
- This change prevents text selection on the badge, enhancing the user interface.
- Introduced a check to determine if multiple distinct verification
  statuses exist before rendering the status filter. This enhances
  the user interface by preventing unnecessary filter options when
  only one or no status is available.
- Refactor the getStatusBadgeProps function to return a simplified
  structure for badge properties, aligning with new design requirements.
- Introduce new outline variants for badges to enhance visual
  differentiation based on verification status.
- Comment out console.log statements in useAgentServices, useKycVerification,
  KycVerificationPage, and ServiceFormPage to clean up the code and reduce
  unnecessary logging during execution.
@shubhmjain30
Copy link
Collaborator Author

@copilot, summarized these changes so that I can create tickets in my sprint board easily based on the summary.

Copy link

Copilot AI commented Jan 7, 2026

@shubhmjain30 I've opened a new pull request, #472, to work on those changes. Once the pull request is ready, I'll request review from you.

- Introduced a meta property to enforce a minimum length of 3 for the OTP
  input field in the OtpVerificationForm component. This enhances user
  experience by providing immediate feedback on input requirements.
- Introduced a new column for agent balance in the network table, allowing
  for better visibility of agents' financial status.
- This enhancement improves the data representation and aids in
  decision-making processes related to agent management.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants