Skip to content

feat(search): add personal integration inventory and connection cards - #7711

Merged
TheodoreSpeaks merged 3 commits into
stagingfrom
codex/search-integration-capabilities
Sep 10, 2026
Merged

feat(search): add personal integration inventory and connection cards#7711
TheodoreSpeaks merged 3 commits into
stagingfrom
codex/search-integration-capabilities

Conversation

@TheodoreSpeaks

@TheodoreSpeaks TheodoreSpeaks commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add a current-person integration inventory to organization Search and reuse credential cards for personal connections and exact-account reconnects. Keep Submit as the continuation step.
  • Translate Slack connection cards into private provider buttons, and allow verified members to ask the Assistant for their first connection before documents are indexed.
  • Show document search, document reading, and integration listing through Slack's native streamed task updates, with completion and failure states.
  • Reuse the existing personal Integrations page and OAuth setup. No database migration or new principal type.

Type of Change

  • New feature

Testing

Focused integration and Slack tests, app/auth typechecks, Biome, generated catalog checks, and all 46 repository audits. The latest Slack regression run passed 260 tests across 25 suites. Live browser verification covered authenticated inventory, agent tool execution, and connection-card rendering. Live provider consent and Submit verification remain pending. Live Slack delivery is blocked by an inactive test installation.

Rollout

Deploy these handlers and renderers before enabling the tool and prompt in Mothership #491.

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)

@vercel

vercel Bot commented Sep 10, 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 10, 2026 4:26am UTC

Request Review

@TheodoreSpeaks
TheodoreSpeaks marked this pull request as ready for review September 10, 2026 02:56
@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

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

@greptile-apps

greptile-apps Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

The PR is not yet safe to merge because OAuth receipt-storage failure can still report a successfully persisted connection as failed.

Findings

  1. P1 Receipt Failure Misreports Success
  2. P2 Invalid State Crashes Routes

Summary

  • Adds authorized application operations and API contracts for listing and connecting personal Search integrations.
  • Adds reusable connection cards with per-attempt OAuth completion tracking and exact-account reconnect support.
  • Exposes integration inventory to Copilot and translates connection requests into organization and Slack surfaces.
  • Adds streamed Slack task progress for integration listing, document search, and document reading.
  • Extends focused coverage for personal inventory, OAuth completion, connection cards, Slack streaming, and tool execution.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  U[Organization member] --> C[Organization chat or Integrations page]
  C --> I[Personal integration inventory API]
  I --> A[Authorized application use cases]
  A --> S[Search sources and personal accounts]
  C --> O[Connection card]
  O --> OAuth[OAuth authorization]
  OAuth --> R[Completion receipt]
  R --> I
  S --> T[Copilot integration-listing tool]
  T --> Slack[Slack streamed task updates]
Loading

Reviews (2) · Last reviewed commit: "fix(tests): isolate PitchBook error hand..."

Comment on lines +400 to +406
if (attempt.connectionIntent && attempt.completionId && attempt.organizationId) {
await recordSearchConnectionCompletion({
organizationId: attempt.organizationId,
userId: attempt.userId,
completionId: attempt.completionId,
credentialId: completion.credentialId,
})

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.

P1 Receipt Failure Misreports Success

The credential grant is committed before this completion receipt is written. If Redis is unavailable or rejects the write, the error reaches the OAuth callback, which shows a failure even though the account was successfully connected. This can prompt the user to retry an authorization that already completed. Make the receipt write non-fatal after the commit, or otherwise prevent receipt failures from reporting the committed grant as failed.

Comment on lines +24 to +29
export function readSearchConnectionAttempt(key: string): SearchConnectionAttempt | null {
if (typeof window === 'undefined') return null
const value = window.localStorage.getItem(key)
if (!value) return null
return attemptSchema.parse(JSON.parse(value))
}

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.

P2 Invalid State Crashes Routes

This persistent browser state is parsed without handling malformed or schema-incompatible values. Because the connection hook calls this function while rendering, a corrupt value—or an older value after a future schema change—can replace the entire organization chat or integrations page with its error state until storage is cleared. Treat invalid state as absent and clear it, as the existing OAuth-attempt reader does.

Suggested change
export function readSearchConnectionAttempt(key: string): SearchConnectionAttempt | null {
if (typeof window === 'undefined') return null
const value = window.localStorage.getItem(key)
if (!value) return null
return attemptSchema.parse(JSON.parse(value))
}
export function readSearchConnectionAttempt(key: string): SearchConnectionAttempt | null {
if (typeof window === 'undefined') return null
try {
const value = window.localStorage.getItem(key)
if (!value) return null
const parsed = attemptSchema.safeParse(JSON.parse(value))
if (parsed.success) return parsed.data
window.localStorage.removeItem(key)
return null
} catch {
return null
}
}

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

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

@TheodoreSpeaks
TheodoreSpeaks merged commit a50f02c into staging Sep 10, 2026
33 checks passed
@TheodoreSpeaks
TheodoreSpeaks deleted the codex/search-integration-capabilities branch September 10, 2026 04:35
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