Skip to content

improvement(search): search several GitHub and GitLab kinds per account in one call and hide recovered search failures - #8258

Merged
waleedlatif1 merged 3 commits into
stagingfrom
improvement/live-search-query-batching
Sep 24, 2026
Merged

waleedlatif1 merged 3 commits into
stagingfrom
improvement/live-search-query-batching

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Let one search_workspace call send one native query per GitHub or GitLab kind for the same account (e.g. issues and commits together). Before, any two queries for the same account were rejected, so the model burned a round trip and a failed call on a common request.
    • GitHub issues, commits and code are separate endpoints, and GitLab takes one scope per request, so each kind is its own provider search. The rule is now one query per account and kind. A query without a kind, or two of the same kind, still conflicts, and so do queries for providers that don't use kind.
    • The account resolves and opens its session once. Its kinds search concurrently, and each gets its own status row (with kind) and nextCursor, so paging stays per query.
    • Repository/project discovery (/user/repos, GitLab /projects) is memoized on the session client, so several kinds share one listing. Provider requests are the same as the two separate calls the model would otherwise make.
    • The tool description and live guidance now state the rule, so the model can batch kinds on the first try.
  • Hide a search_workspace call that errored when a later call follows it in the same activity group, so the retry takes its place. The last call always stays, so a run where every search failed still shows its outcome.

Type of Change

  • Improvement

Testing

  • Contract cases: kinds for one account accepted; same kind, missing kind, and kindless providers rejected
  • Application test: one session for two GitHub kinds, a status and cursor per kind, and one kind failing without affecting the other
  • Provider test: two kinds on one memoized client list repositories once
  • UI tests: a failed search followed by a retry renders like the retry alone; an all-failed run keeps its last call. Both fail without the change
  • Checked against GitHub REST docs: separate search endpoints, 30/min search limit, retry-after handling, secondary limits. Also checked against the GitLab search API (one scope per request)
  • bun run lint, check:audits, block registry, docs manifest, type-check and the search, contracts, mothership and home UI suites pass
  • Paired worker contract sync: simstudioai/mothership#519

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 24, 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 24, 2026 8:02pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge; no outstanding finding or new actionable issue was identified.

Summary

This PR lets one live-search call run separate GitHub or GitLab kinds for the same account and report each kind’s status and cursor. It also hides an errored search when a later search in the activity group retries it.

  • The latest change preserves kind on reconnect statuses for unconnected queries.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Native queries] --> B[Select account]
  B --> C[Open one session]
  C --> D[Search each kind]
  D --> E[Per-kind status and cursor]
  D --> F[Merge ranked results]
Loading

Reviews (3) · Last reviewed commit: "fix(search): keep the kind on reconnect ..."

Comment thread apps/sim/lib/sim-search/live/application.ts
Comment thread apps/sim/lib/sim-search/live/application.ts

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

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

Fix all with cubic | Re-trigger cubic

@waleedlatif1
waleedlatif1 force-pushed the improvement/live-search-query-batching branch from 4792717 to 3a0b324 Compare September 24, 2026 19:51
@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 24, 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 17 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/application.ts
@waleedlatif1
waleedlatif1 force-pushed the improvement/live-search-query-batching branch from 3a0b324 to 87dcc28 Compare September 24, 2026 20:02
@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 24, 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 17 files

Confidence score: 5/5

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

Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit 293e883 into staging Sep 24, 2026
34 checks passed
@waleedlatif1
waleedlatif1 deleted the improvement/live-search-query-batching branch September 24, 2026 20:14

This branch was previously deployed

1 inactive deployment
Preview — 87dcc285 Deployed Sep 24, 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