Skip to content

feat: extract conversation ID from email HTML for Superhuman replies#107

Merged
sweetmantech merged 1 commit intotestfrom
sweetmantech/myc-3893-email-client-superhuman-replies-preserve-conversation-id
Jan 13, 2026
Merged

feat: extract conversation ID from email HTML for Superhuman replies#107
sweetmantech merged 1 commit intotestfrom
sweetmantech/myc-3893-email-client-superhuman-replies-preserve-conversation-id

Conversation

@sweetmantech
Copy link
Contributor

Summary

  • Added extractRoomIdFromHtml function to extract conversation IDs from email HTML content
  • Handles Superhuman's <wbr /> tag insertion in link text that breaks plain text extraction
  • Updated getEmailRoomId to check HTML as a secondary fallback between text and references header

Test plan

  • Unit tests for extractRoomIdFromHtml (11 tests) - handles wbr tags, URL-encoded links, edge cases
  • Integration tests for getEmailRoomId (3 new tests) - verifies HTML extraction priority
  • All 64 tests pass (pnpm test)

🤖 Generated with Claude Code

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>
@vercel
Copy link
Contributor

vercel bot commented Jan 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
recoup-api Ready Ready Preview Jan 13, 2026 0:54am

@coderabbitai
Copy link

coderabbitai bot commented Jan 13, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


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.

@sweetmantech sweetmantech merged commit a84ec73 into test Jan 13, 2026
4 checks passed
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>
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

Comments