Skip to content

Load community headers without scanning every thread - #932

Merged
RhysSullivan merged 2 commits into
mainfrom
fix/community-header-skip-thread-scan
Aug 28, 2026
Merged

Load community headers without scanning every thread#932
RhysSullivan merged 2 commits into
mainfrom
fix/community-header-skip-thread-scan

Conversation

@RhysSullivan

Copy link
Copy Markdown
Collaborator

Summary

  • Community page headers were collecting every channels row for a server (including all threads), which blew Convex read limits on large communities.
  • Those public queries now keep the indexed channelSettings lookup and load only those parent channel docs — plus referenced category rows for the header — by id.
  • Same change in getServerByDiscordIdWithChannels. Response shape and sort order are unchanged.

Test plan

  • cd packages/database && bun run test -- convex/public/channels.test.ts convex/public/servers.test.ts (34 pass)
  • packages/database typecheck
  • biome check on changed files
  • CI lint + typecheck

Community header queries were collecting every channel row for a server, including all threads. Load only indexed parent channels and their referenced categories by id.
@vercel

vercel Bot commented Aug 28, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
answer-overflow-main-site Ready Ready Preview Aug 28, 2026 3:12am

Request Review

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 28, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
answeroverflow-main-site da6b42d Aug 28 2026, 03:12 AM

Random FastCheck snowflakes near the min can collide and overwrite the indexed parent, so the header query looks empty.
@RhysSullivan
RhysSullivan merged commit ff407d7 into main Aug 28, 2026
5 of 6 checks passed
@RhysSullivan
RhysSullivan deleted the fix/community-header-skip-thread-scan branch August 28, 2026 03:17
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