Skip to content

Add @hibira-io/react-native/chat for the Hibira Chat API (0.2.0) - #7

Merged
deflinhec merged 1 commit into
mainfrom
claude/project-thread-pe6oc8
Nov 16, 2026
Merged

deflinhec merged 1 commit into
mainfrom
claude/project-thread-pe6oc8

Conversation

@deflinhec

Copy link
Copy Markdown
Member

Requested by Danny · project thread

What does this change?

New entry point @hibira-io/react-native/chat so React Native / Expo apps can use the Hibira Chat API without wiring realtime events and history themselves:

  • createChatClient: every user route under /apps/{id}/chat/me (conversations, messages, search, send, edit, remove, reactions, reports, read, typing, uploads from a picker's { uri } or a Blob) plus translations (translate, setLanguage, me, messageText(m, lang)) from pusher-server#874. attach(pusher) takes chat.* events from a signed-in pusher-js client and re-syncs on reconnect.
  • useChatClient (uses the provider's connection), useChatConversation (newest page, loadOlder, live messages/edits/reactions, typingUsers, reads, markRead, throttled typing(), catch-up after reconnect) and useChatConversations (list with unread counts). createConversationStore / createConversationListStore work without React.

Same design as the Android, iOS and Flutter chat libraries (hibira-io/hibira-push-android#10, hibira-io/hibira-push-ios#9, hibira-io/flutter#12). Version 0.2.0; README section with 中文摘要 and CHANGELOG entry.

How was it tested?

test/chat.test.mjs (6 tests): token parsing and messageText, routes with 401 token refresh / language / translate / errors, events from a fake pusher-js user + reconnect, the conversation store (paging back to seq 1, typing, reads, catch-up re-read, mark read, send, left), the list store, and the hook under react-test-renderer. npm test (42 pass) and npm run typecheck (with new type usage in test/types.test.tsx) pass locally.

Checklist

  • Tests pass locally and cover the change
  • README or docs updated for any public API or behaviour change
  • No secrets, keys, tokens or personal data in code, tests or screenshots
  • Existing license and copyright notices are kept
  • Breaking changes, if any, are called out above (none)

Generated by Claude Code

A client for the user routes with translations, live chat.* events from a
signed-in pusher-js client, and stores and hooks for one conversation and
the user's conversation list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SHtsCEQwpWuQjtxBkWhUuZ
@deflinhec deflinhec self-assigned this Nov 16, 2026
@deflinhec
deflinhec marked this pull request as ready for review November 16, 2026 14:23
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-16T14:23:08.632191Z
We couldn’t complete this review. Comment @codex review to try again.
9717bff Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@deflinhec
deflinhec merged commit 5de3c49 into main Nov 16, 2026
8 checks passed
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.

2 participants