Skip to content

feat(search): add Sim Search mode, connectors tab, and cited sources - #7376

Open
emir-karabeg wants to merge 2 commits into
stagingfrom
feat/search
Open

feat(search): add Sim Search mode, connectors tab, and cited sources#7376
emir-karabeg wants to merge 2 commits into
stagingfrom
feat/search

Conversation

@emir-karabeg

Copy link
Copy Markdown
Collaborator

Summary

  • Add a Build/Search mode switcher to the chat composer (a round chip); in Search mode the suggested actions become "Connect Sim Search" rows that open the OAuth connect modal
  • Add a Search tab beside Integrations and Skills: a personally scoped catalog of knowledge-base connectors backed by lib/sim-search, with connect-in-place rows and a connected-credential page without sharing or members
  • Add the <source> special tag contract so search answers render an inline citation chip at each citation point plus a horizontally scrolling, right-faded sources strip under the reply
  • Add a shape variant to the chip primitive so a fully round chip is chip chrome rather than a class override
  • Keep the connector catalog out of the workflow editor's module graph and record the new routes in the tool-registry boundary baseline

Type of Change

  • New feature

Testing

Lint, all 44 CI audits (including the tool-registry boundary and API validation), type-check for apps/sim and packages/emcn, and the Vitest suites for home, search, integrations, skills, shared components, the catalog, stores, and the EMCN chip family pass. New unit and DOM tests cover the catalog resolution, personal credential filtering, the mode switcher, connector suggestions, <source> parsing and sanitizing, chip rendering, and the sources strip. The OAuth round trip was not exercised end to end.

Checklist

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

- Build/Search mode switcher in the chat composer; Search mode swaps the
  suggested actions for Connect Sim Search rows that open the OAuth modal
- Search tab beside Integrations and Skills: a personally scoped catalog
  of knowledge-base connectors with connect-in-place rows and a
  connected-credential page without sharing or members
- <source> special tag contract: inline citation chips at the citation
  point plus a scrolling, right-faded sources strip under the reply
- chip `shape` variant so a fully round chip is chip chrome, not a class
  override
- keep the connector catalog out of the workflow editor's module graph
  and record the new routes in the boundary baseline
@vercel

vercel Bot commented Sep 2, 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 Sep 2, 2026 12:36am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR adds Sim Search mode, a workspace Search connector catalog, and inline plus footer source citations while keeping connector dependencies outside the workflow editor graph.

  • Adds Build/Search composer mode and connector-based suggested actions.
  • Adds personally scoped Search connector and credential-management pages.
  • Adds validated <source> parsing, citation chips, and a deduplicated source strip.
  • Adds round chip variants and updates the tool-registry boundary baseline.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
apps/sim/app/workspace/[workspaceId]/home/home.tsx Imports SuggestedActions through its absolute feature-local path, completing the prior import fix without restoring the workflow-editor barrel edge.
apps/sim/app/workspace/[workspaceId]/home/components/suggested-actions/suggested-actions.tsx Switches suggested rows between Build actions and available, unconnected Search connectors.
apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/special-tags/special-tags.tsx Extends the special-tag parser with validated HTTP(S) source metadata.
apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/chat-content/chat-content.tsx Converts parsed source segments into contextual inline citation chips.
apps/sim/app/workspace/[workspaceId]/search/search.tsx Implements the workspace Search connector catalog and connection flow.
apps/sim/lib/sim-search/connectors.ts Defines the Search connector catalog and connector availability and connection resolution.
packages/emcn/src/components/chip/chip.tsx Adds reusable chip shape handling for fully rounded chip chrome.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Mode[Chat composer mode] -->|Build| Build[Build suggested actions]
  Mode -->|Search| Actions[Connector suggestions]
  Actions --> OAuth[OAuth connect modal]
  OAuth --> Catalog[Workspace Search catalog]
  Answer[Search answer] --> Parser["source tag parser"]
  Parser --> Inline[Inline citation chips]
  Parser --> Footer[Deduplicated sources strip]
Loading

Reviews (2): Last reviewed commit: "fix(search): harden source parsing, avai..." | Re-trigger Greptile

Comment thread apps/sim/app/workspace/[workspaceId]/home/home.tsx Outdated

@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.

2 issues found across 48 files

Confidence score: 3/5

  • apps/sim/app/workspace/[workspaceId]/search/connected/[credentialId]/search-credential-detail.tsx can show “reconnected successfully” after the OAuth provider rejects the reconnect, misleading users about connection state; inspect the callback error before routing to the success flow.
  • apps/sim/lib/posthog/events.ts records the all-workspace provider count for Search-mode connector clicks instead of the viewer’s personal Sim Search count, reducing analytics accuracy; emit the Search-specific count for the connector event.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/sim/lib/posthog/events.ts">

<violation number="1" location="apps/sim/lib/posthog/events.ts:629">
P3: When a Search-mode connector row is clicked, this new event kind records the all-workspace provider count instead of the viewer's personal Sim Search provider count. Record the Search-specific count for connector events so connector telemetry is not contaminated by unrelated or shared credentials.</violation>
</file>

<file name="apps/sim/app/workspace/[workspaceId]/search/connected/[credentialId]/search-credential-detail.tsx">

<violation number="1" location="apps/sim/app/workspace/[workspaceId]/search/connected/[credentialId]/search-credential-detail.tsx:89">
P2: When the OAuth provider rejects a reconnect, this context still makes `useOAuthReturnRouter` show “reconnected successfully” without inspecting the callback error. Check the callback result before taking the reconnect success shortcut so failed reconnects leave an error instead of misleading the user.</violation>
</file>

Heads up: you’re close to your included review allowance. Set a flex budget so reviews don’t pause.

Re-trigger cubic

Comment thread apps/sim/lib/sim-search/connectors.ts Outdated
Comment thread apps/sim/lib/posthog/events.ts
- validate <source> urls by parsing them and requiring a host, so a
  malformed value never renders a dead citation link
- gate Search-mode suggestions on deployment OAuth availability, sharing
  the predicate with the Search catalog
- match connected credentials across a service's additional provider ids
  (Salesforce sandbox) and count them in connector telemetry
- collect footer sources from the rendered text segments, covering a
  block-less message's fallback text and excluding subagent lanes
- use a distinctive citation-link sentinel and an absolute import for
  SuggestedActions
- teach the email tokens transcription test the composed chip geometry
@emir-karabeg

Copy link
Copy Markdown
Collaborator Author

@greptile

@emir-karabeg

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@emir-karabeg 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 49 files

Heads up: you’re close to your included review allowance. Set a flex budget so reviews don’t pause.

Fix all with cubic | Re-trigger cubic

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.

2 participants