Skip to content

fix: harden IRCv3 tag parsing and multiline protocol helpers#175

Open
louzt wants to merge 1 commit into
obbyworld:mainfrom
louzt:fix/ircv3-protocol-hardening
Open

fix: harden IRCv3 tag parsing and multiline protocol helpers#175
louzt wants to merge 1 commit into
obbyworld:mainfrom
louzt:fix/ircv3-protocol-hardening

Conversation

@louzt
Copy link
Copy Markdown

@louzt louzt commented Apr 22, 2026

Summary

This PR is a protocol-correctness hardening pass for generic IRCv3 helpers.

It is intentionally separate from the browser-native translation PR because these changes improve the shared IRC substrate used by multiline handling, reply/react/typing tags, and future tag-driven features regardless of translation.

What this changes

  • parses IRCv3 message-tag values with proper escaping semantics
  • preserves everything after the first = in message-tag and ISUPPORT values
  • decodes \\x20 in ISUPPORT values without truncating richer token payloads
  • preserves whitespace required for correct draft/multiline-concat behavior
  • generates batch ids using spec-compliant characters only
  • splits multiline payloads by UTF-8 byte length instead of JavaScript code-unit length
  • replaces deprecated substr() usage with slice() while touching the same helper path
  • adds focused regression tests for tags, ISUPPORT parsing, batch ids, whitespace preservation, and multibyte payload splitting

Why keep this separate

These are lower-level protocol helpers, not translation-specific product changes.
Reviewing them independently keeps the translation PR focused while making the protocol hardening reusable for the rest of the client.

Standards references

What this does not change

  • no new user-facing feature flags
  • no new UI surface
  • no change in product scope; this is correctness / interoperability hardening only

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 22, 2026

Warning

Rate limit exceeded

@louzt has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 25 minutes and 40 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 25 minutes and 40 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 58b86179-0999-4db0-8fe4-3be1faa74207

📥 Commits

Reviewing files that changed from the base of the PR and between e7d7899 and 0df146a.

📒 Files selected for processing (4)
  • src/lib/ircUtils.tsx
  • src/lib/messageProtocol.ts
  • tests/lib/ircUtils.test.ts
  • tests/lib/messageProtocol.test.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

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

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.

1 participant