Skip to content

fix(messaging): remove @ts-nocheck and fully type useMessaging hook (… - #1116

Merged
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
eogenyi23-creator:fix/remove-ts-nocheck-useMessaging
Jul 30, 2026
Merged

fix(messaging): remove @ts-nocheck and fully type useMessaging hook (…#1116
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
eogenyi23-creator:fix/remove-ts-nocheck-useMessaging

Conversation

@eogenyi23-creator

Copy link
Copy Markdown

#934)

  • Remove the @ts-nocheck suppression from useMessaging.tsx so TypeScript enforces type safety over the entire real-time messaging hook.

  • Drop the unused useWebSocket call: the store (messagingStore.ts) owns the socket lifecycle via wsManager; there is no need for a second WebSocket abstraction layer in the hook.

  • Replace NodeJS.Timeout with ReturnType so the file compiles correctly in both browser and Node runtime contexts.

  • Remove isReconnecting / connectionError from the hook's return value; reconnection state is tracked inside the store (isConnected flag).

  • Extend MessagingState interface with all actions that useMessaging was consuming but that were absent from the interface:
    · loadMoreMessages - paginate older messages
    · setSearchQuery - filter conversation list
    · setSelectedFiles - replace selected-file list
    · removeSelectedFile - remove a file by index
    · uploadAttachments - upload Files, return Attachment[]
    · createConversation - start a new conversation by participantId
    · getTotalUnreadCount - aggregate unread badge count

  • Provide stub implementations for all new store actions so they satisfy the interface; real server integration can replace the stubs without changing any consumer types.

  • Verified: npx tsc --noEmit exits 0 with no errors across the project.

Closes #934

Description

Brief description of changes

Related Issue

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • No console errors
  • Uses Lucide icons consistently
  • Responsive design implemented
  • Starknet best practices followed

Closes #934

…inafcode#934)

- Remove the @ts-nocheck suppression from useMessaging.tsx so TypeScript
  enforces type safety over the entire real-time messaging hook.

- Drop the unused useWebSocket call: the store (messagingStore.ts) owns the
  socket lifecycle via wsManager; there is no need for a second WebSocket
  abstraction layer in the hook.

- Replace NodeJS.Timeout with ReturnType<typeof setTimeout> so the file
  compiles correctly in both browser and Node runtime contexts.

- Remove isReconnecting / connectionError from the hook's return value;
  reconnection state is tracked inside the store (isConnected flag).

- Extend MessagingState interface with all actions that useMessaging was
  consuming but that were absent from the interface:
    · loadMoreMessages     - paginate older messages
    · setSearchQuery       - filter conversation list
    · setSelectedFiles     - replace selected-file list
    · removeSelectedFile   - remove a file by index
    · uploadAttachments    - upload Files, return Attachment[]
    · createConversation   - start a new conversation by participantId
    · getTotalUnreadCount  - aggregate unread badge count

- Provide stub implementations for all new store actions so they satisfy
  the interface; real server integration can replace the stubs without
  changing any consumer types.

- Verified: npx tsc --noEmit exits 0 with no errors across the project.

Closes rinafcode#934
@drips-wave

drips-wave Bot commented Jul 30, 2026

Copy link
Copy Markdown

@eogenyi23-creator Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@RUKAYAT-CODER

Copy link
Copy Markdown
Contributor

Thank you for contributing to the project.

@RUKAYAT-CODER
RUKAYAT-CODER merged commit d0599b4 into rinafcode:main Jul 30, 2026
6 checks passed
@eogenyi23-creator

eogenyi23-creator commented Jul 31, 2026

Copy link
Copy Markdown
Author

Hi @RUKAYAT-CODER,
Thank you for merging the PR! I know the recent Wave sprint has wrapped up, but I really enjoyed working on this project. I would love to step up and help manage tasks for the next cycle.Could you guide me on how to go about becoming a maintainer here so I can help support the repository moving forward?

@RUKAYAT-CODER

RUKAYAT-CODER commented Aug 1, 2026 via email

Copy link
Copy Markdown
Contributor

@eogenyi23-creator

Copy link
Copy Markdown
Author

Thank you for taking you time to respond to me. So It basically means i can only submit a project when there is an ongoing or active wave (e.g wave 8).

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.

Remove @ts-nocheck from the real-time useMessaging hook

2 participants