feat: extract conversation ID from email HTML for Superhuman replies#107
Merged
sweetmantech merged 1 commit intotestfrom Jan 13, 2026
Conversation
Superhuman email client inserts <wbr /> tags in link text which breaks plain text extraction. Added extractRoomIdFromHtml function as secondary fallback in getEmailRoomId to handle this case. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 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 |
sweetmantech
added a commit
that referenced
this pull request
Jan 13, 2026
* feat: make room_id required in send_email tool The room_id parameter is now required to ensure all outbound emails include the chat link footer, enabling email thread continuity. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Add POST /api/chats endpoint for creating chat rooms - Add createChatHandler in lib/chats/ - Add POST route at app/api/chats/ - Account ID inferred from API key - Optional artistId and chatId params - chatId auto-generated if not provided Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Add input validation pattern to CLAUDE.md and chats endpoint - Document validate function pattern using Zod in CLAUDE.md - Add validateCreateChatBody.ts for POST /api/chats - Update createChatHandler to use the validate function Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Remove try-catch around request.json(), follow existing pattern Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Add safeParseJson utility for optional request bodies - Create safeParseJson helper that returns {} if body is empty/invalid - Use in createChatHandler so body is not required - All params are optional, so empty body should work Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat: extract conversation ID from email HTML for Superhuman replies (#107) Superhuman email client inserts <wbr /> tags in link text which breaks plain text extraction. Added extractRoomIdFromHtml function as secondary fallback in getEmailRoomId to handle this case. Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
extractRoomIdFromHtmlfunction to extract conversation IDs from email HTML content<wbr />tag insertion in link text that breaks plain text extractiongetEmailRoomIdto check HTML as a secondary fallback between text and references headerTest plan
extractRoomIdFromHtml(11 tests) - handles wbr tags, URL-encoded links, edge casesgetEmailRoomId(3 new tests) - verifies HTML extraction prioritypnpm test)🤖 Generated with Claude Code