Skip to content

Fix critical bugs, CORS issues, and remove unused files - #192

Merged
majdjadalhaq merged 4 commits into
developfrom
fix/cors-dead-code-cleanup
Mar 9, 2026
Merged

majdjadalhaq merged 4 commits into
developfrom
fix/cors-dead-code-cleanup

Conversation

@majdjadalhaq

Copy link
Copy Markdown
Contributor

Bugs fixed:

The live site (c54b.hyf.dev) was missing from the CORS list, so API calls and Socket.io notifications didn't work in production. Now both use one shared list.
The "Message Seller" button on a listing page was building the wrong chat URL. This broke the whole review flow — the seller couldn't see the buyer in the "Mark as Sold" list, so the buyer never got the option to leave a review. Fixed.
The map on the listing creation form (drag pin) would crash because it was importing from a file we removed. Fixed.
/inbox and /chat pages were accessible without being logged in. They are now protected.
dotenv was loading after other imports, which could cause environment variables to be undefined at startup. Moved to the very first line.
The Cypress test seed had the admin email and password written directly in the code. Moved to environment variables.
Dead code removed:

Old ResetPassword.jsx page — was never connected to any route. The forgot password flow already handles everything inside ForgotPassword.jsx.
Old VerifyCode.jsx in the wrong folder — the real one lives in pages/User/.
Two import shim files for the map component that nobody was using anymore.
18 Cypress example files that came with the framework and were never part of our tests.
Other:

Added 7 missing variables to .env.example so new developers know what to set up.

Copilot AI review requested due to automatic review settings March 9, 2026 18:53
@HackYourFutures
HackYourFutures temporarily deployed to hyf-c54-grou-fix-cors-d-ajczwu March 9, 2026 18:53 Inactive
@majdjadalhaq
majdjadalhaq removed the request for review from Copilot March 9, 2026 18:53
Copilot AI review requested due to automatic review settings March 9, 2026 19:07
@majdjadalhaq
majdjadalhaq temporarily deployed to hyf-c54-grou-fix-cors-d-ajczwu March 9, 2026 19:08 Inactive
@majdjadalhaq
majdjadalhaq requested review from Dalia-Saeed, Hadidreem17 and hkarimx and removed request for Copilot March 9, 2026 19:10
@majdjadalhaq
majdjadalhaq merged commit e1bc4bf into develop Mar 9, 2026
6 checks passed

This branch was previously deployed

1 inactive deployment
hyf-c54-grou-fix-cors-d-ajczwu — cf40d7f2 Deployed Mar 9, 2026 by majdjadalhaq
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.

3 participants