Skip to content

fix(communities): ignore stale community errors#58

Merged
tomcasaburi merged 1 commit into
masterfrom
fix/stale-community-errors
May 25, 2026
Merged

fix(communities): ignore stale community errors#58
tomcasaburi merged 1 commit into
masterfrom
fix/stale-community-errors

Conversation

@tomcasaburi
Copy link
Copy Markdown
Member

@tomcasaburi tomcasaburi commented May 25, 2026

Summary

  • Delay community error events briefly before exposing them through the communities store.
  • Clear pending and stored community errors when the same community later emits an update.
  • Add store and hook coverage for unsuperseded errors, stale pending errors, and stale stored errors.
  • Document the useCommunity error behavior and regenerate the LLM context files.

Validation

  • yarn prettier
  • yarn build
  • yarn test src/hooks/communities.test.ts src/stores/communities/communities-store.test.ts
  • yarn test
  • yarn test:coverage:hooks-stores test phase passed, then the repo-wide 100% hook/store coverage verifier reported existing coverage gaps below the required gate.

Note

Medium Risk
Changes community error timing and clearing in the shared Zustand store, which affects how all consumers see fetch failures, but scope is limited to community loading UX rather than auth or publishing.

Overview
Community fetch failures are no longer written to the store immediately: the communities store waits ~1s before appending error events to per-community errors, and drops pending and stored errors when the same community later emits update. That way useCommunity only surfaces errors that were not recovered by a successful refresh—transient blips are less likely to flash in error / errors.

Tests cover delayed store errors, errors cleared by a timely update, and the hook’s unsuperseded error list; README and regenerated LLM index docs describe the behavior.

Reviewed by Cursor Bugbot for commit 6dacdbe. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 25, 2026

Warning

Review limit reached

@tomcasaburi, we couldn't start this review because you've used your available PR reviews for now.

Your plan includes 1 review of capacity. Refill in 59 minutes and 2 seconds.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more review capacity refills, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than trial, open-source, and free plans. In all cases, review capacity refills continuously over time.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 09663ea5-bb1c-4049-9768-1bcae55438d8

📥 Commits

Reviewing files that changed from the base of the PR and between 4539af0 and 6dacdbe.

📒 Files selected for processing (6)
  • README.md
  • llms-full.txt
  • llms.txt
  • src/hooks/communities.test.ts
  • src/stores/communities/communities-store.test.ts
  • src/stores/communities/communities-store.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/stale-community-errors

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@tomcasaburi tomcasaburi merged commit a37c79e into master May 25, 2026
8 checks passed
@tomcasaburi tomcasaburi deleted the fix/stale-community-errors branch May 25, 2026 11:23
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