Skip to content

feat: support rich text formatting in iMessage kit#43

Merged
MOBAI (Artist-MOBAI) merged 4 commits into
mainfrom
feat/ENG-800
Mar 14, 2026
Merged

feat: support rich text formatting in iMessage kit#43
MOBAI (Artist-MOBAI) merged 4 commits into
mainfrom
feat/ENG-800

Conversation

@Artist-MOBAI
Copy link
Copy Markdown
Member

@Artist-MOBAI MOBAI (Artist-MOBAI) commented Mar 13, 2026

Summary by CodeRabbit

  • New Features

    • Per-range text styling (bold, italic, underline, strikethrough)
    • Message-level text animations (ripple, explode, bloom, jitter, shake)
    • Bubble effects and the ability to combine styles, animations, and effects in one message
  • Documentation

    • New "Text Styles & Animations" guide and expanded examples, plus a styled-message example demonstrating combined usage

Copilot AI review requested due to automatic review settings March 13, 2026 16:17
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 13, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: cfc4a853-27bc-47bb-b4bd-3e4d2d461fcd

📥 Commits

Reviewing files that changed from the base of the PR and between 79d1e61 and 38c2451.

📒 Files selected for processing (2)
  • lib/auto-create-chat.ts
  • modules/chat.ts
📜 Recent review details
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc)

**/*.{ts,tsx,js,jsx}: Use bun <file> instead of node <file> or ts-node <file> for running TypeScript and JavaScript files
Bun automatically loads .env, so don't use dotenv library
Use Bun.serve() with WebSockets, HTTPS, and routes instead of express
Use bun:sqlite for SQLite database operations instead of better-sqlite3
Use Bun.redis for Redis operations instead of ioredis
Use Bun.sql for Postgres database operations instead of pg or postgres.js
Use built-in WebSocket instead of ws library
Prefer Bun.file over node:fs's readFile/writeFile for file operations
Use Bun.$ template tag for shell commands instead of execa library
CSS files can be imported directly in TypeScript/JavaScript/JSX files and will be bundled automatically by Bun

Files:

  • modules/chat.ts
  • lib/auto-create-chat.ts
**/*.{html,ts,tsx,css}

📄 CodeRabbit inference engine (.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc)

Use bun build <file.html|file.ts|file.css> instead of webpack or esbuild for bundling

Files:

  • modules/chat.ts
  • lib/auto-create-chat.ts
**/*.{html,ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc)

Use HTML imports with Bun.serve() for frontend instead of vite

Files:

  • modules/chat.ts
  • lib/auto-create-chat.ts
**/*.ts

📄 CodeRabbit inference engine (.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc)

Run TypeScript server files with bun --hot <file.ts> for hot module reloading during development

Files:

  • modules/chat.ts
  • lib/auto-create-chat.ts
🧬 Code graph analysis (2)
modules/chat.ts (1)
types/message.ts (1)
  • BubbleEffect (16-29)
lib/auto-create-chat.ts (1)
types/message.ts (3)
  • BubbleEffect (16-29)
  • TextStyle (5-12)
  • TextAnimation (14-14)
🔇 Additional comments (5)
modules/chat.ts (2)

5-5: LGTM!

The import of BubbleEffect is correctly added to support the typed parameter change below.


28-28: LGTM!

Good improvement replacing the loose string type with the BubbleEffect union type. This provides compile-time validation for the 13 supported bubble effects defined in types/message.ts.

lib/auto-create-chat.ts (3)

1-2: LGTM!

Import organization is correct with external packages (axios) before internal types. The additional type imports (BubbleEffect, TextAnimation, TextStyle) are properly sorted alphabetically.


56-58: LGTM!

The new parameters use proper union types (BubbleEffect, TextAnimation) and the structured TextStyle[] array type, providing compile-time validation. This addresses the previous review concern about using loose string types.
[approve_code_changes, duplicate_comment]


61-71: LGTM!

The destructuring and payload construction are correctly updated to include the new styling fields. The pattern follows existing conventions where optional fields like tempGuid and subject are included directly.


📝 Walkthrough

Walkthrough

Adds per-range text styling, per-message text animations, and a bubbleEffect field; updates types and SendMessageOptions, replaces effectIdbubbleEffect across modules and helpers, refactors bubble-effect example, and adds a new styled-message example and README docs for styles/animations.

Changes

Cohort / File(s) Summary
Type Definitions
types/message.ts
Added TextStyle interface, TextAnimation and BubbleEffect types; removed effectId from SendMessageOptions; added textStyles, textAnimation, bubbleEffect, and new SendIMessageAppOptions.
API Call / Helpers
lib/auto-create-chat.ts
Replaced effectId option with bubbleEffect; include textStyles and textAnimation in POST payload to /api/v1/chat/new; updated function signature and destructuring.
Modules / Call Sites
modules/chat.ts, modules/message.ts
Renamed option/property effectIdbubbleEffect in chat creation paths; when creating chats from messages, payload now carries bubbleEffect, textStyles, and textAnimation.
Examples
examples/message-effects.ts, examples/message-styled.ts
Refactored message-effects.ts to use typed BUBBLE_EFFECTS and looped sends; added examples/message-styled.ts demonstrating textStyles, textAnimation, bubbleEffect, combined usage, logging, and delays.
Documentation
README.md
Added "Text Styles" and "Text Animations" to features table; new "Text Styles & Animations" section with per-range style fields, animation options, usage examples, and updated examples list.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant SDK
    participant Server

    Client->>SDK: sendMessage(options: { message, bubbleEffect?, textStyles?, textAnimation? })
    SDK->>SDK: validate & map options (bubbleEffect, textStyles, textAnimation)
    SDK->>Server: POST /api/v1/chat/new (or /message/send) with payload
    Server-->>SDK: 201 Created + Message/Chat response
    SDK-->>Client: callback/resolve with message GUID
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 I nibble letters, stitch them bright,
Bold hops, italic twirls in night.
Bubbles pop confetti air,
Animations glitter everywhere.
I hop—your message dons new light. ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title accurately describes the main change: adding support for rich text formatting (text styles, animations, and bubble effects) in the iMessage kit SDK.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/ENG-800
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR replaces the raw effectId string approach for iMessage effects with a typed BubbleEffect union type, and adds support for rich text formatting (textStyles) and character animations (textAnimation). It also introduces a SendIMessageAppOptions type and a new TextStyle interface.

Changes:

  • Replaces effectId: string with typed bubbleEffect: BubbleEffect, textStyles: TextStyle[], and textAnimation: TextAnimation in the send message API
  • Adds new type definitions (TextStyle, TextAnimation, BubbleEffect, SendIMessageAppOptions) and updates modules/examples to use the new API
  • Adds documentation and a new example file (message-styled.ts) demonstrating text styles, animations, and bubble effects

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
types/message.ts Adds TextStyle, TextAnimation, BubbleEffect, SendIMessageAppOptions types; replaces effectId with new properties in SendMessageOptions
modules/message.ts Updates fallback createChatWithMessage call to use bubbleEffect instead of effectId
modules/chat.ts Renames effectId to bubbleEffect in createChat options
lib/auto-create-chat.ts Renames effectId to bubbleEffect in createChatWithMessage
examples/message-effects.ts Refactors to use BubbleEffect type and loop instead of repetitive per-effect code
examples/message-styled.ts New example demonstrating text styles, animations, and bubble effects
README.md Adds documentation for text styles & animations; updates example table

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md
Comment thread modules/message.ts
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
modules/message.ts (1)

28-36: ⚠️ Potential issue | 🟠 Major

Forward the new rich-text fields through the auto-create path.

When sendMessage() falls back to createChatWithMessage() for a brand-new chat, this call only preserves subject and bubbleEffect. textStyles and textAnimation are dropped, so first-message sends silently lose the new formatting behavior.

💡 Proposed fix
                 await createChatWithMessage({
                     http: this.http,
                     address,
                     message: options.message,
                     tempGuid,
                     subject: options.subject,
+                    textStyles: options.textStyles,
+                    textAnimation: options.textAnimation,
                     bubbleEffect: options.bubbleEffect,
                     service,
                 });

createChatWithMessage() in lib/auto-create-chat.ts needs matching fields in its options and POST body, or this path should create the chat and retry the original message payload.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@modules/message.ts` around lines 28 - 36, When falling back from
sendMessage() to createChatWithMessage() the new rich-text fields textStyles and
textAnimation are not forwarded, so update the createChatWithMessage call and
its implementation to accept these fields (e.g. add textStyles and textAnimation
to the options param in createChatWithMessage) and ensure they are included in
the POST/body sent by the function in lib/auto-create-chat.ts; alternatively
implement createChatWithMessage to only create the chat and then retry the
original sendMessage payload so the original message’s textStyles/textAnimation
are preserved (refer to sendMessage, createChatWithMessage, and the options
object to locate update points).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@examples/message-styled.ts`:
- Around line 3-10: The code currently defaults CHAT_GUID to a real-looking
recipient; change it so CHAT_GUID is required: remove the fallback in the
CHAT_GUID constant and add a fail-fast check (e.g., in the top-level or at the
start of main()) that throws an Error or calls process.exit with a clear message
if process.env.CHAT_GUID is undefined/empty; reference the CHAT_GUID constant
and the main() function (and where createSDK() is invoked) so the example stops
execution instead of sending to a default recipient.
- Around line 48-55: The textStyles ranges are off: adjust them to use exclusive
end indices and correct start positions so "italic there" includes the final 'e'
and "underline" does not include the leading space; update the textStyles array
in the multiStyleMsg sendMessage call (the entry for italic should use end 23
instead of 22, and the underline range should start at 25 instead of 24) while
keeping the bold range as-is.

In `@README.md`:
- Around line 225-232: The example call to sdk.messages.sendMessage still uses
the old effectId field; update the example to use the renamed SendMessageOptions
property bubbleEffect instead (e.g., replace effectId with bubbleEffect) so the
sample matches the current SendMessageOptions API and consumers who copy the
snippet won’t get a type or runtime mismatch when calling
sdk.messages.sendMessage.

In `@types/message.ts`:
- Around line 14-22: The TextAnimation union type block (export type
TextAnimation) is misformatted and failing CI; run the project's formatter
(e.g., prettier/tsfmt) against types/message.ts or your entire repo to reformat
the union block so it matches the repository style, then stage the updated file
and re-run tests—ensure the export type TextAnimation union lines are adjusted
by the formatter rather than manual style changes.

---

Outside diff comments:
In `@modules/message.ts`:
- Around line 28-36: When falling back from sendMessage() to
createChatWithMessage() the new rich-text fields textStyles and textAnimation
are not forwarded, so update the createChatWithMessage call and its
implementation to accept these fields (e.g. add textStyles and textAnimation to
the options param in createChatWithMessage) and ensure they are included in the
POST/body sent by the function in lib/auto-create-chat.ts; alternatively
implement createChatWithMessage to only create the chat and then retry the
original sendMessage payload so the original message’s textStyles/textAnimation
are preserved (refer to sendMessage, createChatWithMessage, and the options
object to locate update points).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 79656591-525d-40bf-a34c-8e0e68410c7b

📥 Commits

Reviewing files that changed from the base of the PR and between d65abf7 and 822db81.

📒 Files selected for processing (7)
  • README.md
  • examples/message-effects.ts
  • examples/message-styled.ts
  • lib/auto-create-chat.ts
  • modules/chat.ts
  • modules/message.ts
  • types/message.ts
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Agent
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc)

**/*.{ts,tsx,js,jsx}: Use bun <file> instead of node <file> or ts-node <file> for running TypeScript and JavaScript files
Bun automatically loads .env, so don't use dotenv library
Use Bun.serve() with WebSockets, HTTPS, and routes instead of express
Use bun:sqlite for SQLite database operations instead of better-sqlite3
Use Bun.redis for Redis operations instead of ioredis
Use Bun.sql for Postgres database operations instead of pg or postgres.js
Use built-in WebSocket instead of ws library
Prefer Bun.file over node:fs's readFile/writeFile for file operations
Use Bun.$ template tag for shell commands instead of execa library
CSS files can be imported directly in TypeScript/JavaScript/JSX files and will be bundled automatically by Bun

Files:

  • modules/chat.ts
  • types/message.ts
  • modules/message.ts
  • examples/message-effects.ts
  • examples/message-styled.ts
  • lib/auto-create-chat.ts
**/*.{html,ts,tsx,css}

📄 CodeRabbit inference engine (.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc)

Use bun build <file.html|file.ts|file.css> instead of webpack or esbuild for bundling

Files:

  • modules/chat.ts
  • types/message.ts
  • modules/message.ts
  • examples/message-effects.ts
  • examples/message-styled.ts
  • lib/auto-create-chat.ts
**/*.{html,ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc)

Use HTML imports with Bun.serve() for frontend instead of vite

Files:

  • modules/chat.ts
  • types/message.ts
  • modules/message.ts
  • examples/message-effects.ts
  • examples/message-styled.ts
  • lib/auto-create-chat.ts
**/*.ts

📄 CodeRabbit inference engine (.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc)

Run TypeScript server files with bun --hot <file.ts> for hot module reloading during development

Files:

  • modules/chat.ts
  • types/message.ts
  • modules/message.ts
  • examples/message-effects.ts
  • examples/message-styled.ts
  • lib/auto-create-chat.ts
🧬 Code graph analysis (2)
examples/message-effects.ts (2)
types/message.ts (1)
  • BubbleEffect (24-37)
examples/utils.ts (2)
  • createSDK (4-11)
  • handleError (24-31)
examples/message-styled.ts (2)
examples/utils.ts (2)
  • createSDK (4-11)
  • handleError (24-31)
lib/Logger.ts (1)
  • error (84-90)
🪛 GitHub Actions: CI
types/message.ts

[error] 14-22: Formatter would have printed different content. Code formatting does not match style guide.

Comment thread examples/message-styled.ts Outdated
Comment thread examples/message-styled.ts
Comment thread README.md
Comment thread types/message.ts Outdated
@Artist-MOBAI MOBAI (Artist-MOBAI) added the release Release to Github and NPM label Mar 14, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@examples/message-effects.ts`:
- Line 4: The code defaults CHAT_GUID to a fake recipient which can send
messages to unintended numbers; remove the unsafe default and add a fail-fast
guard at the start of main() to throw an error if CHAT_GUID is not set.
Specifically, stop using the fallback in the CHAT_GUID constant and update
main() to check if CHAT_GUID is falsy and throw new Error("Set CHAT_GUID
environment variable before running this example") before proceeding to
createSDK() or any send logic (referencing the CHAT_GUID constant and main()
function).

In `@lib/auto-create-chat.ts`:
- Around line 1-2: Reorder the imports in lib/auto-create-chat.ts to satisfy the
linter: place external package imports (AxiosInstance from "axios") before
internal/project imports (TextStyle, TextAnimation from "../types") and sort
multiple imports alphabetically; you can run bunx biome check --write to apply
the project's Biome import ordering automatically.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e21cff23-dd50-49d9-9f3c-34dd03458c1d

📥 Commits

Reviewing files that changed from the base of the PR and between 822db81 and 7664f62.

📒 Files selected for processing (4)
  • examples/message-effects.ts
  • examples/message-styled.ts
  • lib/auto-create-chat.ts
  • modules/message.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • modules/message.ts
📜 Review details
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc)

**/*.{ts,tsx,js,jsx}: Use bun <file> instead of node <file> or ts-node <file> for running TypeScript and JavaScript files
Bun automatically loads .env, so don't use dotenv library
Use Bun.serve() with WebSockets, HTTPS, and routes instead of express
Use bun:sqlite for SQLite database operations instead of better-sqlite3
Use Bun.redis for Redis operations instead of ioredis
Use Bun.sql for Postgres database operations instead of pg or postgres.js
Use built-in WebSocket instead of ws library
Prefer Bun.file over node:fs's readFile/writeFile for file operations
Use Bun.$ template tag for shell commands instead of execa library
CSS files can be imported directly in TypeScript/JavaScript/JSX files and will be bundled automatically by Bun

Files:

  • lib/auto-create-chat.ts
  • examples/message-effects.ts
  • examples/message-styled.ts
**/*.{html,ts,tsx,css}

📄 CodeRabbit inference engine (.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc)

Use bun build <file.html|file.ts|file.css> instead of webpack or esbuild for bundling

Files:

  • lib/auto-create-chat.ts
  • examples/message-effects.ts
  • examples/message-styled.ts
**/*.{html,ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc)

Use HTML imports with Bun.serve() for frontend instead of vite

Files:

  • lib/auto-create-chat.ts
  • examples/message-effects.ts
  • examples/message-styled.ts
**/*.ts

📄 CodeRabbit inference engine (.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc)

Run TypeScript server files with bun --hot <file.ts> for hot module reloading during development

Files:

  • lib/auto-create-chat.ts
  • examples/message-effects.ts
  • examples/message-styled.ts
🧬 Code graph analysis (2)
lib/auto-create-chat.ts (1)
types/message.ts (2)
  • TextStyle (5-12)
  • TextAnimation (14-22)
examples/message-styled.ts (2)
examples/utils.ts (2)
  • createSDK (4-11)
  • handleError (24-31)
lib/Logger.ts (1)
  • error (84-90)
🪛 GitHub Actions: CI
lib/auto-create-chat.ts

[error] 1-3: assist/source/organizeImports: The imports and exports are not sorted. Safe fix: Organize Imports (Biome).

🔇 Additional comments (4)
examples/message-styled.ts (2)

3-3: Require CHAT_GUID instead of defaulting to a recipient.

The fallback to "any;-;+1234567890" could accidentally send messages to an unintended number. Executable examples should fail fast when CHAT_GUID is not set.

🛡️ Proposed fix
-const CHAT_GUID = process.env.CHAT_GUID || "any;-;+1234567890";
+const CHAT_GUID = process.env.CHAT_GUID;

 function sleep(ms: number) {
     return new Promise((resolve) => setTimeout(resolve, ms));
 }

 async function main() {
+    if (!CHAT_GUID) {
+        throw new Error("Set CHAT_GUID environment variable before running this example");
+    }
     const sdk = createSDK();

9-131: LGTM!

The example clearly demonstrates all three independent layers (textStyles, textAnimation, bubbleEffect) with proper SDK lifecycle management and error handling. The textStyles ranges are now correct.

lib/auto-create-chat.ts (1)

50-72: LGTM!

The function signature and payload construction correctly extend support for the new rich text formatting options. The type imports align with the definitions in types/message.ts.

examples/message-effects.ts (1)

6-69: LGTM!

The refactored approach using typed arrays (BUBBLE_EFFECTS) and a record (EFFECT_MESSAGES) is cleaner and more maintainable than individual calls. The loop-based iteration with proper error handling and SDK lifecycle management is well-structured.

Comment thread examples/message-effects.ts
Comment thread lib/auto-create-chat.ts Outdated
Copilot AI review requested due to automatic review settings March 14, 2026 11:09
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR replaces the raw effectId string approach for iMessage effects with a more structured API using typed enums: BubbleEffect, TextAnimation, and TextStyle. It also adds a new SendIMessageAppOptions interface for future iMessage app integration, updates examples, and adds documentation for the new text formatting capabilities.

Changes:

  • Replaced effectId: string with three typed properties: textStyles (per-range formatting), textAnimation (whole-message animations), and bubbleEffect (bubble/screen effects) across types, modules, and helpers
  • Refactored message-effects.ts example to use the new BubbleEffect type and added a new message-styled.ts example demonstrating text styles and animations
  • Added documentation section "Text Styles & Animations" to README with usage examples and reference tables

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
types/message.ts Added TextStyle, TextAnimation, BubbleEffect types; replaced effectId with bubbleEffect; added SendIMessageAppOptions interface
modules/message.ts Updated createChatWithMessage call to pass new properties instead of effectId
modules/chat.ts Renamed effectId to bubbleEffect in createChat method signature
lib/auto-create-chat.ts Updated function signature and body to use bubbleEffect, textStyles, textAnimation
examples/message-effects.ts Refactored to use BubbleEffect type in a loop instead of raw effect ID strings
examples/message-styled.ts New example demonstrating text styles, animations, and combined usage
README.md Added "Text Styles & Animations" documentation section and updated examples table

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md
Comment thread modules/chat.ts Outdated
Comment thread lib/auto-create-chat.ts Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@lib/auto-create-chat.ts`:
- Line 56: Replace the loose string type for the bubbleEffect option with the
shared BubbleEffect union to restore compile-time validation: import
BubbleEffect from ../types and change the property declaration bubbleEffect?:
string to bubbleEffect?: BubbleEffect in lib/auto-create-chat.ts; apply the same
change where bubbleEffect is declared/used in modules/chat.ts (around the
existing bubbleEffect usage at the earlier declaration), ensuring the type
aligns with SendMessageOptions in types/message.ts.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: fb9e2ed7-fe6a-4443-9c29-3e38714ed6e2

📥 Commits

Reviewing files that changed from the base of the PR and between 7664f62 and 79d1e61.

📒 Files selected for processing (2)
  • lib/auto-create-chat.ts
  • types/message.ts
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Agent
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc)

**/*.{ts,tsx,js,jsx}: Use bun <file> instead of node <file> or ts-node <file> for running TypeScript and JavaScript files
Bun automatically loads .env, so don't use dotenv library
Use Bun.serve() with WebSockets, HTTPS, and routes instead of express
Use bun:sqlite for SQLite database operations instead of better-sqlite3
Use Bun.redis for Redis operations instead of ioredis
Use Bun.sql for Postgres database operations instead of pg or postgres.js
Use built-in WebSocket instead of ws library
Prefer Bun.file over node:fs's readFile/writeFile for file operations
Use Bun.$ template tag for shell commands instead of execa library
CSS files can be imported directly in TypeScript/JavaScript/JSX files and will be bundled automatically by Bun

Files:

  • types/message.ts
  • lib/auto-create-chat.ts
**/*.{html,ts,tsx,css}

📄 CodeRabbit inference engine (.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc)

Use bun build <file.html|file.ts|file.css> instead of webpack or esbuild for bundling

Files:

  • types/message.ts
  • lib/auto-create-chat.ts
**/*.{html,ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc)

Use HTML imports with Bun.serve() for frontend instead of vite

Files:

  • types/message.ts
  • lib/auto-create-chat.ts
**/*.ts

📄 CodeRabbit inference engine (.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc)

Run TypeScript server files with bun --hot <file.ts> for hot module reloading during development

Files:

  • types/message.ts
  • lib/auto-create-chat.ts
🧬 Code graph analysis (1)
lib/auto-create-chat.ts (1)
types/message.ts (2)
  • TextStyle (5-12)
  • TextAnimation (14-14)
🔇 Additional comments (1)
types/message.ts (1)

39-41: No action required. The SendMessageOptions interface only exposes bubbleEffect; there is no effectId property to replace or deprecate. The codebase consistently uses bubbleEffect across all call sites and examples.

			> Likely an incorrect or invalid review comment.

Comment thread lib/auto-create-chat.ts Outdated
@Artist-MOBAI MOBAI (Artist-MOBAI) merged commit 0859a9c into main Mar 14, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release Release to Github and NPM

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants