Skip to content

167 23 16 7 5 1 ankit kumar yadav - #340

Open
ankit18193 wants to merge 7 commits into
modelsuite-ai:masterfrom
ankit18193:167-23-16-7-5-1-ankit-kumar-yadav
Open

167 23 16 7 5 1 ankit kumar yadav#340
ankit18193 wants to merge 7 commits into
modelsuite-ai:masterfrom
ankit18193:167-23-16-7-5-1-ankit-kumar-yadav

Conversation

@ankit18193

Copy link
Copy Markdown

Qualification Assignment Submission

Summary

This pull request completes all assigned qualification tasks for my branch:

167-23-16-7-5-1-ankit-kumar-yadav

The implementation focuses on improving the application's security, backend data integrity, frontend user experience, and overall Talent Portal usability.

The completed work includes fixing critical backend bugs, resolving an authorization vulnerability, implementing reusable loading-state handling for important user actions, simulating assignment notifications, and redesigning the Talent Dashboard with dedicated task management pages.


Issues Closed

Closes #1

Closes #5

Closes #7

Closes #16

Closes #23

Closes #167


Detailed Changes

🐞 Issue #1 — Successive Task Submissions Overwrite Previous Data

Problem

Previously, every new submission for the same task overwrote the previous submission record. As a result:

  • submission history was lost
  • reviewers could not access previous attempts
  • database records were incorrectly updated instead of preserved

Solution

Updated the submission flow to create a new submission document for every submission instead of updating an existing one.

Result

  • Multiple submissions are now preserved.
  • Complete submission history is maintained.
  • Review workflow becomes reliable.

🐞 Issue #5 — Task Deletion Leaves Orphaned Records

Problem

Deleting a task removed only the task document while leaving related submission documents in the database.

This caused orphaned records and inconsistent data.

Solution

Before deleting a task:

  • find all related submissions
  • remove them
  • then delete the task

Result

  • Database integrity maintained
  • No orphaned submissions remain
  • Task lifecycle behaves correctly

🔒 Issue #7 — IDOR Vulnerability in Task Details API

Problem

The submission endpoint allowed unauthorized users to access task submission information by changing the Task ID.

This created an Insecure Direct Object Reference (IDOR) vulnerability.

Solution

Implemented ownership validation by:

  • verifying authenticated user identity
  • ensuring the task is assigned to the requesting talent
  • restricting submission retrieval to the task owner

Result

  • Unauthorized access blocked
  • Task ownership enforced
  • API follows proper authorization rules

⏳ Issue #16 — Missing Loading Indicators on Critical Actions

Problem

Critical user actions provided no visual feedback while waiting for server responses.

Affected flows:

  • Login
  • Register
  • Submit Task

Users could click multiple times, creating duplicate requests.

Solution

Implemented reusable loading state management across all critical actions.

Added:

  • React loading state
  • Disabled buttons
  • Loading labels
  • Duplicate click prevention
  • finally block for cleanup
  • reusable withMinimumDelay() helper

The helper guarantees a smooth minimum loading duration to avoid flashing UI on fast network responses.

Result

  • Better user feedback
  • Duplicate requests prevented
  • Consistent loading experience
  • Improved UX across the application

✨ Issue #23 — Simulate Assignment Notifications

Problem

Task assignment events produced no notification feedback.

Solution

Created a reusable notification utility that simulates assignment notifications through console output.

Notifications are triggered:

  • when a task is assigned
  • when a task is reassigned

Duplicate notifications are avoided when the assignee does not change.

Result

  • Assignment events are clearly simulated
  • Notification logic is reusable
  • Ready for future email or push notification integration

🎨 Issue #167 — Talent Dashboard & Active Tasks Overhaul

Problem

The Talent Portal contained several usability issues:

  • Broken navigation routes
  • Inconsistent task cards
  • No dedicated My Tasks page
  • No Browse Tasks page
  • Full page reloads during navigation
  • Poor task discovery experience

Solution

Implemented a complete frontend overhaul including:

  • New My Tasks page
  • New Browse Tasks page
  • Reusable TaskCard component
  • React Router client-side navigation
  • Search functionality
  • Filtering
  • Sorting
  • Dashboard improvements
  • Sidebar navigation updates

Result

  • Cleaner UI
  • Better navigation
  • Improved task management
  • Consistent component architecture
  • Enhanced Talent Portal experience

Testing Performed

The following functionality was manually verified.

Issue #1

  • Multiple submissions created successfully
  • Previous submissions remain intact

Issue #5

  • Task deletion removes all related submissions
  • No orphaned records remain

Issue #7

  • Authorized talent can access submissions
  • Unauthorized users are denied access

Issue #16

Verified:

  • Login loading state
  • Register loading state
  • Submit Task loading state
  • Disabled controls
  • Duplicate click prevention
  • Error recovery

Issue #23

Verified:

  • Assignment notification
  • Reassignment notification
  • No duplicate notifications

Issue #167

Verified:

  • Dashboard navigation
  • My Tasks page
  • Browse Tasks page
  • Search
  • Filters
  • Sorting
  • Responsive layout
  • Client-side routing

Screenshots

🎨 Issue #167 — Talent Dashboard & Active Tasks Overhaul

Dashboard Overview

Demonstrates the redesigned Talent Dashboard featuring the updated layout, statistics section, reusable task cards, and improved navigation experience.

image

My Tasks Page

Shows the newly introduced My Tasks page where assigned tasks are displayed with filtering, searching, and sorting capabilities.

image

Browse Tasks Page

Displays the new Browse Tasks page that allows talents to discover and claim available tasks through a dedicated interface.

image

⏳ Issue #16 — Loading Indicators on Critical Actions

Login Loading State

Shows the Sign In button entering the loading state, disabling further interaction and displaying visual feedback while authentication is in progress.

{28E40C13-8C91-4E5D-A4BC-C757EED419F2}

Registration Loading State

Shows the Setup Profile button displaying its loading state while preventing duplicate registration requests.

{0442CBE0-5AF8-437F-81D4-7D10CADE680D}

Submit Task Loading State

Shows the Submit Task modal during submission where all interactive controls are disabled until the request completes.

{561B6F45-B2AE-4E8C-933C-294C8AA412B2}

✨ Issue #23 — Assignment Notification Simulation

Assignment Notification Output

Demonstrates the simulated assignment notification generated in the server console when a task is assigned or reassigned.

image

🗑️ Issue #5 — Orphaned Submission Cleanup

Task Deletion Verification

Shows that deleting a task also removes all related submissions, preventing orphaned records in the database.

{6C704297-C035-474C-8328-EA57695DBDE2}

📚 Issue #1 — Multiple Submission History

Successive Submission Verification

Demonstrates that each task submission is stored as a separate document, preserving complete submission history instead of overwriting previous records.

image

🔒 Issue #7 — IDOR Protection

Authorized Access

Shows that the assigned talent can successfully access and submit their own task.

image

Unauthorized Access Prevention

Demonstrates that unauthorized users cannot access or submit tasks that are not assigned to them, confirming the IDOR vulnerability has been resolved.

image

Build & Verification Checklist

Required before opening this PR.

  • Ran cd client && npm run lint
  • Ran cd client && npm run build
  • Ran cd server && npm run lint
  • Ran cd server && npm run build
  • All lint checks passed
  • All builds completed successfully
  • No build errors
  • No lint errors

Demo Video

A complete walkthrough demonstrating all implemented features:

Google Drive Link

https://drive.google.com/file/d/1ZRjNmCHKenMYrtEt2gE0onL99rTr-wme/view?usp=sharing


Contribution Checklist

  • Read and followed the Contribution & Qualification Guidelines.
  • Created the assigned branch:

167-23-16-7-5-1-ankit-kumar-yadav

  • PR title exactly matches the assigned branch name.
  • Pulled the latest master branch before creating the PR.
  • Reviewed the complete diff before submission.
  • Tested all implemented changes locally.
  • No secrets, API keys, or sensitive information included.

Additional Notes

The implementation prioritizes:

  • Security
  • Data consistency
  • Code reusability
  • User experience
  • Maintainability
  • Scalability

Where possible, reusable utilities and shared components were introduced to minimize code duplication and simplify future enhancements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant