Skip to content

Hide archived and under-minimum groups from search - #2125

Merged
elie222 merged 2 commits into
elie222:mainfrom
princejain756:search-openable-groups
Oct 25, 2026
Merged

elie222 merged 2 commits into
elie222:mainfrom
princejain756:search-openable-groups

Conversation

@princejain756

Copy link
Copy Markdown
Contributor

Why

Search could return archived groups and groups that fell below GROUP_MEMBER_MIN active bot members. Neither can be opened from results, so they read as dead ends. Closes #2037.

What changed

apps/api/src/search.ts now filters group hits the same way getGroup/getGroupTarget decide a group is openable: archivedAt IS NULL and at least two members whose bots are not archived. Applied to all three group queries: direct group search, group artifacts, and the raw SQL group-message search. search.test.ts gains coverage for archived and under-minimum groups.

How tested

pnpm vitest run apps/api/src/search.test.ts passes (8 tests). The member-count filter mirrors the resolver logic, verified against getGroupTarget.

Group search results could surface archived groups and groups that no
longer have GROUP_MEMBER_MIN active bots, neither of which can be opened.
Apply the same rule getGroup/getGroupTarget use, across the direct group
query, the group-artifacts query and the raw SQL group-message query.
@vercel

vercel Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
rakazo-www Skipped Skipped Oct 25, 2026 12:23pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; both previous findings are addressed.

Summary

Search excludes archived groups and groups below GROUP_MEMBER_MIN across group names, files, and messages.

  • Search results show only groups that can be opened.

Reviews (2) · Last reviewed commit: "Apply group eligibility before search li..." · Reviewed by Greptile

Comment thread apps/api/src/search.ts Resolved
Comment thread apps/api/src/search.test.ts Resolved
@elie222
elie222 merged commit 0366025 into elie222:main Oct 25, 2026
29 checks passed

This branch was previously deployed

1 inactive deployment
Preview — 4e94fe72 Deployed Oct 25, 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.

[Bug]: Search shows archived group chats, which then can't be opened

2 participants