Skip to content

fix(search): keep Confluence searchable for colon queries and say when nothing was searched - #9694

Merged
waleedlatif1 merged 3 commits into
stagingfrom
improvement/search-empty-and-partial-diagnostics
Nov 5, 2026
Merged

waleedlatif1 merged 3 commits into
stagingfrom
improvement/search-empty-and-partial-diagnostics

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Confluence colon queries: our CQL text clause escapes Lucene operators, and Confluence answers HTTP 400 to the escaped colon (text ~ "a\\: b") and a trailing escaped backslash, so any search containing one (a title like Security: Weekly Report, a pasted [2:10 PM] timestamp, a path) silently dropped Confluence as unavailable. Both characters now go as word breaks, which Confluence's analyzer does anyway (a raw colon in the phrase returns the same pages). A query left with no words searches nothing on both the member and service-account paths, since Confluence lists every page for text ~ ":". Jira accepts these escapes and is unchanged.
  • Searches no account can serve: a plain live search that reaches no connected account used to return complete with zero results, so the Search page said "Search found no results" and MCP/Assistant callers read it as absence. It now returns partial with a first guidance line saying nothing was searched and where to connect an account (or, with a source filter and other sources connected, to drop the filter).
  • The Assistant search tool says nothing was searched instead of advising a narrower retry, and the results view shows "Connect your apps to search them." with a Connect apps link to the scope's integrations page.

Type of Change

  • Bug fix

Testing

  • Reproduced against a real Confluence: authorization: model / authorization model\ → unavailable; the same words without them → ok with results. Native CQL: text ~ "a: b" ok, text ~ "a\\: b" 400, text ~ ":" lists every page, text ~ " " 500. Every other Lucene operator character stays ok; Jira returns ok for the colon and backslash forms.
  • Live search + Assistant tool suites: 35 files, 383 tests passed; each new test fails with its fix reverted.
  • test-organization-search-e2e.ts now asserts the connect prompt and link for the seeded member, who has no connected account (its search reports zero accounts).
  • biome on changed files; type-check and audits in CI.

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)

…n nothing was searched

Confluence rejects a CQL text query holding a colon or backslash with HTTP 400,
even escaped, which dropped it from those searches; both now go as word breaks.
A plain live search that reaches no connected account is reported as partial
with guidance naming where to connect one, and the results view offers the
connection instead of claiming no results.
@vercel

vercel Bot commented Nov 5, 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 Nov 5, 2026 2:13am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; the latest wording change keeps the next steps available.

Summary

Keeps Confluence searches working when queries contain colons or backslashes, and distinguishes “nothing was searched” from “no results.”

  • Confluence searches keep working when query text contains colons or backslashes.
  • Searches with no connected account now say nothing was searched.

Reviews (3) · Last reviewed commit: "fix(search): let the guidance alone say ..." · Reviewed by Greptile

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

Confidence score: 4/5

  • In application.ts, a source-filtered search with no connected accounts shows generic guidance instead of the source-specific message. Return the source-specific message whenever source is present.
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/application.ts">

<violation number="1" location="apps/sim/lib/sim-search/live/application.ts:458">
P2: A source-filtered search with no connected accounts still gets the generic “no connected sources” guidance. Return the source-specific message whenever `source` is present, even when `allAccounts` is empty, and remove the now-unneeded `hasOtherAccounts` argument.</violation>
</file>

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

Turn on auto-fix | Re-trigger cubic

…stop the Assistant retrying unsearchable searches

A query left with no words after the colon and backslash become spaces would
list every Confluence page, so it now searches nothing on both the member and
service-account paths. The Assistant search tool reports a search no account
served as nothing searched instead of advising a narrower retry, and the
organization search E2E asserts the connect prompt the unconnected member sees.
@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 Nov 5, 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 11 files

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

Turn on auto-fix | Re-trigger cubic

@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 Nov 5, 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 11 files

Confidence score: 5/5

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

Turn on auto-fix | Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit 10a9d8a into staging Nov 5, 2026
63 checks passed
@waleedlatif1
waleedlatif1 deleted the improvement/search-empty-and-partial-diagnostics branch November 5, 2026 02:18

This branch was previously deployed

1 inactive deployment
Preview — 499d9850 Deployed Nov 5, 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