Skip to content

feat(search-mcp): involving person filter on live search - #10439

Merged
waleedlatif1 merged 5 commits into
stagingfrom
feat/search-involving-filter
Nov 26, 2026
Merged

waleedlatif1 merged 5 commits into
stagingfrom
feat/search-involving-filter

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • New optional involving field on the Search MCP search tool: "me" or a colleague's email. Answers "what did I work on last week", "what's assigned to me", "what has been doing on X"; an empty query plus a date range lists that person's activity
  • Each provider applies its own native person clause, on plain and native queries alike:
    • Gmail: from:me for you (nearly all mail in your own mailbox is addressed to you), {from: to: cc:} for anyone else
    • Drive: in owners or in writers
    • Calendar: events the person organizes or attends without declining (me searches the primary calendar only; an email also narrows q)
    • Slack: from:me, or from:<@ID> via users.lookupByEmail
    • Jira: assignee OR reporter, with currentUser() or the account ID from user search
    • Confluence: contributor = currentUser() (me only; no email lookup)
    • GitHub: involves: on issues/PRs, author: on commits; code is skipped; email resolves only through a public profile; refuses a native query that already names the same qualifier (GitHub ORs repeated qualifiers)
    • Linear: or: [assignee, creator] with isMe / email
  • Sources that cannot filter by person are not searched: they get an unavailable status (notFilteredByPerson note), never unfiltered results, and they no longer take one of the 20 account slots
  • Guidance cards add one "Involving keeps: …" sentence per provider, only on searches that used the filter
  • Field lives on the MCP schema and live search input only; the shared assistant search schema is unchanged
  • Search diagnostics record involving: me | person (never the email)
  • A name instead of an email fails validation with an actionable message (find the email first, or search without involving)

Type of Change

  • New feature

Testing

  • application.test.ts: unsupported source is never searched and is reported; the provider gets the normalized person; an invalid person is rejected before any account opens
  • providers.test.ts: GitHub refuses a duplicate involves:; Calendar drops declined and others' events
  • Each new test fails with its guard reverted
  • Live read-only probes against a staging bench account for Gmail, Drive, Calendar, Slack (me + email lookup) and GitHub (me + unlisted email)
  • bun run check:api-validation:strict, biome on changed files; full type-check, audits and suites run in CI
  • tools/list grows by 487 characters / 151 tokens (4,487 → 4,638)
  • Client bench (Sonnet 5.5 over the MCP route, staging bench account, ctl = staging base vs this branch, same pinned date):
    • 11 targeted cases (own activity over a window, a colleague's activity, person + topic, two where the filter is not needed), 2 rounds × k=2: correct 50.0% → 72.7% (+22.7pp, 95% CI [+6.8, +40.9], 5 wins / 0 losses), completeness +7.1pp [+0.9, +15.6], truthfulness +0.36 [+0.09, +0.71]; tool chars and input tokens flat
    • No-regression slice (39 existing people/comms/calendar/meeting/unanswerable cases, k=2): every quality CI spans 0 (correct −2.6pp [−11.5, +6.4]); seconds, rounds and tokens flat

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Nov 26, 2026 10:14pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · The PR appears safe to merge, with no new actionable issues found.RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge, with no new actionable issues found.

Summary

Adds optional involving searches for the connected user or a colleague’s email. Supported providers apply their own person filter; unsupported sources are skipped.

  • Live search can narrow results to one person’s activity.
  • Google and Slack searches can focus on one person’s activity.
  • Issue and page searches can focus on one person’s work.
  • GitHub searches can show one person’s issues and commits.

Reviews (5) · Last reviewed commit: "fix(search-mcp): never take a Jira user ..." · Reviewed by Greptile

Comment thread apps/sim/lib/sim-search/live/google.ts Resolved

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 14 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/lib/sim-search/live/google.ts Resolved
Comment thread apps/sim/lib/sim-search/live/google.ts Resolved
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 14 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/lib/sim-search/live/google.ts Resolved
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 14 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

Adds an optional involving field ("me" or an email) to the Search MCP search tool. Each provider that can filter by person applies its own native clause; sources that cannot are skipped with an unavailable status instead of returning unfiltered results.
… people across sites, skip Confluence for colleague emails
@waleedlatif1
waleedlatif1 force-pushed the feat/search-involving-filter branch from 5904a87 to 981c254 Compare November 26, 2026 22:08
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 14 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 15 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

This branch was previously deployed

1 inactive deployment
Preview — 985f62db Deployed Nov 26, 2026 by vercel[bot]
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