Skip to content

ARIA: filter promo senders from active-threads surface#345

Open
holoduke wants to merge 1 commit into
mainfrom
aria/filter-promo-senders-active-threads
Open

ARIA: filter promo senders from active-threads surface#345
holoduke wants to merge 1 commit into
mainfrom
aria/filter-promo-senders-active-threads

Conversation

@holoduke

Copy link
Copy Markdown
Owner

Why

In think/reflect prompts the Active threads block has been showing one giant fake thread with 11+ unrelated senders — AutoScout24, AliExpress, Glassdoor, MijnOverheid, Ferrari newsletter, FD, Apprentus, Trimble, LinkedIn Job Alerts, Google, etc. — concatenated under a single subject line. They aggregate that way because all Gmail observations share the gmail:<account> thread key in working-memory.ts, so every promotional sender lands in the same ConversationThread.participants array.

The result: a noise "thread" that drowns out real conversations, wastes prompt budget, and makes the active-thread list harder to scan for what actually matters.

What

Add a sender-pattern filter in backend/brain-prompt.ts and apply it where the Active threads block is rendered:

  • PROMO_LOCAL_PATTERNS: common notification local-parts — no-reply@, do-not-reply@, newsletter@, notifications@, savedsearches@, jobalerts(-noreply)@, best-message-notice@.
  • PROMO_DOMAIN_KEYWORDS: small denylist of marketing/notification domains — aliexpress, autoscout24, glassdoor, ferrari, mijn.overheid, marktplaats, quora.
  • Filter participants per thread; if every participant matches, suppress that thread entirely.

Conservative — only obvious promo/notification patterns. Real human/work email senders still show up.

Scope

  • Pure prompt-surface filter. Raw observations and the underlying wm.conversationThreads data structure are untouched.
  • No behavior change for WhatsApp DMs / groups — sender names there won't match these patterns.

Verification

  • npx tsc --noEmit clean.

🤖 Self-improvement worker

The active-threads block in think/reflect prompts was concatenating
11+ unrelated promo/notification senders (AutoScout24, AliExpress,
Glassdoor, MijnOverheid, Ferrari newsletter, LinkedIn job alerts,
etc.) under one subject line. They share the gmail:<account> thread
key so they all aggregate into a single "thread" that drowns out real
conversations and wastes prompt budget.

Add isPromoSender() in brain-prompt.ts using common no-reply /
newsletter / jobalerts / savedsearches local-part patterns plus a
small denylist of marketing domains. Filter participants when
rendering the Active threads section; suppress a thread entirely if
every participant matches. Raw observations are untouched — only the
prompt-side aggregation is filtered.

Intent-summary: Active-threads prompt surface was bundling many promotional/notification email senders into one fake thread, polluting reasoning context with inbox noise.
Intent-tokens: active-threads, promo-filter, email-noise, prompt-noise, gmail, newsletter, noreply
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