refactor: move useCipherWorker hook to hooks directory - #959
refactor: move useCipherWorker hook to hooks directory#959gauri9368gupta-maker wants to merge 1 commit into
Conversation
|
@gauri9368gupta-maker is attempting to deploy a commit to the csxark's projects Team on Vercel. A member of the Team first needs to authorize it. |
🎉 Thank You for Your ContributionHello @gauri9368gupta-maker, Thank you for submitting a Pull Request to CryptoViz. We appreciate the time and effort you've invested in contributing to the project. Your Pull Request has been received successfully and will be reviewed by the maintainers as soon as possible. 📋 Pull Request Checklist
Ensuring these requirements are met helps streamline the review process and enables maintainers to review your contribution more efficiently. ❤️ Support CryptoVizIf you find CryptoViz helpful, consider supporting the project by:
Your support helps increase the project's visibility and encourages continued development. Thank you for being a part of the CryptoViz community! Thank you once again for contributing to CryptoViz. We appreciate your support and look forward to reviewing your contribution. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (10)
📝 WalkthroughWalkthroughThe PR relocates ChangesCipher worker relocation
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related issues
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 2⚔️ Resolve merge conflicts 💡
🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
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 |
|
Hi @gauri9368gupta-maker, resolve the merge conflicts |
sure i will do it! |
Summary
This PR moves
useCipherWorkerfromlib/hooks/to the centralizedhooks/directory and updates all affected imports.The change consolidates React hooks under the project-level
hooks/directory while preserving the existing worker implementation and behavior.Changes Made
Moved:
lib/hooks/useCipherWorker.tshooks/useCipherWorker.tsUpdated all component imports referencing
useCipherWorker.Updated the unit test import path.
Corrected the worker type import path:
../../types/worker../types/workerPreserved the existing hook implementation and worker functionality.
Removed the old
lib/hooks/useCipherWorker.tslocation through the Git rename.Files Updated
app/benchmark/page.tsxcomponents/avalanche/AvalancheVisualizer.tsxcomponents/challenge/ChallengeMode.tsxcomponents/challenge/DailyQuiz.tsxcomponents/cipher/CipherLayout.tsxcomponents/compare/CipherComparisonPanel.tsxcomponents/tests/CipherIntegrationDashboard.tsxcomponents/workers/WorkerCommunicationDashboard.tsxhooks/useCipherWorker.tstests/unit/hooks/useCipherWorker.test.tsTesting
Test Command
npm test -- tests/unit/hooks/useCipherWorker.test.tsResult
5/7 tests passed.
Passed:
AbortSignalTwo existing behavioral assertions currently fail:
terminate()method to be called.errorto equal the stringWORKER_TIMEOUT, while the current implementation exposes the structured error{ code: 'WORKER_TIMEOUT' }.These failures are unrelated to the import/path consolidation performed by this PR.
Additional Checks
Result: Passed — no whitespace errors.
Checklist
useCipherWorkerto the centralizedhooks/directorygit diff --cached --checkCommit
Expected Outcome
useCipherWorkeris now located consistently with the project's other React hooks, reducing the previouslib/hooksduplication and making the hook easier to discover and maintain.Summary by CodeRabbit
Bug Fixes
Tests