Skip to content

feat(search): read Drive documents and Gmail conversations - #8352

Open
waleedlatif1 wants to merge 2 commits into
stagingfrom
codex/search-document-context
Open

waleedlatif1 wants to merge 2 commits into
stagingfrom
codex/search-document-context

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Sep 27, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Read text from Drive PDF and DOCX files through the existing bounded transport and parsers, with download-permission, format, page, archive and output limits.
  • Read Gmail conversation context with per-message authorization, fresh permission checks, chronological attribution and explicit incomplete coverage. Normalize MIME alternatives and keep attachments separate from message bodies.
  • Update query guidance and add real HTTP acceptance coverage; isolate availability tests from developer OAuth configuration.

Type of Change

  • Feature

Testing

Full repository tests passed during implementation. The review corrections passed 524 provider/parser tests, 42 real HTTP acceptance checks with real PDF/DOCX parsers, 26 workspace type checks, 51 audits, lint, generators, registry and docs checks. Eight additional guard-removal controls fail independently, alongside the initial nineteen controls. Google acceptance uses synthetic HTTP fixtures; fresh connected-account verification remains untested.

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 Sep 27, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
docs Ready Ready Preview Sep 27, 2026 2:35am UTC

Request Review

@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 Sep 27, 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 29 files

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

Fix all with cubic | Re-trigger cubic

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

greptile-apps Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium risk] Adds document text extraction from Google Drive and Gmail.

The PR appears safe to merge, though PDF reads that exceed Drive’s text limit may do avoidable parsing work.

Findings

  1. P2 PDF budget checked too late ▶

Summary

The PR adds bounded Drive PDF/DOCX text reads and independently authorized Gmail conversation context, with real-HTTP synthetic acceptance coverage. Subsequent changes tighten DOCX conversion and correct PDF output-byte accounting. PDF reads still defer the caller’s smaller byte-budget check until after potentially substantial extraction work.

Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
    A[Drive file metadata] --> B[Bounded media download]
    B --> C{PDF or DOCX}
    C -->|PDF| D[Extract pages]
    D --> E[Check rendered output bytes]
    C -->|DOCX| F[Bound conversion and extract text]
    E --> G[Live document]
    F --> G
    H[Gmail anchor] --> I[Thread metadata]
    I --> J[Verify each sibling before body fetch]
    J --> K[Fresh checks before conversation output]
Loading

Reviews (2) · Last reviewed commit: "fix(search): bound document conversion a..."

Comment thread apps/sim/lib/file-parsers/pdf-parser.ts Outdated
Comment thread apps/sim/lib/sim-search/live/drive-content.ts Outdated
Comment thread apps/sim/lib/sim-search/live/drive-content.ts Outdated
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 27, 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 29 files

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

Fix all with cubic | Re-trigger cubic

Comment thread apps/sim/lib/file-parsers/pdf-parser.ts Outdated
Comment thread apps/sim/lib/sim-search/live/drive-content.ts Outdated
@waleedlatif1
waleedlatif1 force-pushed the codex/search-document-context branch from 7e1bc89 to dadc698 Compare September 27, 2026 02:33
@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 Sep 27, 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 30 files

Confidence score: 5/5

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

Re-trigger cubic

Comment thread apps/sim/lib/file-parsers/pdf-parser.ts

This branch was successfully deployed

1 active deployment
Preview — dadc6982 Deployed Sep 27, 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