Skip to content

improvement(search): cite public web results like connected sources in Search Assistant - #9647

Merged
waleedlatif1 merged 2 commits into
stagingfrom
improvement/search-web-citations
Nov 4, 2026
Merged

waleedlatif1 merged 2 commits into
stagingfrom
improvement/search-web-citations

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Search Assistant can now fall back to public web research (paired mothership change gives the organization Assistant web_search/web_fetch with a citationId on each result)
  • Web results become citation evidence: web_search/web_fetch join search_workspace/read_document in one isCitationTool set, and toCitationResult maps a page's url/title to the citation fields, so web pages render as the same source cards, sources panel, and activity result list as connected documents
  • A <source> tag still resolves only against a successful cited tool result; uncited web research (Build, main agent) stays out of source cards and is not persisted
  • Persisted chats keep bounded web citations (id, URL, title), so cards survive reload; Slack replies link web sources and show "Searching the web…" / "Reading web pages…" progress; Search MCP chat description no longer says "No web search"
  • Docs: Ask questions notes the web fallback

Type of Change

  • Improvement

Testing

  • resolve-citations.test.ts: a web citation resolves from a successful cited result, live and after persistence; a failed result resolves nothing
  • retrieval-citations.test.ts: cited web pages compact to bounded citations; uncited and failed web results compact to nothing
  • tool-activity-group.test.tsx: cited web results list like search results; uncited web research shows no disclosure
  • assistant-stream.test.ts: the "unrelated tool" case now uses call_integration_tool, since web_search is an intended evidence source
  • Each new guard reverted one at a time turns a test red (web_search, web_fetch, url/title mapping, compacted passthrough, empty-web drop, activity gate)
  • Targeted suites green: resolve-citations, retrieval-citations, tool-activity-group, persisted-message, chat-citations, assistant-stream, message-content, mcp server (162 tests)
  • Deploy order: this lands before the mothership change so web citations never arrive unresolvable

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 3, 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 3, 2026 11:48pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; both previous findings are fixed and no new blocking issue was found.

Summary

Search Assistant can show cited public web pages alongside connected documents.

  • Search answers can cite successful public web pages.
  • Search guidance explains when answers can use the public web.
  • Slack shows when the Assistant searches or reads web pages.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Successful cited tool result] --> B[Read citation ID, URL and title]
  B --> C[Resolve source tags]
  C --> D[Chat source cards]
  C --> E[Slack links]
  B --> F[Save bounded citations]
  F --> C
Loading

Reviews (2) · Last reviewed commit: "fix(search): retarget unrelated-tool fix..." · Reviewed by Greptile

@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 10 files

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

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/lib/knowledge/mcp/server.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 3, 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 11 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

@waleedlatif1
waleedlatif1 merged commit 6ff4f32 into staging Nov 4, 2026
149 of 151 checks passed
@waleedlatif1
waleedlatif1 deleted the improvement/search-web-citations branch November 4, 2026 00:08

This branch was previously deployed

1 inactive deployment
Preview — e27b48d9 Deployed Nov 3, 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