Skip to content

fix(search): independent Jira activity listings, Drive and Jira paging, cursor and citation fixes - #10583

Merged
waleedlatif1 merged 4 commits into
stagingfrom
fix/activity-post-merge-audit
Dec 1, 2026
Merged

waleedlatif1 merged 4 commits into
stagingfrom
fix/activity-post-merge-audit

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

Fixes from the post-merge audit of the activity, chat history and search tools, and from the staging smoke test.

Activity

  • Jira assignments: JQL's history operators (WAS, CHANGED) take no functions, so assignee CHANGED TO currentUser() could be refused with a 400. That rejected Promise.all and dropped all Jira activity, including created issues. The query now names the member by the account ID it already reads. The created and assigned listings are now independent: one the provider refuses leaves the other and marks the listing partial. Only when both fail does the account fail.
  • Jira created: JQL dates are whole minutes, so the query reaches a minute past the bound. A bulk create in that minute could fill a page with issues above the bound and stall paging. The listing now reads past such pages (up to 4) before counting.
  • Drive: a read that hits the request cap before the window's start now returns more: true with scannedTo at the oldest edit read. Before, it returned nothing, did not resume, and only said to narrow the dates.
  • Slack: the orphaned slackAuthorNames TSDoc is back on its function. When auth.test is refused, DM counterparts are not named, so the member is never listed among them.

Search, chat, history

  • Refused cursor: a provider that refuses a continued native query (400/404/410/422 with a cursor) is reported as an invalid or expired cursor to drop, not a native-syntax error.
  • Chat citations: citations now carry the cited documentId (read from the full tool result; the saved compacted evidence still leaves IDs out), so read_document can read them. read_document given a citation ID (live:<32 hex>) explains it is a citation ID and to read the citation's documentId or url.
  • Chat history labels: conversations started by the Search MCP chat tool record config.surface = search_mcp, and list_my_chat_history labels them search_mcp instead of assistant. Earlier conversations keep assistant: nothing on them tells them apart.
  • Cursor wording: chat history's cursor errors use the shared messages that search_people and the other paged lists use.

Descriptions (contract change)

  • list_my_activity names GitLab (opened, changed, approved, commented on, pushed). involved now reads as the member's own participation in GitHub and Linear items, dated by the item's last update. This matches the GitLab relabel in fix(search): page GitLab activity through busy days #10580, where approvals become edited.
  • A mothership companion follows.

Tests

Each fails with its change reverted:

  • activity-providers.test.ts, against a fake Jira that refuses functions in history operators, as Atlassian's JQL reference documents: the account-named assignment query; created issues kept when the assignment listing is refused; reading past a page created after the bound. It also covers the Drive request cap and the Slack refused auth.test.
  • application.test.ts: the refused-cursor message, and the syntax message kept without a cursor.
  • reference.test.ts: the citation-ID hint.
  • chat-citations.test.ts: citations carry documentId.
  • chat-history.integration.ts: the search_mcp label and the shared cursor wording.
  • chat.integration.ts: the Search MCP chat records its surface.

I could not verify the JQL change against a live Jira site; it follows the documented operator rules.

@vercel

vercel Bot commented Dec 1, 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 Dec 1, 2026 8:19pm UTC

Request Review

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

1 issue found across 21 files

Confidence score: 3/5

  • google.ts restarts Drive listings from the first page because the continuation doesn’t carry pageToken, so pagination can repeat results instead of advancing. Carry the page token through the continuation and bound the query by edit time.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/sim/lib/sim-search/live/google.ts">

<violation number="1" location="apps/sim/lib/sim-search/live/google.ts:189">
P2: `more: !reachedStart` now asks for a continuation, but the continuation restarts the Drive listing from the first page. `pageToken` is never carried in the bound, and the query has no upper edit-time bound, so each call re-reads the pages an earlier call already consumed against the 8-request cap. Windows with more edits than that stall with `no_progress` instead of resuming. Carry the Drive `nextPageToken` in the continuation bound, or bound the query by the resume instant so earlier pages are not re-read.</violation>
</file>

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

Turn on auto-fix | Re-trigger cubic

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

greptile-apps Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5RetriggerView in Greptile

[Medium impact] The PR appears safe to merge; no new actionable issues remain.

Summary

Updates activity reads, chat citations, history labels, and cursor guidance.

  • Jira activity keeps created issues when assignment history is refused.
  • Drive activity reports progress when it cannot reach the date window.
  • Slack activity skips naming DM counterparts when it cannot identify the member.
  • Paged searches explain when a provider refuses a cursor.
  • Search chat citations point to documents that read_document can open.
  • Chat history labels conversations started by Search MCP.
  • Activity descriptions name GitLab work and clarify GitHub and Linear involvement.

Reviews (2) · Last reviewed commit: "fix(search): keep Jira outages account-w..." · Reviewed by Greptile

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

Copy link
Copy Markdown
Collaborator Author

@greptileai review

@waleedlatif1
waleedlatif1 force-pushed the fix/activity-post-merge-audit branch from 884bda3 to 677a2b2 Compare December 1, 2026 20:19
@waleedlatif1
waleedlatif1 merged commit 6c4ea4b into staging Dec 1, 2026
151 of 155 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/activity-post-merge-audit branch December 1, 2026 20:39
@blacksmith-sh

blacksmith-sh Bot commented Dec 1, 2026

Copy link
Copy Markdown

Found 1 test failure on Blacksmith runners:

Failure

Test View Logs
app/api/chat/utils.test.ts/utils.test.ts View Logs

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

This branch was previously deployed

1 inactive deployment
Preview — 677a2b24 Deployed Dec 1, 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