ARIA: split email 'active threads' per sender + filter promo senders#356
Open
holoduke wants to merge 1 commit into
Open
ARIA: split email 'active threads' per sender + filter promo senders#356holoduke wants to merge 1 commit into
holoduke wants to merge 1 commit into
Conversation
…senders All gmail observations shared senderJid=gmail:<accountId>, so the thread keying in updateConversationThreads collapsed every email into one bucket. The "Active threads" section in the brain prompt then rendered a single line with 15+ unrelated promo senders comma-joined and one truncated subject — pure noise. Changes: - observer.ts: add extractEmailAddress() + isPromoOrAutomatedSender() helpers (no-reply/notifications/alerts/marketing local-parts + known promo domains). - memory/working-memory.ts: for gmail observations, key thread by per-sender address (email:<accountId>:<addr>) and skip promo/automated senders entirely. One-time evict legacy dm:gmail:* bundled threads from working memory. - brain-prompt.ts: defense-in-depth — drop email threads whose only participants look promotional; cap rendered participant list at 3+N overflow. Real DMs like Maaike's "Julian heeft geen map" now get visually equal weight instead of being buried beside a wall of promo senders. Intent-summary: Active-threads brain-prompt block collapsed all gmail senders into one bundle so promo noise drowned real conversations. Intent-tokens: threads, email, promo, noise, prompt, bundling, signal Co-Authored-By: Claude Opus 4.7 <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.
Problem
The brain-prompt Active threads section was bundling 15+ unrelated email senders (LinkedIn job alerts, AliExpress promo, PayPal, Guardian, Schoolkassa, GSC, 123accu…) into a single line, because every gmail observation shares the same `senderJid` (`gmail:`). `updateConversationThreads` then collapsed them into one `dm:gmail:` thread and joined the participants with commas. Result: pure noise in the prompt window, and real DMs (e.g. Maaike's "Julian heeft geen map") visually drowned in promo subjects.
Fix (both prongs requested)
Risk
Low — purely affects how threads are keyed and rendered for prompt assembly. No change to observation recording, message sending, or memory writes. Promotional emails still flow through observations and downstream digests; they're just no longer surfaced as "active threads".
Verification
🤖 Generated with Claude Code