Skip to content

feat: implement hiring management platform and resolve repository compilation type errors#149

Open
Itzzavdheshh wants to merge 9 commits into
NexGenStudioDev:masterfrom
Itzzavdheshh:job
Open

feat: implement hiring management platform and resolve repository compilation type errors#149
Itzzavdheshh wants to merge 9 commits into
NexGenStudioDev:masterfrom
Itzzavdheshh:job

Conversation

@Itzzavdheshh

Copy link
Copy Markdown
Contributor

Summary

This PR implements a modern, scalable, production-grade Hiring Management Platform ("CommDesk") under src/features/Hiring/v1/. It also cleans up several pre-existing unused imports/locals and resolves common component type mismatches, successfully enabling a clean production build (npm run build with noUnusedLocals: true):

  1. Robust Type Layer & Stores: Established unified TypeScript models for job listings, applicants, activity timelines, and company profiles, with a client-side Zustand store persisting to localStorage pre-seeded with realistic candidate details.
  2. Full-Featured Recruiter Portal: Added dashboards with funnel analytics, a 4-step job creation stepper wizard, a drag-and-drop applicant pipeline manager, an interactive email composer with invite templates, and a community moderation board.
  3. Public Career Sites: Added public routes at /company/:slug and /company/:slug/jobs/:jobId enabling guests to view profile details and submit real-time applications directly into the organization's backend candidate queue.
  4. Common Component Fixing: Corrected a common typing bug in the Url input component where an undefined domain prop caused strict type check exceptions.
  5. Compiler Warning Cleanup: Removed unused variables and imports in legacy views to satisfy strict compiler check constraints.

Related Issue

Fixes #121

Type of Change

  • Feature
  • Bug Fix
  • UI/UX Improvement
  • Performance Optimization
  • Security Enhancement
  • Refactoring
  • Documentation
  • Testing
  • Infrastructure
  • Integration

Changes Implemented

  • src/features/Hiring/v1/:
    • Types/Hiring.types.ts: Defined standard interfaces for JobRole, Applicant, CompanyProfile, MailLog, and AuditLog.
    • Store/hiringStore.ts: Configured Zustand storage with persistence and mock data.
    • Hooks/useHiring.ts: Added React Query wrappers for client-side API behavior.
    • Pages/*: Created all operational views (Dashboard, Create/Edit Steppers, Applicants list, ATS Details, Send Mail, Company Profile Branding, and Media).
  • src/Component/ui/Url.tsx:
    • Resolved domain prop typing mismatch (argument of type string | undefined vs string parameter constraint).
  • Cleaned Up Unused Imports/Locals:
    • PublicCompanyProfilePage.tsx & PublicJobDetailsPage.tsx (removed unused imports).
    • Administrative_MetaData.tsx & MemberShip_Status.tsx (removed unused imports).
    • ProfessionalDetails.tsx (removed unused getSkillColor and its import).
    • MemberLayout.tsx (removed unused Header import).
  • OrgRoute.tsx, MemberRoutes.tsx, & SideBar.tsx:
    • Registered organizational paths, public guest portals, and added navigation items to the sidebar menu.

Technical Details

Frontend

  • HSL-driven UI matching the custom theme variables.
  • Stepper forms with autosaved drafts and interactive validation.
  • Responsive flexbox/grid layout structures optimized for both mobile and desktop.

Backend

  • N/A (Core database simulation is handled client-side).

Database

  • JSON state serialization persisted to browser localStorage.

API

  • TanStack Query hooks simulating mock latency.

Infrastructure

  • N/A

Screenshots

Before

  • No hiring options, career profile configurations, or public application pages.
  • Type checker and Vite builds failing due to unused imports, vars, and string | undefined parameters in legacy files.

After

  • Interactive recruiting platform with full CRUD management and guest application flows.
  • Vite build (npm run build) and type check (npx tsc --noEmit) complete successfully in under 25 seconds.

Testing

Unit Tests

  • N/A

Integration Tests

  • N/A

E2E Tests

  • N/A

Manual Testing

  • Tested the recruitment cycle end-to-end: created a draft job, viewed candidate matching lists, shifted applications to different pipeline stages, composed emails, and submitted applications via the public /company/nexgen-studios paths.

Security Review

  • Operations check inputs and guard localStorage reading/writing with safety try-catch wrappers to prevent crashing in SSR rendering environments.

Accessibility Review

  • Styled interactive forms, semantic sections (header, main), key descriptors, and alt properties on dynamic images.

Performance Impact

  • Optimized state transitions and deferred component loading. No large dependency overheads introduced.

Breaking Changes

  • No Breaking Changes
  • Breaking Changes Documented

Deployment Notes

  • Standard deployment. No environmental variable changes required.

Rollback Plan

  • Revert commit using standard Git rollback procedures.

Checklist

  • Code follows project standards
  • Security reviewed
  • Accessibility reviewed
  • Performance validated
  • CI/CD passing
  • Ready for review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a comprehensive client-side hiring platform feature, including a jobs dashboard, job creation wizard, applicants tracking board, email sender, media gallery, moderation queue, and public-facing career portals. Feedback on these changes focuses on optimizing performance and reliability: filtering jobs and applicants in memory using useMemo to eliminate query delays on search keystrokes, accessing the Zustand store directly inside query functions to prevent stale closures, and dynamically resolving job titles instead of hardcoding them. Additionally, reviewers recommend persisting draft jobs to the store upon saving, avoiding QuotaExceededError crashes from storing large base64 images in localStorage, making risk checks case-insensitive, and correcting capitalized state variable names to follow standard camelCase conventions.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/features/Hiring/v1/Pages/SendMailPage.tsx
Comment thread src/features/Hiring/v1/Pages/ApplicantDetailsPage.tsx
Comment on lines +138 to +169
export function useApplicants(jobId: string | undefined, search?: string, status?: string) {
const applicants = useHiringStore((state) => state.applicants);

return useQuery({
queryKey: ["hiring-applicants", jobId, search, status],
queryFn: async () => {
await delay(400);
let list = applicants.filter((a) => a.jobId === jobId);

if (search) {
const q = search.toLowerCase();
list = list.filter(
(a) =>
a.name.toLowerCase().includes(q) ||
a.email.toLowerCase().includes(q) ||
a.skills.some((s) => s.toLowerCase().includes(q))
);
}

if (status && status !== "all") {
if (status === "strong") {
list = list.filter((a) => a.matchScore >= 85);
} else {
list = list.filter((a) => a.status === status);
}
}

return list;
},
enabled: !!jobId,
});
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Simplify the useApplicants hook to only fetch applicants by jobId from the Zustand store state using useHiringStore.getState(). This allows the client-side pages to perform search and tab filtering in memory, avoiding a 400ms delay on every single keystroke in the search input.

export function useApplicants(jobId: string | undefined) {
  return useQuery({
    queryKey: ["hiring-applicants", jobId],
    queryFn: async () => {
      await delay(400);
      return useHiringStore.getState().applicants.filter((a) => a.jobId === jobId);
    },
    enabled: !!jobId,
  });
}

Comment thread src/features/Hiring/v1/Pages/MediaManagementPage.tsx
Comment on lines +22 to +26
const { data: applicants = [], isLoading } = useApplicants(jobId, search, activeTab === "all" ? undefined : activeTab);
const updateStatusMutation = useUpdateApplicantStatus();

// Metrics (dynamically computed from all applicants for this job)
const allJobApplicants = useApplicants(jobId).data || [];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Instead of passing search and activeTab filters to the useApplicants hook (which triggers a new query with a 400ms delay on every single keystroke), fetch all applicants for the job once and filter them in memory using useMemo. This also eliminates the redundant second hook call on line 26.

  const { data: allApplicants = [], isLoading } = useApplicants(jobId);
  const updateStatusMutation = useUpdateApplicantStatus();

  const allJobApplicants = allApplicants;

  const applicants = useMemo(() => {
    return allApplicants.filter((a) => {
      if (search) {
        const q = search.toLowerCase();
        const matchesSearch =
          a.name.toLowerCase().includes(q) ||
          a.email.toLowerCase().includes(q) ||
          a.skills.some((s) => s.toLowerCase().includes(q));
        if (!matchesSearch) return false;
      }
      if (activeTab !== "all") {
        if (activeTab === "strong") {
          return a.matchScore >= 85;
        }
        return a.status === activeTab;
      }
      return true;
    });
  }, [allApplicants, search, activeTab]);

@@ -0,0 +1,471 @@
import { useState } from "react";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Import useMemo from React to support efficient client-side filtering of jobs.

Suggested change
import { useState } from "react";
import { useState, useMemo } from "react";

Comment thread src/features/Hiring/v1/Pages/CreateJobPage.tsx
@@ -0,0 +1,401 @@
import { useState } from "react";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Import useMemo from React to support efficient client-side filtering of applicants.

Suggested change
import { useState } from "react";
import { useState, useMemo } from "react";

Comment thread src/Component/ui/Url.tsx Outdated
const valid = isValidDomain(domain);
const [Domain, setDomain] = React.useState(domain);
const valid = isValidDomain(domain || "");
const [Domain, setDomain] = React.useState(domain || "");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The state variable Domain is capitalized, which violates React/JS camelCase naming conventions and can confuse linters/compilers that expect capitalized names to be React Components. Rename Domain to domainState or currentDomain throughout the file.

Comment thread src/features/Hiring/v1/Pages/ModerationPage.tsx
itzzavdhesh and others added 8 commits June 14, 2026 14:44
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>
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>
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>
@abhishek-nexgen-dev

Copy link
Copy Markdown
Member

Add image

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.

🚀 Enterprise Hiring Ecosystem

3 participants