feat(search): add Sim Search mode, connectors tab, and cited sources - #7376
feat(search): add Sim Search mode, connectors tab, and cited sources#7376emir-karabeg wants to merge 2 commits into
Conversation
- 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
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryThe 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.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| 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]
Reviews (2): Last reviewed commit: "fix(search): harden source parsing, avai..." | Re-trigger Greptile
There was a problem hiding this comment.
2 issues found across 48 files
Confidence score: 3/5
apps/sim/app/workspace/[workspaceId]/search/connected/[credentialId]/search-credential-detail.tsxcan 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.tsrecords 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
- 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
|
@cubic-dev-ai review this PR |
@emir-karabeg I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
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
Summary
lib/sim-search, with connect-in-place rows and a connected-credential page without sharing or members<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 replyshapevariant to the chip primitive so a fully round chip is chip chrome rather than a class overrideType of Change
Testing
Lint, all 44 CI audits (including the tool-registry boundary and API validation), type-check for
apps/simandpackages/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